IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Recursive execution of particular procedure in Jcl


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kpriya6

New User


Joined: 20 Nov 2006
Posts: 13

PostPosted: Thu Jan 04, 2007 3:09 pm
Reply with quote

Hi,
We need to execute one particular step for n times in Jcl. This n variable might be varying. Can we execute a single procedure multiple times?
How can we do that?

Thanks and Regards,
Priya
Back to top
View user's profile Send private message
adarsha

New User


Joined: 28 Dec 2006
Posts: 8
Location: Noida,Delhi

PostPosted: Thu Jan 04, 2007 5:37 pm
Reply with quote

u can do it bu flag restart step logic in JCl,

it executes the perticulat step until the flag value is set to 'n''
this value comes from previous step...
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jan 04, 2007 5:41 pm
Reply with quote

kpriya6 wrote:
Can we execute a single procedure multiple times?


Yes. You can code as many job steps as needed that all execute the same single procedure. Or, you can code many individual jobs that all execute the same single procedure.
Back to top
View user's profile Send private message
reddy307
Currently Banned

New User


Joined: 09 Jun 2006
Posts: 18

PostPosted: Thu Jan 04, 2007 6:12 pm
Reply with quote

Hi Adarsha,

can u plz let me know the example code for the flag restart
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Jan 04, 2007 10:15 pm
Reply with quote

Hello,

How does your process know when to quit?

If the information of how many times to run is known, you could implement a job that replicated the step n times and then send the created jcl through the internal reader (INTRDR).

Another alternative is to have the process check to see if it is done and then sent itself through the internal reader.
Back to top
View user's profile Send private message
adarsha

New User


Joined: 28 Dec 2006
Posts: 8
Location: Noida,Delhi

PostPosted: Sat Jan 06, 2007 11:30 am
Reply with quote

reddy307 wrote:
Hi Adarsha,

can u plz let me know the example code for the flag restart



hi,

the code differs from company standards...
FLGSTART is a program which is coded as like other
EXEC=pgm name....
u need to code a cobol program for that...
its difficult to code in this page..

ask the System Analyst or DBA is thr any set of in built pgms in your company..
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sun Jan 07, 2007 10:23 am
Reply with quote

Hi Priya,

Have any of the replies helped with what you want to do?

If not, let us know and we'll give it another try.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts Invoke stored procedure via batch JCL. DB2 2
No new posts Calling COBOL DB2 program from a COBO... COBOL Programming 2
No new posts Cond parameter and Rc code of a proce... JCL & VSAM 5
This topic is locked: you cannot edit posts or make replies. Internal Autonomous Stored Procedure ... DB2 6
Search our Forums:

Back to Top