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: 1226
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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts VSAM RLS=NRI while doing IDCAMS sheersh JCL & VSAM 1 Tue Mar 07, 2017 1:55 pm


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