View previous topic :: View next topic
|
Author |
Message |
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 216 Location: USA
|
|
|
|
Hi,
I need to get list of datasets using JCL only. Not using rexx or CLIST. I used the below JCL to execute DSLIST command. But it says that DSLIST command is not found.
Code: |
//STEP01 EXEC PGM=IKJEFT01
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSLIST 'USERID.COB*'
/* |
The output of SYSTSPRT
Code: |
READY
DSLIST 'NDVR.PROD.CDB.COB*'
IKJ56500I COMMAND DSLIST NOT FOUND
READY
END |
Can someone please correct my JCL?
Regards
Amar |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 216 Location: USA
|
|
|
|
Sorry forgot to edit the dataset in the log. The actual dataset got pasted. But JCL pasted is correct. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
what about using good ole IDCAMS ? |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 216 Location: USA
|
|
|
|
ya sure... No problem... But will it list all the datasets? I mean can we input wildcard to get the list of datasets? when I tried it using LISTCAT for IDCAMS it abended. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
when I tried it using LISTCAT for IDCAMS it abended. |
one of the most silly complaints I ever heard.
again
what about looking at the manuals ?
after so many posts You should know how to post correctly your requirement,
as posted is pretty generic, so the help You might get will be pretty generic too |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 216 Location: USA
|
|
|
|
When it got abended, I thought LISTCAT can't do the job. That is why my post was like that. Indeed the post was silly. I have corrected the LISTCAT jcl it worked fine. The JCL is as below.
Code: |
//JS10 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES(USERID.*)
/* |
It worked alright. Thank you.
My dataset is created on a particular day of a month. Those days are adhoc for every month. So I tried this idea to extract the recent creation of the dataset to find the last dataset. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
if You need to find out more than the dataset names and the volume where thy reside
IDCAMS will not be enough..
if You do not write any code look at the ISMF batch reporting facilities
it has pretty nice filtering options |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 216 Location: USA
|
|
|
|
Oh Thanks a lot for the information. |
|
Back to top |
|
|
|