Fixed width Seq File from Server to Parallel

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

us1aslam1us, some spaces are fine. They just mean that there is no value. Spaces within fields are ok, but the OP has to validate that and make sure that these spaces are the 'OK' spaces.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

beaditya wrote: I think the error is due to "Spaces between columns" value, its set to "0" in the server job when the file was created.
I tried giving "0" as the "Fill Char" value in parallen seq stage, it dosent work
Just curious to know,How you had done this in server job?

Sam
ady
Premium Member
Premium Member
Posts: 189
Joined: Thu Oct 12, 2006 12:08 am

Post by ady »

Whats the best thing to do now ?
ady
Premium Member
Premium Member
Posts: 189
Joined: Thu Oct 12, 2006 12:08 am

Post by ady »

us1aslam1us wrote:
beaditya wrote: I think the error is due to "Spaces between columns" value, its set to "0" in the server job when the file was created.
I tried giving "0" as the "Fill Char" value in parallen seq stage, it dosent work
Just curious to know,How you had done this in server job?

Sam

Which one are you talkin about?...... The "Spaces between columns" ??
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

1. Analyze the server job which is creating this file and get the proper format of the file.
2. Using the Hex editor verify what exactly those space mean there and by someway need to remove those spaces from the file by considering them to be 'OK' space.

Sam
ady
Premium Member
Premium Member
Posts: 189
Joined: Thu Oct 12, 2006 12:08 am

Post by ady »

Can I just create a server job to write the fixed width data into another normal seq file and then get it into parallel? Will that work ?

I never used HEX, so thats gonna be a problem
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Instead read the whole record in one column as varchar (6*)and break it using substring in the transformer depending on the required format.

Sam
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

beaditya wrote:Can I just create a server job to write the fixed width data into another normal seq file and then get it into parallel? Will that work ?

I never used HEX, so thats gonna be a problem
Good idea. Sounds good.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ady
Premium Member
Premium Member
Posts: 189
Joined: Thu Oct 12, 2006 12:08 am

Post by ady »

Actually I am testing some jobs rightnow, I have 1 file from the PROD and 1 from the DEV ENV and I compare these file record by record using a DIFFERENCE stage in parallel. Thats why I need these files in parallel.

I need to do this for most of the jobs which have different metadata.... so I dont want to spend much time editing the metadata and substringing every column.

Instead can I create a new seq file in server from the old "Fixed width" file and use it ? That should work right?

..... Performance is not an issue for us as of now because these job as just for checking data and will be discarded after few runs.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

That will work fine.

Sam
Post Reply