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
 
Conditional setting of return-code after z/OS upgrade

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sanvan

New User


Joined: 22 Sep 2007
Posts: 3
Location: bellevue, wa

PostPosted: Wed Jan 31, 2018 11:05 pm    Post subject: Conditional setting of return-code after z/OS upgrade
Reply with quote

Since upgrading z/OS from v1.13 to v2.1, the final return-code of a step running in production is behaving differently.

We have a cobol program that sets the return-code conditionally. This is executed in our STEP0010. This program also contains DB2 and Report Writer. It was compiled under Cobol v3.4 and is running under Cobol v4.2.

Example: IF A = 0

MOVE 4

TO RETURN-CODE

END-IF.



The next step is bypassed when the return-code of the previous step is not zero.

Example: //STEP0020 EXEC PGM=IEBGENER,COND=(0,NE,STEP0010)

Since our upgrade of z/OS from v1.13 to v2.1, we have seen our STEP0010 end with an RC 0 despite the condition having been met to set the return-code to 4. Pulling the program down to a test environment, I can see the return-code being set to 4 and displaying the return-code just before GOBACK shows it is set to 4 but the job output will show the step as ending in 0 and the next step then executes.

Could this behavior be related to our upgrade of z/OS?

Thank you
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1786
Location: Bloomington, IL

PostPosted: Wed Jan 31, 2018 11:16 pm    Post subject:
Reply with quote

Copy and paste the JOB card here,
Back to top
View user's profile Send private message
sanvan

New User


Joined: 22 Sep 2007
Posts: 3
Location: bellevue, wa

PostPosted: Wed Jan 31, 2018 11:23 pm    Post subject:
Reply with quote

Jobcard is:

//LVO04600 JOB (1,LVO),'PAY FILE MRG',
// MSGCLASS=Z,
// PERFORM=%JSSPRFRM,
// PRTY=%JSSPRTY,
// MSGLEVEL=(1,1),
// REGION=0K,
// CLASS=%JSSCLASS
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 711
Location: Pennsylvania

PostPosted: Wed Jan 31, 2018 11:48 pm    Post subject:
Reply with quote

How are you invoking your DB2 program?

Are you calling IKJEFT01 or IKJEFT1B?

If you are using IKJEFT01 try using IKJEFT1B instead.
Back to top
View user's profile Send private message
sanvan

New User


Joined: 22 Sep 2007
Posts: 3
Location: bellevue, wa

PostPosted: Thu Feb 01, 2018 12:25 am    Post subject:
Reply with quote

The program is executed from a composite load.

INCLUDE SYSLIB(UUIOAD1)
INCLUDE SYSLIB(RSLVMKDT) RESOLVE IOMKDT9
INCLUDE SYSLIB(RSLVIVPB) RESOLVE IVHXPB1,PC8 - P B F
INCLUDE SYSLIB(RSLVIVEX) RESOLVE IVEXAI1 - DATA BASE ACCESS
INCLUDE PARMLIB(BATSERV) P-0041
INCLUDE PARMLIB(BATDSSC) P-0041
ENTRY UUIOAD1
NAME LUUIOAD(R)
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 309
Location: Maryland

PostPosted: Thu Feb 01, 2018 12:27 am    Post subject:
Reply with quote

daveporcelan wrote:
How are you invoking your DB2 program?
Are you calling IKJEFT01 or IKJEFT1B?
If you are using IKJEFT01 try using IKJEFT1B instead.

The running program of TS is in COBOL.
It has nothing to do with neither IKJEFT01 nor IKJEFT1B. I hope so.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 711
Location: Pennsylvania

PostPosted: Thu Feb 01, 2018 12:29 am    Post subject:
Reply with quote

I saw this in the original post:

Quote:
We have a cobol program that sets the return-code conditionally. This is executed in our STEP0010. This program also contains DB2 and Report Writer. It was compiled under Cobol v3.4 and is running under Cobol v4.2.


This is why I asked the question i did.

So what is the PGM= in the JCL?
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 309
Location: Maryland

PostPosted: Thu Feb 01, 2018 12:31 am    Post subject:
Reply with quote

daveporcelan wrote:
I saw this in the original post:
Quote:
We have a cobol program that sets the return-code conditionally. This is executed in our STEP0010. This program also contains DB2 and Report Writer. It was compiled under Cobol v3.4 and is running under Cobol v4.2.

This is why I asked the question i did.

DB2 also has nothing to do with neither IKJEFT01 nor IKJEFT1B.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 711
Location: Pennsylvania

PostPosted: Thu Feb 01, 2018 12:39 am    Post subject:
Reply with quote

At our shop we invoke all of our DB2 programs as follows.

I understand that IKJEFT1B is actually TSO, it plays a part in DB2 execution.

I also understand that IKJEFT01 and IKJEFT1B perform differently.

Code:
//JSTEP010   EXEC PGM=IKJEFT1B
//** CONTROL CARD
//SYSTSIN    DD *
DSN SYSTEM(PROD)
RUN PROGRAM(PROG01) -
PLAN(PLAN01)
END
/*
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1109
Location: Oostende, Belgium

PostPosted: Thu Feb 01, 2018 3:10 am    Post subject:
Reply with quote

sergeyken wrote:
daveporcelan wrote:
How are you invoking your DB2 program?
Are you calling IKJEFT01 or IKJEFT1B?
If you are using IKJEFT01 try using IKJEFT1B instead.

The running program of TS is in COBOL.
It has nothing to do with neither IKJEFT01 nor IKJEFT1B. I hope so.

If is's a COBOL+DB2 program, it has everything to do with IKJEFT01 or IKJEFT1B.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What will happen if we dont code STOP... Poha Eater COBOL Programming 4 Mon Jun 04, 2018 5:27 pm
No new posts JCL to set Return code when Time Out ... vinu78 JCL & VSAM 6 Wed May 30, 2018 11:27 am
This topic is locked: you cannot edit posts or make replies. Rexx code to find greater then symobl... Bharath Vikraman CLIST & REXX 8 Tue May 29, 2018 9:40 am
No new posts RESP2 code -502 pshongal CICS 6 Mon May 28, 2018 10:58 am
No new posts Code Coverage and static analysis too... Aditya.Srivastava PL/I & Assembler 2 Fri May 25, 2018 12:48 pm

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