IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

JCL to alter return code


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Mon Sep 10, 2007 8:47 pm
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

Superior Member


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

PostPosted: Mon Sep 10, 2007 9:08 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts DROP & ALTER PARTITION-PBR DB2 0
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top