Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need to get list of datasets using JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 189
Location: INDIA

PostPosted: Mon Nov 26, 2012 5:05 pm    Post subject: Need to get list of datasets using JCL
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: 189
Location: INDIA

PostPosted: Mon Nov 26, 2012 5:07 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Nov 26, 2012 5:09 pm    Post subject: Reply to: Need to get list of datasets using JCL
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: 189
Location: INDIA

PostPosted: Mon Nov 26, 2012 5:21 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Nov 26, 2012 5:27 pm    Post subject: Reply to: Need to get list of datasets using JCL
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: 189
Location: INDIA

PostPosted: Mon Nov 26, 2012 5:53 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Nov 26, 2012 5:56 pm    Post subject: Reply to: Need to get list of datasets using JCL
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: 189
Location: INDIA

PostPosted: Mon Nov 26, 2012 6:11 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DUMP DATASETS VS TRACE DATASETS! lind sh CICS 4 Tue Dec 06, 2016 11:31 pm
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts reorder screeNS using SWAP LIST? mrsidhu12 TSO/ISPF 5 Thu Sep 01, 2016 2:19 pm
No new posts Getting list of tables defined under ... kishpra DB2 2 Wed Aug 24, 2016 10:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us