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

How to execute a particular step thru cobol program?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top