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
 

 

CLIST or Rexx to automatically find the expiration date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: CLIST or Rexx to automatically find the expiration date
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: 2360
Location: Israel

PostPosted: Tue Aug 21, 2007 12:19 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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: 2360
Location: Israel

PostPosted: Tue Aug 21, 2007 4:52 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 21, 2007 4:53 pm    Post subject:
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    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Tue Aug 21, 2007 6:57 pm    Post subject: Reply to: CLIST or Rexx to automatically find the expiration
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    Post subject:
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    Post subject:
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    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Wed Aug 22, 2007 5:35 pm    Post subject: Reply to: CLIST or Rexx to automatically find the expiration
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: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 23, 2007 3:12 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am


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