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

displaying volumes for vsam files


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

New User


Joined: 06 Jun 2007
Posts: 58
Location: Hyderabad

PostPosted: Mon Oct 01, 2007 5:33 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Oct 01, 2007 5:35 pm
Reply with quote

What's wrong with LISTCAT?

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

New User


Joined: 06 Jun 2007
Posts: 58
Location: Hyderabad

PostPosted: Mon Oct 01, 2007 5:39 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Oct 01, 2007 10:56 pm
Reply with quote

Then perform the LISTCAT for only the specific files that you want
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Oct 02, 2007 12:31 am
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Oct 02, 2007 2:49 pm
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Oct 02, 2007 4:19 pm
Reply with quote

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
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts IBM OnDemand Folders displaying to al... IBM Tools 6
Search our Forums:

Back to Top