Executing multiple TCL Commands using Command Stage

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
sumesh.abraham
Participant
Posts: 153
Joined: Thu May 11, 2006 1:52 am
Location: Bangalore

Executing multiple TCL Commands using Command Stage

Post by sumesh.abraham »

Hi All,

I tried to execute two TCL commands using Command Stage as

Code: Select all

SELECT * FROM DS_JOBS ; SELECT * FROM DS_JOBOBJECTS
But I got the result of only the first command in the Output log file. The CommandRTN column shows the return value for the first command.

But when I executed two OS commands using the same syntax I got the results of both commands in output log file. Please clarify.

Also I'm not able to see the Return code from the command in the log file. The help section on command stage tells that both the outpu and the return code from the command will be written to the output log file. I'm totally confused. Any help on this will highly be appreciated.

Thanks a lot,
Sumesh
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Why do you want to do this?

You are missing a semicolon on the second SQL statement.
Mamu Kim
sumesh.abraham
Participant
Posts: 153
Joined: Thu May 11, 2006 1:52 am
Location: Bangalore

Post by sumesh.abraham »

Hi Kduke,

I was just trying to execute multiple commands.

I've a query. Whether the return code form the command will be written to the output file? It'd be great if you can clarify me.


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

Post by ray.wurlod »

You need a paragraph. Either store the two commands under a single name (from the Administrator client) or construct a string with a field mark (@FM) between the two queries. Each query requires a terminating semi-colon.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Yeah, what Ray said.
Mamu Kim
Post Reply