Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Cond parameter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
srini24

New User


Joined: 14 Feb 2017
Posts: 7
Location: India

PostPosted: Sun Sep 09, 2018 2:06 am    Post subject: Cond parameter
Reply with quote

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
View user's profile Send private message

sergeyken

Active User


Joined: 29 Apr 2008
Posts: 364
Location: Maryland

PostPosted: Sun Sep 09, 2018 3:00 am    Post subject:
Reply with quote

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
View user's profile Send private message
srini24

New User


Joined: 14 Feb 2017
Posts: 7
Location: India

PostPosted: Sun Sep 09, 2018 1:11 pm    Post subject: Reply to: Cond parameter
Reply with quote

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))



Quote:
PROC DETAILS:


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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2090
Location: UK

PostPosted: Sun Sep 09, 2018 3:10 pm    Post subject: Reply to: Cond parameter
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2090
Location: UK

PostPosted: Sun Sep 09, 2018 7:09 pm    Post subject: Reply to: Cond parameter
Reply with quote

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
View user's profile Send private message
srini24

New User


Joined: 14 Feb 2017
Posts: 7
Location: India

PostPosted: Sun Sep 09, 2018 9:48 pm    Post subject: Reply to: Cond parameter
Reply with quote

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
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 364
Location: Maryland

PostPosted: Sun Sep 09, 2018 11:04 pm    Post subject:
Reply with quote

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
View user's profile Send private message
srini24

New User


Joined: 14 Feb 2017
Posts: 7
Location: India

PostPosted: Sun Sep 09, 2018 11:52 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8390
Location: Dubuque, Iowa, USA

PostPosted: Mon Sep 10, 2018 12:03 am    Post subject: Reply to: Cond parameter
Reply with quote

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
View user's profile Send private message
srini24

New User


Joined: 14 Feb 2017
Posts: 7
Location: India

PostPosted: Mon Sep 10, 2018 12:52 am    Post subject: Re: Reply to: Cond parameter
Reply with quote

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.. icon_idea.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2090
Location: UK

PostPosted: Mon Sep 10, 2018 1:17 pm    Post subject: Reply to: Cond parameter
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL COND CODE check juares castro JCL & VSAM 5 Tue Jun 26, 2018 7:43 pm
No new posts Dynamically updating the MQ monitorin... Anilkumarmq Java & MQSeries 0 Fri Jun 08, 2018 2:05 pm
No new posts To Understand EXECIO Read Parameter OPEN Ilavenil CLIST & REXX 2 Tue May 29, 2018 1:59 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts DUMMY When do I need add a DCB parameter Martylin JCL & VSAM 3 Fri Dec 08, 2017 7:20 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us