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: 236

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: 4648
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: 236

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 FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts FTOPEN TEMP is failing due to dataset... mbenaud TSO/ISPF 7 Thu Jul 28, 2016 4:28 pm


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