Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm
No new posts VSAM dataset not found abdulrafi JCL & VSAM 5 Fri Jan 12, 2018 11:19 am
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us