job parameter

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

Post Reply
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

job parameter

Post by dodda »

hello

i have a delimited sequential file as source and i need to produce fixed width file. my problem is i have a column called DEP which holds same values (all values in the column are 111)

DEP(column name)

111
111
111
111
111

and i need to produce a fixed widht sequential file with DEP columns value appending to it

FILENAME.111.dat
a job parameter would be needed in this case i guess but dont know where to start
can some body throw a light on it.

Regards
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The Sequential File stage that writes the file will have Format properties that specify fixed width. The data types will not include VarChar (or any other variable-width data type). You may, therefore, need an intermediate Copy, Modify or Transformer stage to map the column data types.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

If what you are saying is that within the same file this column contains the same values, and that distinct value needs to be used as part of the filename, then use some unix commands to get the value. A simple combination of "head -n1 filename|cut -d"|" -f42" will return the value in the 42 column of a | delimited file.

If you're saying that you N files each named and containing only the rows for that value, no luck. You'll have to write a parser.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply