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
 

 

RETURNING A BAD RETURN CODE FROM COBOL PROG TO JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: RETURNING A BAD RETURN CODE FROM COBOL PROG TO JCL
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

Moderator Team Head


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

PostPosted: Mon Sep 25, 2006 5:50 pm    Post subject: Re: RETURNING A BAD RETURN CODE FROM COBOL PROG TO JCL
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: 755
Location: Germany

PostPosted: Mon Sep 25, 2006 5:55 pm    Post subject:
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    Post subject: Re: RETURNING A BAD RETURN CODE FROM COBOL PROG TO JCL
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    Post subject:
Reply with quote

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

Moderator Team Head


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

PostPosted: Mon Sep 25, 2006 6:00 pm    Post subject: Re: RETURNING A BAD RETURN CODE FROM COBOL PROG TO JCL
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: 755
Location: Germany

PostPosted: Mon Sep 25, 2006 6:00 pm    Post subject:
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    Post subject: Re: RETURNING A BAD RETURN CODE FROM COBOL PROG TO JCL
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    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 EXIT or RETURN cvnlynn CLIST & REXX 8 Wed Jul 19, 2017 2:50 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 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 IDMS DC027007 T58 TASK:ADS2 PROG:ADSO... gpowell382 IDMS/ADSO 2 Fri Jun 30, 2017 11:52 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm


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