View previous topic :: View next topic
|
Author |
Message |
srini24
New User
Joined: 14 Feb 2017 Posts: 12 Location: India
|
|
|
|
Hi,
I want to execute only two steps say step 3 and step 15 of 20 Steps given in Catalogue procedure through JCL.
I find difficulty in executing the Step 15.
First I gave Cond=(0,LE) in the Job card and restart instruction to execute from Step 3 of my PROC such that Step 3 is executed normally and following are bypassed.
For Step 15 Execution,I tried to give Cond Override Parameter for Step 15 in the job step.
//J020 EXEC PROC,COND.STEP15=(4,LT,STEP3)
This is not working as expected.
Any ideas please.
Thanks |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2012 Location: USA
|
|
|
|
Idea #1:
Please, give any details, sample of real code (the involved parts of it), the trace of execution (with Return Codes), and clarification : what is "not working as expected"? |
|
Back to top |
|
|
srini24
New User
Joined: 14 Feb 2017 Posts: 12 Location: India
|
|
|
|
Below is the sample job which i have used for testing purpose.
I have two steps in the job namely J010 and J020.
Second Step J020 is executing a PROC named as PROCCHK having 5 steps from S010 TO S050.
I have given RESTART instruction to execute from S020 Step of PROCCHK and COND parameter as (0,LE) in the Job Card
Now,I want to run only S020 and S050 in the JOB.
When i run the job,S020 Step got executed with RC=0 and due to condition parameter in the job (0,LE),further steps are bypassed.
Condition parameter which i have overrided at the Step J020 for Procstep S050 is not working.
I want to execute by making changes only in JCL and not to touch the PROC.
Code: |
//JOBNAME JOB ACCT,CLASS=9,MSGCLASS=9,RESTART=J020.S020,
COND=(0,LE)
//J010 EXEC PGM=IEFRB14
// ....
//J020 EXEC PROCCHK,COND.S050=(4,LT)) |
Code: |
PROCCHK PROC
//S010 EXEC PGM=SORT
//S020 EXEC PGM=SORT
//S030 EXEC PGM=SORT
//S040 EXEC PGM=SORT
//S050 EXEC PGM=SORT |
[/quote][/code] |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
The easiest way, and you could have done it by now, is to copy the proc and delete the unwanted steps and executed the modified copy. Or cut and paste the two steps into a new member and make it into a job i.e. add job card etc and resolve any symbolic parameters. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
You should have a procedure to run one-off production jobs. Set up your job as advised and use that process to get it run. |
|
Back to top |
|
|
srini24
New User
Joined: 14 Feb 2017 Posts: 12 Location: India
|
|
|
|
I am aware to handle the process in test jcl by keeping only two steps in the proc and run.. But if there is any solution to execute the above scenario without touching the original proc and run the test jcl with any idea.. then it is welcome... I just want to know if JCL can do such execution... If no then it ok.. If Yes then i am curious to know how.. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2012 Location: USA
|
|
|
|
Any testing of unclear JCL parameters MUST BE PERFORMED using truncated and simplified JCL+PROC codes, not involving any production code, or data
After all unclear issues with the behavior of COND parameters have been resolved within this simplified test, the final logic must be incorporated/updated in the production code. |
|
Back to top |
|
|
srini24
New User
Joined: 14 Feb 2017 Posts: 12 Location: India
|
|
|
|
Firstly,Only after trying as much of scenarios,i posted to know any other feasible solutions..Yes..I went through the link..But i didn't get possible answer yet.
I am just curious to solve the problem.If anyone knows any solution,please kindly share it.
All other posts are obviously basics to be understood. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
When i run the job,S020 Step got executed with RC=0 and due to condition parameter in the job (0,LE),further steps are bypassed. |
This is normal and expected behavior -- if you use COND on a JOB statement, when the condition is true the system bypasses all remaining steps (directly from the JCL Reference manual). So if you are expecting to be able to use a JOB COND parameter to do what you want, then what you want to do is simply not possible. The same manual says that if you code COND on a job statement and on EXEC statements, and the JOB COND is true, the system will ignore all EXEC COND statements. |
|
Back to top |
|
|
srini24
New User
Joined: 14 Feb 2017 Posts: 12 Location: India
|
|
|
|
Robert Sample wrote: |
Quote: |
When i run the job,S020 Step got executed with RC=0 and due to condition parameter in the job (0,LE),further steps are bypassed. |
This is normal and expected behavior -- if you use COND on a JOB statement, when the condition is true the system bypasses all remaining steps (directly from the JCL Reference manual). So if you are expecting to be able to use a JOB COND parameter to do what you want, then what you want to do is simply not possible. The same manual says that if you code COND on a job statement and on EXEC statements, and the JOB COND is true, the system will ignore all EXEC COND statements. |
Thanks a lot.. This makes sense.. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Yes, it can be done but..you have to override the COND on ALL steps after the restart step. It took me all of 10 minutes to write a procedure, write the JCL deck and execute it 3 times with different condition code settings. And that time includes reading up on the JCLLIB and RESTART parameters as I have not used them for a number of years. |
|
Back to top |
|
|
|