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

How to identify a dataset is PS or PO?


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

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Tue May 05, 2009 6:14 pm
Reply with quote

Dear folks,

I have to code a rexx routine to identify the dataset is 'PS' or 'PO'. I believe LISTDS 'dataset' will give the DSORG of the dataset.

If i use the below piece of code

ADDRESS TSO
LISTDS 'dataset'

how to check the given dataset is 'PS' or 'PO'

will below piece helps?

IF DSORG='PS'

Please suggest.

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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue May 05, 2009 6:27 pm
Reply with quote

Yes, the TSO LISTDS command will display the dataset attributes to the terminal:

Code:

TSO LISTDS PDS
MYHLQ.PDS
--RECFM-LRECL-BLKSIZE-DSORG
  FB    80    27920   PO
--VOLUMES--
  FUSR02


My question is, since you want to write a REXX exec, why not use the REXX instruction LISTDSI which will return the attributes into specific REXX variables?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue May 05, 2009 9:06 pm
Reply with quote

You can use LISTDSI, then ask foe the value of SYSDSORG.

O.
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Wed May 06, 2009 10:50 am
Reply with quote

Thanks superk & ofer71.
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts How to identify the transaction categ... IMS DB/DC 3
Search our Forums:

Back to Top