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
 
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: 4650
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: 757
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: 4650
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: 757
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 IBEGENER RETURN CODE 12 anilkumar922 All Other Mainframe Topics 5 Wed Dec 13, 2017 11:41 am
No new posts Finding the plan when code compiled u... Ahemad DB2 1 Fri Dec 01, 2017 6:38 pm
No new posts Strange Code amitc23 COBOL Programming 6 Tue Nov 28, 2017 11:25 am
This topic is locked: you cannot edit posts or make replies. ISREDIT Macro is not returning back t... nico_neoz CLIST & REXX 21 Sat Nov 18, 2017 7:40 pm
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm

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