MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

checking file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
anaik
Beginner


Joined: 31 Jan 2007
Posts: 20
Topics: 6

PostPosted: Wed Aug 29, 2007 9:44 am    Post subject: checking file Reply with quote

Hello,

Every month a predecessor job does not create a output file if their is no data in it. My job runs after the above job runs. But if the input dataset is not created then i get a JCL error. How can avoid the JCL error. for example : check if the input dataset is present or not. If not i can bypass the processing step and avoid the JCL error. The dataset is of the format PRWTSSS.DNLD.GGG011.DEVREG.DXDDD1. The last qualifier 'DDD' is populated based on the date the job runs.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Wed Aug 29, 2007 9:49 am    Post subject: Reply with quote

Quote:

Every month a predecessor job does not create a output file if their is no data in it. My job runs after the above job runs

anaik,

Why not let the job which creates the files trigger your job. If the file is created have the job trigger your job.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
anaik
Beginner


Joined: 31 Jan 2007
Posts: 20
Topics: 6

PostPosted: Wed Aug 29, 2007 9:58 am    Post subject: Reply with quote

i do not own the job
Back to top
View user's profile Send private message
anaik
Beginner


Joined: 31 Jan 2007
Posts: 20
Topics: 6

PostPosted: Wed Aug 29, 2007 10:01 am    Post subject: Reply with quote

the jobs are scheduled to run once the predecessor jobs runs. they are not triggered on individual files. we have a different team which schedules our job. They have advised me to handle it in my jobs.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Wed Aug 29, 2007 10:02 am    Post subject: Reply with quote

anaik,

Code a IEFBR14 step with disp=mod prior to your actual processing step.If the dataset exist it will continue or else it will allocate an empty dataset

Code:

//STEP0100 EXEC PGM=IEFBR14
//*
//FILE01    DD DSN=YOUR MISSING FILE,
//             DISP=(MOD,CATLG,DELETE),
//             UNIT=SYSDA,
//             SPACE=(TRK,(1,1),RLSE),
//             DCB=(LRECL=ZZZ,RECFM=FB,BLKSIZE=0)
//*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
anaik
Beginner


Joined: 31 Jan 2007
Posts: 20
Topics: 6

PostPosted: Wed Aug 29, 2007 10:28 am    Post subject: Reply with quote

thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group