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

RETURNING A BAD RETURN CODE FROM COBOL PROG TO JCL


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

New User


Joined: 25 Jul 2005
Posts: 92
Location: India

PostPosted: Mon Sep 25, 2006 5:00 pm
Reply with quote

Hi,

How do you return a bad return code from a cobol program to the job ?
Also how do you send a bad return code to the cobol program from the JCL to the program ?

Please let me know...

Regards.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Mon Sep 25, 2006 5:50 pm
Reply with quote

What do you consider to be a "bad" return-code vs. a "good" one?
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Mon Sep 25, 2006 5:55 pm
Reply with quote

Hi !

What means BadReturnCode? From a CobolProgramm you could send an RC to JCL by using the field return-code.

Move 16 to return-code.

Then in JCL you could handel the rc-16.

The other way is to transfer a parameter from JCL to the CobolProgramm.

STEP090 EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSTSIN DD *
PROFILE
DSN SYSTEM(DB2T)
RUN PROGRAM(MDL50310) PLAN(GK210307) PARM('VEDL 16 FF 0000')
END
//*

So programm gets 'VEDL 16 FF 0000' as a parameter at ProgrammStart.
Be shure that you handel parm in your programm correctly. Define parm
fields in linkage.

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

New User


Joined: 25 Jul 2005
Posts: 92
Location: India

PostPosted: Mon Sep 25, 2006 5:57 pm
Reply with quote

I am sorry for typing it that way. All I needed was how do I send a return code (e.g. 60) over to the job ? And how do I do the same from the job to the cobol program ?
Back to top
View user's profile Send private message
murali922

New User


Joined: 25 Jul 2005
Posts: 92
Location: India

PostPosted: Mon Sep 25, 2006 5:59 pm
Reply with quote

Thanks Umeysan !
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Mon Sep 25, 2006 6:00 pm
Reply with quote

Jobs don't return codes back to any programs. What you're asking for is a function that doesn't exist in JCL.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Mon Sep 25, 2006 6:00 pm
Reply with quote

Hi !

So, that's wat I descibed in my answer.
Regards, UmeySan
Back to top
View user's profile Send private message
murali922

New User


Joined: 25 Jul 2005
Posts: 92
Location: India

PostPosted: Mon Sep 25, 2006 8:05 pm
Reply with quote

Ok. Thanks Superk.
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 Replace each space in cobol string wi... COBOL Programming 2
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts run rexx code with jcl CLIST & REXX 15
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Compile rexx code with jcl CLIST & REXX 6
Search our Forums:

Back to Top