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
 

 

JCL to alter return code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mbalaji2585
Warnings : 1

New User


Joined: 10 Nov 2006
Posts: 11
Location: mumbai

PostPosted: Mon Sep 10, 2007 7:53 pm    Post subject: JCL to alter return code
Reply with quote

This is my code

Code:

//STEP03  EXEC PGM=IDCAMS                           
//SYSPRINT DD SYSOUT=*                           
//FILEIN   DD DSN=DOC.TCSOFF.SAMPLE.NEW02,DISP=SHR
//SYSIN    DD *                                   
  PRINT INFILE(FILEIN) -                         
      CHARACTER COUNT(1)                         
  IF LASTCC > 0 THEN SET MAXCC = 14     
/*                                               


Here I am checking whether file is cataloged & for containing data.
Now I want to set the return code to be set as 14 (not necessary 14, any return code which is distinct , other than 4,12) if file not present and for empty data set.

But even if file is present with data , the return code is set to 14.
In sysprint it is showing that the highest condition code is 0 for
PRINT INFILE(FILEIN) -
CHARACTER COUNT(1)
.

Is there any flaw in JCL?

Thanks,
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 10, 2007 8:47 pm    Post subject: Reply to: JCL to alter return code
Reply with quote

Try it the way is shows after a slight editing.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Sep 10, 2007 9:08 pm    Post subject:
Reply with quote

JCL given should work, please post your SYSOUT messages.
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 16 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 DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am


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