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 identify a dataset is PS or PO?

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

Active User


Joined: 15 Dec 2005
Posts: 237

PostPosted: Tue May 05, 2009 6:14 pm    Post subject: How to identify a dataset is PS or PO?
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

Moderator Team Head


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

PostPosted: Tue May 05, 2009 6:27 pm    Post subject: Reply to: How to identify a dataset is PS or PO?
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: 2360
Location: Israel

PostPosted: Tue May 05, 2009 9:06 pm    Post subject:
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: 237

PostPosted: Wed May 06, 2009 10:50 am    Post subject:
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    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 Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Could we identify the called modules ... elixir1986 COBOL Programming 5 Fri Jul 14, 2017 1:53 am
No new posts Identify top 30 big tables or indexes... ashek15 DB2 0 Fri Jun 16, 2017 10:01 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm


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