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: 4649
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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