Page 1 of 1

how to display the members of pds

PostPosted: Tue Aug 05, 2008 3:22 pm
by supriya saraswat
my requirement is to code a program in rexx in such a way that if i give a pds name as input then it should display the members of that pds and also the description of those member programs which we write as comments in the starting of a program.

help me in this please.

Re: how to display the members of pds

PostPosted: Tue Aug 05, 2008 6:01 pm
by MrSpock
Most of what you need is already in this previous topic.

Re: how to display the members of pds

PostPosted: Wed Aug 06, 2008 1:10 am
by Pedro
it should display the members of that pds and also the description of those member programs which we write as comments in the starting of a program.

* get the member list shown by MrSpock's post for previous topic.
* read each member and parse out the description. Hopefully, the descriptive text is adequately marked so you can find it.
* for each member, write to a sequential file.
* use ISPF's BROWSE service to display your file.

Re: how to display the members of pds

PostPosted: Wed Aug 06, 2008 12:26 pm
by supriya saraswat
thanks for such valuable information :) .
but actually what i want in this requirement is is as follows:-

this time forget about jcl...say i am executing my program using tso/e
now i want a code in rexx such that the output should be like this:-

o/p
enter your pds
(some pds name... entered by user)


on pressing enter

ist member name (let it be a ps file having a cobol program)
description of program stored as comments in identification divison.

2nd member name:
description....

like this should be the output.



actually i know how to display all the members of a pds but don't know how to open each member one by one and also
how to read it.
since in a cobol program comment starts from 7th column..so i have to fetch those line which starts from 7 column..
how can i put this condition in my rexx code.

if i missed some information regarding the requirement please let me know

Re: how to display the members of pds

PostPosted: Wed Aug 06, 2008 8:56 pm
by MrSpock
supriya, I'm not sure what more information we can provide at this point. It's not clear to me why it's necessary to read each PDS member individually (usually that's only necessary if changes are being applied to the members). I don't have a feeling for your level of technical competency for programming, TSO, REXX, ISPF, and basic dataset management concepts.

Whenever I think of processes dealing with PDS's, I automatically think of using the ISPF Library Management (LM) Services for PDS management. Using those services saves a lot of coding issues, and, since ISPF is language-neutral, you can use them with any language.

Re: how to display the members of pds

PostPosted: Wed Aug 06, 2008 10:19 pm
by Pedro
this time forget about jcl

I do not recall anyone mentioning JCL.

but don't know how to open each member one by one and also
how to read it.

Look at the TSO Command Reference manual and read about the ALLOC command. Use it to allocate a ddname for your PDS with member name.

Look at the TSO Rexx Reference manual and read about the EXECIO statement. Use it to read the ddname into a stem.