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

how to get list of all VSAM/non-VSAM datasets defined in MF


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ISB

New User


Joined: 15 Feb 2022
Posts: 6
Location: India

PostPosted: Tue Feb 15, 2022 9:56 pm
Reply with quote

Hi All,

I need to get a list of all the active VSAMs / PS/ GDGs in the mainframe batch application. I think we can get it from the catalog, but I am looking for a way to extract the whole list of datasets it holds. Possibly an IDCAMS export, backup or SHOWCAT or a LISTCAT parameter might help, but I need to know how to code and execute it. Please suggest.

Thanks,
IB
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Tue Feb 15, 2022 10:27 pm
Reply with quote

Specify what you want to see from Catalog. Samples always are helpful to help you finding a solution.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 581
Location: London

PostPosted: Wed Feb 16, 2022 2:21 am
Reply with quote

This is impossible to answer without some useful information. There's potentially several ways to do this with different utilities or SMF but it all depends on local knowledge that only people in your local site would know.

What does the application even consist of...one job, or hundreds? How often do they all run?

Is it really ONLY Batch, or are there CICS or other applications using the datasets as well?

Are the datasets identifiable by the dataset names, or part of the names?
Back to top
View user's profile Send private message
ISB

New User


Joined: 15 Feb 2022
Posts: 6
Location: India

PostPosted: Wed Feb 16, 2022 6:36 am
Reply with quote

Its a tricky situation actually. I am supporting a migration team and need to prepare a seed list of the files needed to be migrated. But we do not have co operation or support from the local MF team (resistance). We just have an operations team that would try to do the commands we ask them to execute and give us information.
The batch application has hundreds of jobs, that run as part of daily cycle, weekly, monthly, adhoc, triggered, etc. There are online systems and other applications accessing a few of those VSAMs and files as well.
We have prepared a seed list from our target environment's test cycles, but that might not be complete. So I want to get a list of all active / being used files on MF and then find out the missing ones. Just a dump of Catalog might give us many extra, obsolete, unused files. So trying to figure out a way to get list of active ones.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Wed Feb 16, 2022 2:09 pm
Reply with quote

I will suggest SMF types 14 and 15, as they will give you the job- and datasetnames for input and output respectively. SMF type 61-6 might be useful too as they deal with VSAM datasets and ICF catalog actions.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Wed Feb 16, 2022 2:09 pm
Reply with quote

I will suggest SMF types 14 and 15, as they will give you the job- and datasetnames for input and output respectively. SMF type 61-6 might be useful too as they deal with VSAM datasets and ICF catalog actions.
Back to top
View user's profile Send private message
ISB

New User


Joined: 15 Feb 2022
Posts: 6
Location: India

PostPosted: Wed Feb 16, 2022 2:25 pm
Reply with quote

Sure thanks, let me try that.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Wed Feb 16, 2022 2:39 pm
Reply with quote

the DAF program from Use [URL] BBCode for External Links might be useful.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Feb 17, 2022 11:34 pm
Reply with quote

Quote:
in the mainframe batch application


This term is not clear to me. Are you truly interested in one application among many or are you interested in all batch jobs?
Back to top
View user's profile Send private message
ISB

New User


Joined: 15 Feb 2022
Posts: 6
Location: India

PostPosted: Fri Feb 18, 2022 2:00 pm
Reply with quote

all batch jobs
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Sun Feb 20, 2022 11:33 am
Reply with quote

Run some IDCAMS jobs. I think you need a multiple step approach:
Code:
//STEP2    EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
LISTCAT ALIAS
/*


That should return a list of high level qualifiers. From that list, build another IDCAMS job with a bunch of commands.
Code:
LISTCAT LEVEL(PEDRO)
LISTCAT LEVEL(IB)
LISTCAT LEVEL(JEORG)
LISTCAT LEVEL(PETE)


The LISTCAT command further allows you to select only GDG, CLUSTER or NONVSAM, for example:
Code:

 LISTCAT LEVEL(PEDRO) GDG


You asked for batch jobs... from LISTCAT, you cannot tell if it was for batch or from other usage.

You asked for PS... specifying NONVSAM will give you PS and PDS (maybe others??).

You asked for 'active' datasets. You cannot really determine that through the catalog. Use SMF records as others have recommended. Though, I think the last reference date for PS and PDS is available in ISPF option 3.4. You have to scroll to the right.

The LISTCAT command syntax:
www.ibm.com/docs/en/zos/2.1.0?topic=subcommands-listcat-command

Sample job:
www.ibm.com/docs/en/zos-basic-skills?topic=utilities-idcams-use-access-method-services-catalogs
Back to top
View user's profile Send private message
ISB

New User


Joined: 15 Feb 2022
Posts: 6
Location: India

PostPosted: Sun Feb 20, 2022 4:48 pm
Reply with quote

These details are helpful. Thank you all so much !
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Mon Feb 21, 2022 7:39 pm
Reply with quote

Quote:
The batch application has hundreds of jobs


You may want to create a list of Datasets used by the Jobs mentioned above.

You can look at the Production Joblib and Proclib datasets.

I am unsure what tools you have available, but XREFPLUS from SEA is very useful at expanding Procs and resolving Symbolic variables. Otherwise you will need to do it yourself (cumbersome).

Then use a series of SORT and Rexx utilities to extract the dataset names from your expanded JCL.

This is another way to identify the 'active' datasets.

This is what we had done to identify usage at a client site.

Just another option.
Back to top
View user's profile Send private message
ISB

New User


Joined: 15 Feb 2022
Posts: 6
Location: India

PostPosted: Mon Feb 21, 2022 8:09 pm
Reply with quote

yeah, that would have been my approach, but as I said, we dont have support from MF team and cant really get tools to run there. So wanted to explore other options.
Thank you much!
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 Access to non cataloged VSAM file JCL & VSAM 18
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts CVDA value for RRDS VSAM dataset. CICS 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top