Modify stage specification has more than one conversions

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
madsongtel
Participant
Posts: 31
Joined: Fri Aug 01, 2008 2:56 am

Modify stage specification has more than one conversions

Post by madsongtel »

Hi All,

Please clarify my doubt regarding Modify stage,
i am using two modify conversions in one specification like
NEW_COLUMN = COLUMN_A; COLUMN_C = handle_null(COLUMN_C,0);
Reason for using like this is, i will parameterize the specification and pass that at run time. i have 100 jobs with different layouts and load into 100 tables with schmema name using RCP, and i have to do datatype conversions, drop an null handle in all files.

If we can do this then one job is enough to load data from file to table.
i see in DS parallel advanced guide like this but there using $osh command.

i am trying to implement but getting errors.

Please give us suggestions and let us know how to achieve this.


Thanks in Advance.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

You can specify however many modify statements you can fit into a job parameter.

If you're receiving errors then likely there is an issue with one or more of the modify statements. We can't tell here because you didn't supply the errors or the statements.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
madsongtel
Participant
Posts: 31
Joined: Fri Aug 01, 2008 2:56 am

Post by madsongtel »

Hi jwiles,

Thanks for your response.
Could you please give me an example with any two conversions in one specification..

I am not able to do any two conversions in one Specification.

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

Post by ray.wurlod »

It may be (I can't test at this time) that you can only have a single specification in one field in the GUI, but can have more than one in a job parameter that you refer to in the Modify stage itself.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

It's definitely possible both entered directly in the GUI as well as through a job parameter. The format shown in the advanced developer guide is correct for the GUI as well, except that you don't need to add the trailing semicolon at the end of the line. The GUI compiler will do that when it creates the osh code that represents your job. You will still need to use the semicolon to separate the conversions.

You can add the $OSH_DUMP environment variable to see if the modify operator is correctly built from your job parameter at runtime.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
madsongtel
Participant
Posts: 31
Joined: Fri Aug 01, 2008 2:56 am

Post by madsongtel »

Thanks Jwiles, Its working.
Post Reply