Page 1 of 1

Submitting the JCL from REXX multiple times

PostPosted: Sun Jan 15, 2012 6:03 pm
by arunmlvtec
Hi,

I have a scenerio where I have to compare the number of records in the different outputs of the same process. I have to submit the JCL 2 times & I have to compare the records of both the outputs. I am using REXX for this. Once I am submitting the JCL manually. And 2nd time I am trying to do it through REXX & in REXX I am comparing the number of records in both the output files. If the records doesnot matches. I have to again submit the JCL & again compare the records in the output files.
The problem I am facing is that when I submit the job, it is processed in the back end. And the REXX program continues to executes & in the later part of time it gives me ABEND. can anybody give me solutions/suggestions for it?

Re: Submitting the JCL from REXX multiple times

PostPosted: Mon Jan 16, 2012 1:45 pm
by NicC
Your requirement is not fully understood. Are you

comparing 2 files for equality?
if not equal then compare again? (If so, why should they change between compares?)

You do NOT have a program that submits a job and then wait for that job - you are tying up resource that could be tied up for hours if the job does not run for some time. Just submit the job manually, Wait for results and resubmit again, if necessary.

Re: Submitting the JCL from REXX multiple times

PostPosted: Mon Jan 16, 2012 10:21 pm
by Pedro
And the REXX program continues to executes...


Instead of a single rexx program, split it into two. When the job finishes, manually execute rexx program two. (OR, add a second step to that batch job that executes rexx program two.) (OR, a three step job: 1) exec rexx program one, 2) compare step, and 3) execute rexx program two.)

Re: Submitting the JCL from REXX multiple times

PostPosted: Wed Jan 18, 2012 1:39 am
by arunmlvtec
Actually I am trying to automate the process of comparing the number of records. And the everytime the file would be having different data in the input. whenever we are submitting the job. So there can be a chance when we find the 2 outputs with equal records. and that time the program should exit from the loop.
Is there any concept of Queining for execution in REXX?

Re: Submitting the JCL from REXX multiple times

PostPosted: Wed Jan 18, 2012 2:02 am
by Pedro
Is there any concept of Queining for execution in REXX?


It is not clear what you are asking for. Please elaborate

Rexx is a powerful language. You can likely do what you want, but you must be clearer about what you want to do.