Page 1 of 1

Pass UserStatus from underlying sequence 2 calling sequence

Posted: Wed Mar 30, 2011 4:37 am
by fkana
Hi,

I have a master_seq which call an underlying source_seq which in turn calls a piece of JCL code which executes a command line to source data. The JCL job sets the user status to one of 3: success, failed, nothingnew(if now new files were generated for a certain time period).

In the source_seq job - which calls the JCL job - I can set the userstatus from the underlying JCL job in the triggers of the calling source_seq job to success|failed|nohtingnew and the flow will follow the respective link.

I get all of the above to work perfectly fine but my challenge is:
How do I pass the user status from the source_seq - which i received from the JCL job - to the master_seq. Or how do i set the user status in a sequence job and pass it to the calling sequence job.

master_seq -------> source_seq ------> JCL job

TIA.

Faeez

Posted: Wed Mar 30, 2011 1:55 pm
by ray.wurlod
Use the $UserStatus activity variable from the Job activity that invoked the "JCL job". Not really sure what you mean by JCL here - it's usually a mainframe term.

Posted: Thu Mar 31, 2011 1:02 am
by fkana
Hi Ray,

That's exactly what I do and it works fine for the source_seq. I now want to send the same userstatus to the master_seq. How do I do that?

JCL is a job control in basic.

Thanks.

Faeez

Posted: Thu Mar 31, 2011 1:22 am
by ray.wurlod
Put a Routine activity into the master sequence to read the user status area of the "JCL" job.