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
 

 

displaying volumes for vsam files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: displaying volumes for vsam files
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: 2360
Location: Israel

PostPosted: Mon Oct 01, 2007 5:35 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Oct 01, 2007 10:56 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Tue Oct 02, 2007 12:31 am    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Tue Oct 02, 2007 2:49 pm    Post subject:
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: 1224
Location: Israel

PostPosted: Tue Oct 02, 2007 4:19 pm    Post subject:
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    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 how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


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