View previous topic :: View next topic
|
Author |
Message |
amar naik
New User
Joined: 29 Aug 2007 Posts: 8 Location: NY
|
|
|
|
I am having an input dataset called PRWTSSS.DNLD.INPSTM.DXYYDDD1. This is created by a different system. If the file is empty then predecessor job does not catalog the file. So our jobs fail. i tried the below step
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)
//*
|
but it will create a dataset by the name PRWTSSS.DNLD.INPSTM.DXYYDDD1, if it does not exist. Our system does not have permissions to create a file with high level qualifier as PRWTSSS.
I can use the below code to check if a dataset exists
Code: |
//*************************************
//* RC=0 - DATASET HAS RECS *
//* RC=4 - DATASET EMPTY *
//* RC=12 - DATASET NOT FOUND *
//*************************************
//STEP0100 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT IDS('PRWTSSS.DNLD.INPSTM.DXYYDDD1') CHARACTER COUNT(1)
/*
|
The last qualifier in file DXYYDD1 is populated run time. For 20th sept it will be DX072831 etc
so my problem is not yet resolved. Please advise. |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
You can write a SORT statement to create the PRINT IDS card with required date format, and then use this output file as SYSIN in your IDCAMS. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Are you planning on continuing this topic at this site or are you going to continue it at both sites. |
|
Back to top |
|
|
amar naik
New User
Joined: 29 Aug 2007 Posts: 8 Location: NY
|
|
|
|
both sites..i am just trying to get the answer...once i get answer i will post it |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
So this
Code: |
//*************************************
//* RC=0 - DATASET HAS RECS *
//* RC=4 - DATASET EMPTY *
//* RC=12 - DATASET NOT FOUND *
//*************************************
//STEP0100 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT IDS('PRWTSSS.DNLD.INPSTM.DX072831') CHARACTER COUNT(1)
/*
|
ought to work for you. |
|
Back to top |
|
|
amar naik
New User
Joined: 29 Aug 2007 Posts: 8 Location: NY
|
|
|
|
yes, but my problem is that my file name keeps chaging
file name will be
PRWTSSS.DNLD.INPSTM.DX072831 on 10th oct
PRWTSSS.DNLD.INPSTM.DX072841 on 11th oct.. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Yeah, I know, I got the point from the original post.
Obviously, you need to create a utility that will provide the proper value for the dataset name to the IDCAMS program for that run. Devzee offered one suggestion, but you have plenty of options to take advantage of. It would help us to know what the algorithm you're using for that field (some sort of Julian date??) is. |
|
Back to top |
|
|
amar naik
New User
Joined: 29 Aug 2007 Posts: 8 Location: NY
|
|
|
|
yes it is julian date |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
amar naik wrote: |
both sites..i am just trying to get the answer...once i get answer i will post it |
Don't let Kolusu catch you..... |
|
Back to top |
|
|
amar naik
New User
Joined: 29 Aug 2007 Posts: 8 Location: NY
|
|
|
|
I am just looking for help. Kolusu has been kind enough to help me. since i was not getting any response i was googling around. i found the reference to this website. so hopefully he understands. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
amar naik wrote: |
hopefully he understands. |
Hopefully, yes, maybe....
Read the forum rules and attempt to abide by them (no matter how draconian they may seem).... |
|
Back to top |
|
|
|