IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need to get list of datasets using JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Mon Nov 26, 2012 5:05 pm
Reply with quote

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
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Mon Nov 26, 2012 5:07 pm
Reply with quote

Sorry forgot to edit the dataset in the log. The actual dataset got pasted. But JCL pasted is correct.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Nov 26, 2012 5:09 pm
Reply with quote

what about using good ole IDCAMS ?
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Mon Nov 26, 2012 5:21 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Nov 26, 2012 5:27 pm
Reply with quote

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
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Mon Nov 26, 2012 5:53 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Nov 26, 2012 5:56 pm
Reply with quote

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
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Mon Nov 26, 2012 6:11 pm
Reply with quote

Oh Thanks a lot for the information.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts List of quiesced jobs JCL & VSAM 3
Search our Forums:

Back to Top