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
 

 

EMPTY FILE - JOB ABENDS

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

New User


Joined: 22 Apr 2008
Posts: 32
Location: coimbatore

PostPosted: Fri Jul 25, 2014 1:42 am    Post subject: EMPTY FILE - JOB ABENDS
Reply with quote

The input file is empty and the job abends.I want to give a different rc and doesnt want by job to abend.

Can someone help me

IDCAMS SYSTEM SERVICES

PRINT INFILE(INDD) COUNT(1)
IDCAMS SYSTEM SERVICES
LISTING OF DATA SET -TSOCDAV.SPS261DP.R030.NEWACTY
IDC11462I REQUESTED RANGE END BEYOND END OF DATA SET.
IDC0005I NUMBER OF RECORDS PROCESSED WAS 0
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 4
IDCAMS SYSTEM SERVICES

IF LASTCC NE 0 THEN SET LASTCC=1

IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 4

Thanks!!
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


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

PostPosted: Fri Jul 25, 2014 1:48 am    Post subject:
Reply with quote

There's nothing obvious that would cause the job to abend (unless, like so many software engineers, you are misusing "abend" to mean "unexpected result"). Show the JCL enclosed in Code tags.
Back to top
View user's profile Send private message
d_sarlie

New User


Joined: 22 Apr 2008
Posts: 32
Location: coimbatore

PostPosted: Fri Jul 25, 2014 2:02 am    Post subject: Reply to: EMPTY FILE - JOB ABENDS
Reply with quote

Sysin:

PRINT INFILE(INDD) COUNT(1)
IF LASTCC NE 0 THEN SET LASTCC=1

JCL:


//R030G EXEC PGM=CONDCODE,PARM=IDCAMS,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//INDD DD DSN=JUY.UI,
// DISP=SHR
//SYSIN DD DSN=XXX.HJ(MY),
// DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=A
//CEEDUMP DD SYSOUT=A
//
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Fri Jul 25, 2014 2:18 am    Post subject:
Reply with quote

Sample to set the rc = 2 for Empty File:

Code:
//STEP010I EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//IN         DD DISP=SHR,DSN=MY DATASET
//SYSIN    DD *
  PRINT INFILE(IN) COUNT(1)
  IF LASTCC = 4 THEN
    DO
       SET MAXCC = 2
    END
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 461
Location: The Universe

PostPosted: Fri Jul 25, 2014 7:08 am    Post subject:
Reply with quote

You are actually running a program called CONDCODE. It appears CONDCODE runs the program specified in the PARM as a subroutine. When the program returns to CONDCODE, and the return code is non-zero, CONDCODE ABENDs. You can cure the ABEND by running IDCAMS directly (e.g., EXEC PGM=IDCAMS).
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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