Re:How to send Values to Unix Script During execution of Job

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
sck
Participant
Posts: 18
Joined: Thu Mar 18, 2004 2:58 pm

Re:How to send Values to Unix Script During execution of Job

Post by sck »

Thank You very much for your reply.

In this Process we have a Status Table, which has Batch_Id, Status eg. (Ready, Processed, etc,), Total Records1, Total Records2, Total Records3,

Now the job should perform in such a way as follows; From the Sybase table the job has to find if there were any value in Status Column as Ready and then if it exists, only one record has to be pulled out and all the values of the in that record has to be passed as parameters to the Shell Scripting which would initate a BCP load to execute based on the Parameter passed and if the BCP load was successful then the Script would return a Value, that is a key to find out whether the value was successful or unsuccessful, based on which the next job would execute. But if there were not value of Status Ready then the Job should abort.

Hope you understand what my job has to do. Could you please give me a good solution to this problem as to how could this be implemented.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why not just use a BCPLOAD stage within your job?

Looks like you're writing your own scheduler, with the control records maintained in a Sybase table. No reason why not, though I'd avoid aborting if possible - just ending is probably OK.

You can build a hierarchy of job controllers (or job sequences) to control all of this, including management of the process metadata (that is, the row counts). No need to go out to UNIX shell scripts; in general this just adds complexity.

If you really must, then invoke the shell script with command line arguments, and process these using the shell variables $1, $2, and so on.
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