Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Query on Conditional Execution in a JCL

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

New User


Joined: 02 Nov 2006
Posts: 10

PostPosted: Tue Jun 10, 2008 5:30 am    Post subject: Query on Conditional Execution in a JCL
Reply with quote

Hi,

Had a doubt if this could be done in a JCL.

I have 2 procs say Proc A and Proc B. Currently I am using 2 jobs to execute these procs. Is there a way I can use a single job to execute both the procs?

The only way to differentiate the processing is through a value provided in the SYSIN card. If the value in the Card is say "A" then run Proc A else for all the other cases run Proc B. Is there a way where in I can read the SYSIN within the proc and conditionally execute it depending on the value present in the SYSIN card.

Is it possible to SET a value in the job(this would be edited each time depending on the need), and make a check in a proc(Say Proc C) that if it has a value of "A" then execute the Proc A else execute Proc B?

If not in JCL, is there any other way to do other than writting a new Cobol program for this purpose.

TIA
Sriram
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Jun 10, 2008 5:42 am    Post subject:
Reply with quote

Sounds like an excellent application for a scheduling package.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 10, 2008 6:02 am    Post subject:
Reply with quote

Hello,

Using the scheduling software sounds like a winner.

You might also use only one PROC that executes the "A" half or the "B" half depending on a conditon code in a first step that reads the SYSIN and sets the conditon code accordingly.

Is there some reason that there must be 2 jobs instead of 1?
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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us