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
 
How to execute a particular step thru cobol program?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
kolappan

New User


Joined: 26 May 2006
Posts: 5

PostPosted: Tue May 30, 2006 10:41 am    Post subject: How to execute a particular step thru cobol program?
Reply with quote

Hi,

My jcl have 5 steps. step01,step02,step03,etc..
In the first step 'step01' has some dsn is specified.

In cobol file section is using the step1's dsn as file1. If the file1 is reading sucessfully, I don't want go step2. I want go step3 directly. How to control the steps in jcl through cobol program?

Regards,
Kolappan
Back to top
View user's profile Send private message

David P

Active User


Joined: 11 Apr 2005
Posts: 106
Location: Cincinnati Ohio

PostPosted: Tue May 30, 2006 12:11 pm    Post subject:
Reply with quote

Hi Kolappan,

I am not very sure by "If the file1 is reading successfully" but I believe
you can achieve what you want by using the special cobol register
RETURN-CODE to change the return code in any special case you want.

And then you can set the condition code for step 2 accordingly.

For ex.
In your cobol program Under any condition

If............
COMPUTE RETURN-CODE = 8

Then in your Job for second step cond parameter
can be coded as
COND=(8,EQ)

This way you can skip execution of step 2 by setting the return code in step 1 cobol program.

Hope this would help.

Thanks
David P.
Back to top
View user's profile Send private message
kolappan

New User


Joined: 26 May 2006
Posts: 5

PostPosted: Tue May 30, 2006 1:34 pm    Post subject: Re: How to execute a particular step thru cobol program?
Reply with quote

Hi David,

Thanks now I am clear about it. Thanx for the reply. If you come across any more method to achive the same please let me know.

Regards,
Kolappan.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm

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