View previous topic :: View next topic
|
Author |
Message |
shchan
New User
Joined: 06 Jun 2007 Posts: 58 Location: Hyderabad
|
|
|
|
hi..
can anybody help?
i have to write a rexx utility taht checks if a vsam file is present or not and if it is present it should display the statistics like lrecl,recfm,blksize,used space.i tried with listdsi but this is not working fine for vsam files and gdgs
Can u please suggest on this? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
What's wrong with LISTCAT?
O. |
|
Back to top |
|
|
shchan
New User
Joined: 06 Jun 2007 Posts: 58 Location: Hyderabad
|
|
|
|
hi ofer71,
listcat is displaying all the catalogued files.I have a list of vsam files, only for these files,i should get the statistics of the file |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Then perform the LISTCAT for only the specific files that you want |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
shchan -
Quote: |
listcat is displaying all the catalogued files |
That's not true. LISTCAT produce whatever you want it to produce.
O. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
shchan,
Quote: |
listcat is displaying all the catalogued files |
By chance, are you using LISTCAT LEVEL...... which shows all the cataloged files? |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
When using LISTCAT, don't forget to use OUTTRAP as well:
Code: |
X = OUTTRAP("Lst.")
Address TSO "LISTCAT ENTRIES(YOUR.VSAM.FILE) ALL"
X = OUTTRAP("OFF") |
After that, you will have to search for the information you want in the Lst. variable.
To have a look at all the data, start with:
Code: |
Do I = 1 To Lst.0
Say Lst.I
End |
Then, if (for example) you want to get the record length, you can use:
Code: |
Do I = 1 To Lst.0 Until Word(Lst.I,1) = "ATTRIBUTES"
End
I = I+1
Parse Var Lst.I . "AVGLRECL" avglrecl .
avglrecl = Strip(avglrecl,"L","-")
I = I+1
Parse Var Lst.I . "MAXLRECL" maxlrecl .
maxlrecl = Strip(maxlrecl,"L","-")
If avglrecl = maxlrecl Then recfm = "F"
Else recfm = "V"
Say "average length: "avglrecl
Say "maximum length: "maxlrecl
Say "recfm: "recfm |
The Do-End loop allows you to jump quite fast to the correct place, once you know the data you want is right after this line. |
|
Back to top |
|
|
|