View previous topic :: View next topic
|
Author |
Message |
Help-Me-Out
New User
Joined: 09 Dec 2006 Posts: 56 Location: Pune
|
|
|
|
Hi,
I got one requirement where I need to look for the file which is coming from the 3rd party on daily basis with extn MON, TUE etc. if file does not receive by specific time then need to create empty file & process it.
I have tried using the LISTCAT command using the IDACAMS. it is working for the fixed file name.
Can we pass the parameter to the sort card. I have tried below but sortcard not working, giving error for the &DAY
//STEP1 EXEC PGM=IDCAMS,PARM=&DAY
//SYSIN DD *
LISTC ENT (TEST.DATA.&DAY)
//*
Can anybody suggest on this |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Help-Me-Out wrote: |
Hi,
I got one requirement where I need to look for the file which is coming from the 3rd party on daily basis with extn MON, TUE etc. if file does not receive by specific time then need to create empty file & process it.
I have tried using the LISTCAT command using the IDACAMS. it is working for the fixed file name.
Can we pass the parameter to the sort card. I have tried below but sortcard not working, giving error for the &DAY
//STEP1 EXEC PGM=IDCAMS,PARM=&DAY
//SYSIN DD *
LISTC ENT (TEST.DATA.&DAY)
//*
Can anybody suggest on this |
"sort card" is not a generic term fo SYSIN data. No, you can't do that. Try searching forum for IDCAMS examples from yesterday/day before.
How the file arriving? Most places don't have a chump sitting around checking manually for the existence of a file, but automate it. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you can not modify the contents of instream data with symbolics.
the hard way would be to precede the idcams step with a sort step
that would populate a &&temp/ds/pds(member) with the appropriate LISTC parm,
and change the SYSIN from an instream dataset to the output of the preceding sort step &&temp/ds/pds(member) |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Also, suggest you read about PARM in the AMS manual. PARM is different for different programs - some do not even recognise it. Blindly using such a thing could led to serious consequences if you just happen to hit a value that means something to the program totally different to what you think. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Help-Me-Out wrote: |
I got one requirement where I need to look for the file which is coming from the 3rd party on daily basis with extn MON, TUE etc. if file does not receive by specific time then need to create empty file & process it. |
1. Requirement is not totally told to us. What if you get the file once the empty file is already processed. Wait till tomorrow?
Quote: |
I have tried using the LISTCAT command using the IDACAMS. it is working for the fixed file name.
Can we pass the parameter to the sort card. I have tried below but sortcard not working, giving error for the &DAY
//STEP1 EXEC PGM=IDCAMS,PARM=&DAY
//SYSIN DD *
LISTC ENT (TEST.DATA.&DAY)
//*Can anybody suggest on this |
2. Where did you get the idea that IDCAMS will recognise "PARM=&DAY"? may be I mis-understood something. |
|
Back to top |
|
|
|