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

Job Termination as incoming file is empty


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
richu

New User


Joined: 03 Feb 2006
Posts: 8

PostPosted: Sat Apr 22, 2006 10:39 pm
Reply with quote

Hello all,

I want to write a JCL script , which accepts an incoming file from the third party
if the file is empty or not available when i run the job, my job gets terminated
with description as empty or missing file.

based on the file , whether empty or it has some data
i have to do some operation using JCL

How can i check if the incoming file is empty or it is not present
using JCL ? is their any way so that my job does not get abended.



Plz try to give me Eg./coding

Thanks in advance.

Rishikesh Mittal
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Sun Apr 23, 2006 3:36 am
Reply with quote

You can use the IDCAMS program to handle both circumstances (dataset is not cataloged or is empty). Search the Forums - there are plenty of examples of both if you need them.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sun Apr 23, 2006 8:43 pm
Reply with quote

See this DFSORT Trick:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst03.html#t10
Back to top
View user's profile Send private message
srikm

New User


Joined: 19 May 2006
Posts: 4

PostPosted: Fri May 19, 2006 8:42 pm
Reply with quote

You can use IDCAMS utility....

//step1 exec pgm=IDCAMS
//infile dd dsn=km.km.km,disp=shr
//sysprint dd sysout=*
//sysin dd *
print infile(infile) count(1)
/*
//(if step1.rc eq 0)
next steps
-----
----
----


Your Job will not abend if file is empty


any other sugestions ...
Thanks
KMSrinivas
09880191795
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top