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
 

 

How to obtain the attributes of the VSAM file.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
passion_sujesh

New User


Joined: 14 Mar 2008
Posts: 74
Location: India,Chennai

PostPosted: Tue Sep 22, 2009 2:25 pm    Post subject: How to obtain the attributes of the VSAM file.
Reply with quote

Hi,
I have an requirement in which i have to obtain the attributes of the VSAM file. I have a file as input (might be a ps file or VSAM file), i need to get the attributes of the file. I tried 'LISTDSI' function, it is working fine for PS files, but for VSAM files it is not working. Can any one tell me how to do this in rexx (find the type of file and get the attributes of the file).


My code:
FILEDD = 'INPUT FILE'
X=LISTDSI(FILEDD)
IF X=0 THEN
DO
SAY 'ERROR OCCURED' X
END

Thanks,
Sujesh.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Tue Sep 22, 2009 2:26 pm    Post subject: Reply to: How to obtain the attributes of the VSAM file.
Reply with quote

listcat
Back to top
View user's profile Send private message
passion_sujesh

New User


Joined: 14 Mar 2008
Posts: 74
Location: India,Chennai

PostPosted: Tue Sep 22, 2009 4:57 pm    Post subject: Reply to: How to obtain the attributes of the VSAM file.
Reply with quote

Hi enrico,
How can we get the attributes of the VSAM file. I tried using "LISTC ENT("FILE2") NAME", i was able to find if the file was an vsam or not.

Thanks,
Sujesh.
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: Tue Sep 22, 2009 5:10 pm    Post subject:
Reply with quote

You can use DSINFO to get the DSORG of a file, and then invoke either IDCAMS or LISTDSI accordingly.
Back to top
View user's profile Send private message
chowdhrykapildev

New User


Joined: 05 Aug 2009
Posts: 44
Location: Hyderabad

PostPosted: Tue Sep 29, 2009 8:48 pm    Post subject: Reply to: How to obtain the attributes of the VSAM file.
Reply with quote

Hi Sujesh,

Try with this command.

"LISTCAT ENT("dsname")" ALL
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Sep 29, 2009 8:56 pm    Post subject: Reply to: How to obtain the attributes of the VSAM file.
Reply with quote

An Assembler program, which uses the SHOWCB Macro, will return all the information that you need.

I'm not too sure if there's a REXX equivalent or not....

Bill
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 Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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