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 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
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 Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am

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