View previous topic :: View next topic
|
Author |
Message |
richu
New User
Joined: 03 Feb 2006 Posts: 8
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
srikm
New User
Joined: 19 May 2006 Posts: 4
|
|
|
|
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 |
|
|
|