Page 1 of 2

IDCAMS not able to find a PS

PostPosted: Tue Sep 03, 2013 2:36 pm
by Nik22Dec
Hi All,

Can I please seek your advice on an issue. I am running a simple IDCAMS step. The SYSIN looks like this -

  LISTCAT ENTRIES (FILE1) ALL       


Now, this FILE1 is FTP'ed to Mainframe by an external entity. When I run my IDCAMS utility on the actual PS, it always shows this PS as non-existing with the below given error message.

IDC3012I ENTRY FILE1 NOT FOUND                               
IDC3009I ** VSAM CATALOG RETURN CODE IS 8 - REASON CODE IS IGG0CLEG-42       
IDC1566I ** FILE1 NOT LISTED                                 


But, if I make a new copy of this PS & run my IDCAMS on that, the step runs fine & acknowledges that the copied PS exists.

I am wondering why the same IDCAMS step is not able to find the actual PS but is able to find its copy.

Re: IDCAMS not able to find a PS

PostPosted: Tue Sep 03, 2013 3:38 pm
by steve-myers
I don't understand. How did you "copy" a data set that does not exist?

Re: IDCAMS not able to find a PS

PostPosted: Tue Sep 03, 2013 3:43 pm
by enrico-sorichetti
LISTCAT ENTRIES (FILE1) ALL


post the FULL jcl used

Re: IDCAMS not able to find a PS

PostPosted: Tue Sep 03, 2013 4:57 pm
by Nik22Dec
I am so sorry for the confusion. The dataset did exist for us to copy.

The full JCL is -

//STIDCAMS EXEC PGM=IDCAMS 
//SYSPRINT DD  SYSOUT=*,       
//              UNIT=,SPACE=         
//INFILE   DD  DSN=NULLFILE,DISP=SHR   
//OUTFILE  DD  DSN=NULLFILE,DISP=SHR,       
//            UNIT=,VOL=SER=,       
//             SPACE=,                     
//             DCB=,               
//            DATACLAS=                 
//SYSIN    DD  *
  LISTCAT ENTRIES (actual file name) ALL         
*

Re: IDCAMS not able to find a PS

PostPosted: Tue Sep 03, 2013 5:37 pm
by NicC
Why do you specify INFILE and OUTFILE when all you are doing is a catalog search? And why do you specify UNIT and SPACE for SYSOUT? These should not affect the task but they are sloppy JCL.

Re: IDCAMS not able to find a PS

PostPosted: Tue Sep 03, 2013 6:15 pm
by Ed Goodman
Pretty sure the listcat only works if the file is cataloged. Do you have the output from the FTP step where it actually saved the file? It's possible it didn't really work, and it's also possible a freak option is not letting it catalog.

Can you see the file in ISPF using something like option 3.4?

Re: IDCAMS not able to find a PS

PostPosted: Tue Sep 03, 2013 10:57 pm
by Nik22Dec
Ed Goodman wrote:Pretty sure the listcat only works if the file is cataloged. Do you have the output from the FTP step where it actually saved the file? It's possible it didn't really work, and it's also possible a freak option is not letting it catalog.

Can you see the file in ISPF using something like option 3.4?


This seems to be possible, Ed. Thank you so much! I am at home right now but will check the FTP step first thing in the morning tomorrow. I could never see the file in ISPF. As soon as it hits us, it gets copied & deleted. Thank you so much for the idea!

Re: IDCAMS not able to find a PS

PostPosted: Tue Sep 03, 2013 11:00 pm
by Nik22Dec
NicC wrote:Why do you specify INFILE and OUTFILE when all you are doing is a catalog search? And why do you specify UNIT and SPACE for SYSOUT? These should not affect the task but they are sloppy JCL.

I know but can't help it. Standard at the floor.

Re: IDCAMS not able to find a PS

PostPosted: Wed Sep 04, 2013 9:58 am
by steve-myers
...
//SYSPRINT DD  SYSOUT=*,       
//              UNIT=,SPACE=         
...
The use of UNIT and SPACE parameters like these was was sort of common for SYSOUT 40+ years ago
for "standard" OS/360 JCL. Why they would be used these days is a mystery to me!
...
//INFILE   DD  DSN=NULLFILE,DISP=SHR   
//OUTFILE  DD  DSN=NULLFILE,DISP=SHR,       
//            UNIT=,VOL=SER=,       
//             SPACE=,                     
//             DCB=,               
//            DATACLAS=                 
...
The only reason I can think of for these statements is to provide a partially completed place for overrides. Just sitting there by themselves does no harm.

Re: IDCAMS not able to find a PS

PostPosted: Tue Sep 10, 2013 10:23 am
by Nik22Dec
Hi All,

Thanks so much for your inputs. It was the catalog issue only. The file was not getting cataloged properly and hence, IDCAMS was not able to identify the file.