View previous topic :: View next topic
|
Author |
Message |
sjvidya
New User
Joined: 26 Feb 2008 Posts: 2 Location: US
|
|
|
|
Hi. I am writing a simple rexx code to display dataset attributes.
X=LISTDSI(PROG1.INPUT)
EXIT
It is returning code 0 but with no results.
If i give SAY X before EXIT keyword it will return code 16.
PROG1.INPUT is a simple PS with few records.
Can anyone of you suggest how to get dataset attributes displayed. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
The reason it gives a return 16 is that the syntax is incorrect |
|
Back to top |
|
|
sjvidya
New User
Joined: 26 Feb 2008 Posts: 2 Location: US
|
|
|
|
But if i give just
X=LISTDSI(PROG1.INPUT)
EXIT
It is returning code 0 but without displaying dataset attributes.
What is the error. Even if i put quotes for dataset name, it will return 0 but with no results. Please suggest. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
This is LISTDS, but should help you:
Code: |
X = OUTTRAP("LDS.")
ADDRESS TSO "LISTDS ('YOUR.PDS(MEMBER)') MEMBERS"
Do I = 1 To LDS.0
If Index(LDS.I,'--MEMBER---TTR') > 0 Then
Do
SAY 'MEMBER FOUND'
Leave I
End
End
X = OUTTRAP("OFF") |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Have you actually read the manual to see the correct syntax and usage of LISTDSI
If you had, you would know what the problem is
Please click HERE to read all about it. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Read the Manual? when all he wants is someone to give him the answer?
Expat,
he is so lazy that if he wanted to start a family, he would go find a pregnant woman. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Dick, Nice one, I'll have to remember that |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
dbzTHEdinosauer wrote: |
Read the Manual? when all he wants is someone to give him the answer?
Expat,
he is so lazy that if he wanted to start a family, he would go find a pregnant woman. |
Its getting better and better to enlighten my day.
Thanks guys. |
|
Back to top |
|
|
ananth86
New User
Joined: 10 Jun 2009 Posts: 59 Location: Hyderabad
|
|
|
|
Expat, ur link is really useful. Thanks a lot
Vidya, try this below code. Its very simple. Refer Expat's link to customise the attributes to be dispalyed
Code: |
/*REXX*/
X = LISTDSI("'your.dataset'")
SAY 'FUNCTION CODE FROM LISTDSI IS: ' X
SAY 'THE DATA SET NAME IS: ' SYSDSNAME
SAY 'THE DEVICE UNIT VOLUME RESIDES IS:' SYSUNIT
SAY 'THE RECORD FORMAT IS: ' SYSRECFM
SAY 'THE DATASET ORG IS: ' SYSDORG
SAY 'THE LOGICAL RECORD LENGTH IS: ' SYSLRECL
SAY 'THE BLOCK SIZE IS: ' SYSBLKSIZE
SAY 'THE ALLOCATION IN SPACE UNITS IS: ' SYSUNITS |
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2545 Location: Silicon Valley
|
|
|
|
Quote: |
a simple rexx code to display dataset attributes. |
I do not see where anyone actually said this: the LISTDSI built-in function does not display dataset attributes. It only retrieves them for use in the rexx program. |
|
Back to top |
|
|
nemo_budd
New User
Joined: 30 Mar 2008 Posts: 7 Location: Pune
|
|
|
|
Hi,
I need the creator/modified user id of the dataset along with the other statistics. I have verified that "LISTDSI" command is not returning the user id. Is there any other way to retrieve that, any direction helps. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
the creator modifier info is only available by processing the SMF data
ask Your storage support about it |
|
Back to top |
|
|
|