View previous topic :: View next topic
|
Author |
Message |
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
How can we exactly use LISTDS? |
|
Back to top |
|
|
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
Sorry
How can we use LISTDSI?? |
|
Back to top |
|
|
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Have you read the manual? There are some good examples there...
O. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Why not use the links that Ofer has supplied you ??? |
|
Back to top |
|
|
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
In the links, the result set is given but not how to execute it. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
Can you please let me know how to allocate a PDS to either SYSEXEC or SYSPROC? |
|
Back to top |
|
|
t_ctaram
New User
Joined: 15 May 2007 Posts: 20 Location: mumbai
|
|
|
|
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 |
|
|
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
Back to top |
|
|
|