View previous topic :: View next topic |
Author |
Message |
anaik Beginner
Joined: 31 Jan 2007 Posts: 20 Topics: 6
|
Posted: Wed Aug 29, 2007 9:44 am Post subject: checking file |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Wed Aug 29, 2007 9:49 am Post subject: |
|
|
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 |
|
 |
anaik Beginner
Joined: 31 Jan 2007 Posts: 20 Topics: 6
|
Posted: Wed Aug 29, 2007 9:58 am Post subject: |
|
|
i do not own the job |
|
Back to top |
|
 |
anaik Beginner
Joined: 31 Jan 2007 Posts: 20 Topics: 6
|
Posted: Wed Aug 29, 2007 10:01 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Wed Aug 29, 2007 10:02 am Post subject: |
|
|
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 |
|
 |
anaik Beginner
Joined: 31 Jan 2007 Posts: 20 Topics: 6
|
Posted: Wed Aug 29, 2007 10:28 am Post subject: |
|
|
thanks |
|
Back to top |
|
 |
|
|