I written the following code and i expect the two JOB's (A and B) to be executed in ascending order by unfortunately the if i execute the REXX program once the submission is happening in the following order
1) JOB B,
2) JOB A and once again
Please find the below code:
/* Libraray definition -- starts -- */
FILEDSN = 'USER.TEST.ACTUAL'
SKELIB = 'USER.TEST.SKELE'
/* Libraray definition -- ends-- */
SAY 'PLEASE ENTER THE E-MAIL ID: '
IF datatype(mail_id) <> 'CHAR'
THEN SAY 'ENTERED MAIL-ID is wrong:'
SAY 'PLEASE ENTER THE COMPANY NAME:'
IF datatype(company_name) <> 'CHAR'
THEN SAY 'ENTERED COMPANY NAME is wrong:'
SAY 'Please enter the Company number :'
IF datatype(companynumber) <> 'NUM'
THEN SAY 'Company number entered is wrong:'
SAY 'Please enter date to be converted(YYYYMMDD):'
Joined: 01 Sep 2006 Posts: 2092 Location: Silicon Valley
It sounds like the result is that two Job A and two Job B are submitted. Does it happen every time?
I think you have residual data in the data set from prior executions. I noticed you set variable FILEDSN with a permanent data set and use it in LIBDEF ISPFILE. But then use FTOPEN TEMP and ZTEMPF. "LIBDEF ISPFILE" and "FTOPEN TEMP" are conflicting usages. Perhaps it is getting confused and using the same data set from a previous execution. I do not think you should use LIBDEF ISPFILE and rely on using a temporary data set.
Thanks a lot Mr.Pedro and Mr.Akatsukami for your time and valuable suggesstion on my issue.
I discussed with my collegue and he found an error that i have given TSO SUBMIT twice in my REXX program so control in ZTEMPF is not clear in executing the JOB's. so i changed my code accordingly with one TSO SUBMIT.
Now i was able to submit JOB A and then JOB B. now JOB B should be a Successor of JOB A , instead both the JOB's ran simultaneously.
So I merged the JOB A and JOB B into a single and i got my expected output.
Once again thanks a ton for your time and suggesstion.