How to get fieldnames of my source files

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
mohanraj
Participant
Posts: 48
Joined: Sat Mar 25, 2006 12:40 am
Location: bangalore

How to get fieldnames of my source files

Post by mohanraj »

Hi

Can anyone explain me how can I get metadata of my source file.I mean is there any prebuilt routine which will give me all the fields of my source file or is there anyother way by which I can capture my source file fields.

Thanks in advance
mohanraj
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Only if your file has the field names in the first line will this work. You can import this from the manager using the sequential file metdata import.
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Re: How to get fieldnames of my source files

Post by meena »

Hi,
There's no need of a routine. You can import the file through DS Manager.
Can anyone explain me how can I get metadata of my source file.I mean is there any prebuilt routine which will give me all the fields of my source file or is there anyother way by which I can capture my source file fields.
mohanraj
Participant
Posts: 48
Joined: Sat Mar 25, 2006 12:40 am
Location: bangalore

Hi ArndW

Post by mohanraj »

Hi
Thanks for your reply
ArndW wrote:Only if your file has the field names in the first line will this work. You can import this from the manager using the sequential file metdata import. ...
But my question is that not importing metedata.My job is like this

Seq---->Transformer---->OCI
-
-
OCI

I mean two OCI stages populating from transformer
My problem is I need to collect all the fieldnames in transformer so that I can hardcode some value if my source column is null.So my question is that is there any prebuilt routine is there which will give me all the fields names of the source file.
And also I need to use this routine for the similar kind of jobs to get their respective source file fields

Thanks once again and waiting for your reply

Regards
Mohan
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Mohan,

you cannot dynamically assign column names at runtime the way you envision it in DataStage server jobs.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There are built-in Transforms such as NullToEmpty and NullToZero that you can use. These ought to serve as a useful starting point. You need to import/create the table definition for the output link of the Transformer stage; server jobs do not have runtime column propagation.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply