Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us