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

How to obtain the attributes of the VSAM file.


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 22, 2009 2:26 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Sep 22, 2009 5:10 pm
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Sep 29, 2009 8:56 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top