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
 

 

Job Termination as incoming file is empty

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Job Termination as incoming file is empty
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

Moderator Team Head


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

PostPosted: Sun Apr 23, 2006 3:36 am    Post subject: Re: Job Termination as incoming file is empty
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 Moderator


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

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

See this DFSORT Trick:

http://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    Post subject:
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    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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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