Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rexx for getting a attributes of datasets into a file

Status
Not open for further replies.

Sukeshnair74

Programmer
Oct 31, 2005
6
0
0
US
Hi

I have a requirements to give a search in my system to find out all datasets that are in tapes which in volume starting with V*.
So first I need to get that list of datsets and then get
the attribites of the datasets ( like date created and modified).

Can I do this using rexx? Can someone provide a sample Rexx
routine for this.

Regards
Sukesh
 
You can do this with LISTC (to get the dataset names) and LISTDS or LISTDSI (to get their attributes) and those can be driven by REXX.

1. set up an OUTTRAP
2. LISTC the apropriate dataset level
3. close the OUTTRAP
4. for each DSN in the trap:
4a. LISTDSI dsname
4b. examine SYSVOLUME

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
How to get the last modified date of a dataset using REXX?
 
This is not a REXX facility, but rather an SMF facility.

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
Try This Example
/***********************Rexx***********************/
FILE_NAME="'Ur FILE_NAME'"
dsinfo=LISTDSI(FILE_NAME)
IF DSINFO == 0 THEN
DO
SAY 'Data Set Name..............:'SYSDSNAME
SAY 'Volume Serial ID...........:'SYSVOLUME
SAY 'Device Type................:'SYSUNIT
SAY 'Data Set Type..............:'SYSDSORG
SAY 'Record Format..............:'SYSRECFM
SAY 'Record Length..............:'SYSLRECL
SAY 'Record Block Size..........:'SYSBLKSIZE
SAY 'Key Length.................:'SYSKEYLEN
SAY 'Data Set Created...........:'SYSCREATE
SAY 'Data Set Last Referenced...:'SYSREFDATE
SAY 'Data Set Updated...........:'SYSUPDATED
SAY 'Data Set Type(PS/PDS)......:'SYSDSSMS
SAY DSINFO
END
ELSE
DO
SAY DSINFO
SAY 'Data Set Not Found!!'
END
EXIT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top