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

CLIST or Rexx to automatically find the expiration date


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mahua Mitra

New User


Joined: 26 Apr 2007
Posts: 49
Location: Delhi

PostPosted: Tue Aug 21, 2007 11:59 am
Reply with quote

Hi
I have 'n' number of files. My requirement is to find the expiration date of those datasets(they are all GDG versions) automatically,using CLIST or Rexx.
Can anyone help me plz

Thanks
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Aug 21, 2007 12:19 pm
Reply with quote

I would suggest using the ISPF service DSINFO, which saves the expiration date in the dialog variable ZDSXDATE.

Also, when using the ISPF service LMDLIST with STATS(YES), it will save the expiration date in the dialog variable ZDLEDATE.

If you don't like ISPF services, you can use the TSO/E external function LISTDSI, which populates the REXX variable SYSEXDATE with the expiration date.

Another option is to use the TSO command LISTDS with the HISTORY parameter, trap the output and parse it.

O.
Back to top
View user's profile Send private message
Mahua Mitra

New User


Joined: 26 Apr 2007
Posts: 49
Location: Delhi

PostPosted: Tue Aug 21, 2007 4:11 pm
Reply with quote

How can we exactly use LISTDS?
Back to top
View user's profile Send private message
Mahua Mitra

New User


Joined: 26 Apr 2007
Posts: 49
Location: Delhi

PostPosted: Tue Aug 21, 2007 4:23 pm
Reply with quote

Sorry
How can we use LISTDSI??
Back to top
View user's profile Send private message
Mahua Mitra

New User


Joined: 26 Apr 2007
Posts: 49
Location: Delhi

PostPosted: Tue Aug 21, 2007 4:51 pm
Reply with quote

Hi
Say, I have a member which has the following code:
x = LISTDSI(work.exec)
SAY 'Function code from LISTDSI is: ' x
SAY 'The data set name is: ' sysdsname
SAY 'The device unit on which the volume resides is:' sysunit
SAY 'The record format is: ' sysrecfm
SAY 'The logical record length is: ' syslrecl
SAY 'The block size is: ' sysblksize
SAY 'The allocation in space units is: ' sysalloc
SAY 'Type of RACF protection is: ' sysracfa

How should I execute it?

Thanks
Mahua
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Aug 21, 2007 4:52 pm
Reply with quote

Have you read the manual? There are some good examples there...

O.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Aug 21, 2007 4:53 pm
Reply with quote

Why not use the links that Ofer has supplied you ???
Back to top
View user's profile Send private message
Mahua Mitra

New User


Joined: 26 Apr 2007
Posts: 49
Location: Delhi

PostPosted: Tue Aug 21, 2007 5:02 pm
Reply with quote

In the links, the result set is given but not how to execute it.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Aug 21, 2007 6:57 pm
Reply with quote

u can also call LISTDSI to get the expiry date

Code:
CALL LISTDSI "'YOUR.DATASET.NAME.HERE'"             
SAY 'SYSEXDATE --> ' SYSEXDATE                   
EXIT   



Quote:
but not how to execute it.


Create a member in a PDS allocated to either SYSEXEC or SYSPROC. Code the commands and then type EXEC to execute the code.
Back to top
View user's profile Send private message
Mahua Mitra

New User


Joined: 26 Apr 2007
Posts: 49
Location: Delhi

PostPosted: Wed Aug 22, 2007 12:21 pm
Reply with quote

Can you please let me know how to allocate a PDS to either SYSEXEC or SYSPROC?
Back to top
View user's profile Send private message
t_ctaram

New User


Joined: 15 May 2007
Posts: 20
Location: mumbai

PostPosted: Wed Aug 22, 2007 1:01 pm
Reply with quote

hi Mahua,

The below nmentioned code can be used for allocating your pds to SYSEXEC or SYSPROC

1. SYSEXEC:

"EXECUTIL SEARCHDD(yes)" /* to ensure that SYSEXEC is available*/
"ALLOC FILE(SYSEXEC) DATASET(rexx.exec,",
"'isp.phone.exec') SHR REUSE"
IF RC = 0 THEN
SAY 'Allocation to SYSEXEC completed.'
ELSE
SAY 'Allocation to SYSEXEC failed.'

2. SYSPROC:

"ALLOC FILE(SYSPROC) DATASET(rexx.exec,",
"'icq.infocntr.icqclib',",
"'sys1.tso.clist',",
"'isp.ispf.clists') SHR REUSE"
IF RC = 0 THEN
SAY 'Allocation to SYSPROC completed.'
ELSE
SAY 'Allocation to SYSPROC failed.'


Note:-
1. you need to check what PDS are already allocated to SYSEXEC and SYSPROC.
for that use :

READY
listalc status

the above command will give what all PDS allocated.

here in the example

ISP.PHONE.EXEC is allocated to SYSEXEC, and
three data sets ICQ.INFOCTR.ICQCLIB, SYS1.TSO.CLIST, and
ISP.ISPF.CLISTS are allocated to SYSPROC.

2. the PDS which you have allocated for you execs should have the same attributes of the PDS which were allocated to SYSEXEC or SYSPROC.

if you have any doubts please refer to the manuals.
Ctaram
Back to top
View user's profile Send private message
Mahua Mitra

New User


Joined: 26 Apr 2007
Posts: 49
Location: Delhi

PostPosted: Wed Aug 22, 2007 4:54 pm
Reply with quote

When I am trying to execute it, its showing an error:
DATA SET LISTDSI.LOAD NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
MISSING DATA SET NAME+
MISSING DSNAME (MEMBER NAME)
***

please suggest.

Thanks
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Aug 22, 2007 5:35 pm
Reply with quote

Search the forum for the procedure for allocating the dataset to SYSEXEC or SYSPROC. Given below is one of them.

http://ibmmainframes.com/viewtopic.php?t=6467&highlight=sysproc
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 23, 2007 3:12 pm
Reply with quote

You could use IGGCSIRX (example in SYS1.SAMPLIB(IGGCSIRX) )

Info at http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2C130/CCONTENTS?DT=20040708120541

This will return the info for migrated and tape datasets also.

However, be aware that dataset information does not contain expiry data unless explicitly stated at dataset allocation time.

Even if it was stated, SMS may overrides this to blank and force MGMTCLAS retention criteria.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
Search our Forums:

Back to Top