adding " . " with column name

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
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

adding " . " with column name

Post by mandyli »

Hi


I am creating file from mainframe source files.

But I would like give column name with ".".

ex :NameID but in my out put file I need Name.ID


Is there anyway I can able to add "." for columnname?


Thanks
Man
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Do you mean creating a first record which contains the column names? Since that's based on the field names in the job and "." is not valid in a field name the stock answer on can you do this automagically would be no.

You could create the record "before job" and then set your output to append to the newly created one record file. Do this by a simple 'echo' of the contents to the filename or keep a one record file stashed elsewhere and copy it to the target location, overwriting what is there.
Last edited by chulett on Sat Jun 25, 2011 6:59 am, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Post by mandyli »

Yes.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ok... and?
-craig

"You can never have too many knives" -- Logan Nine Fingers
samyamkrishna
Premium Member
Premium Member
Posts: 258
Joined: Tue Jul 04, 2006 10:35 pm
Location: Toronto

Post by samyamkrishna »

you can do it with unix commands in the after job subroutine.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You might want to expand a wee bit on the how of that. Still better before job, IMHO.
-craig

"You can never have too many knives" -- Logan Nine Fingers
samyamkrishna
Premium Member
Premium Member
Posts: 258
Joined: Tue Jul 04, 2006 10:35 pm
Location: Toronto

Post by samyamkrishna »

Hi Craig,

Are you asking me to explain a bit more.
Or Are you asking the guy who posted the topic.

Regards,
Samyam
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

samyamkrishna wrote:Are you asking me to explain a bit more.
Yes.

It's one thing to say "do X" when it is obvious what that means, but a general statement like "use unix commands after job" should really be explained. IMHO. And I'm sure Mandyli would appreciate it as well. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
samyamkrishna
Premium Member
Premium Member
Posts: 258
Joined: Tue Jul 04, 2006 10:35 pm
Location: Toronto

Post by samyamkrishna »

Hi Mandyli,

Try something like

sed '1s/NameID SalaryId/Name.ID Salary.ID/' Outputfile > OutputFileTemp

This should help
Post Reply