Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to create a PDS using in rexx.

Status
Not open for further replies.

rvemuri

Programmer
Nov 24, 2002
10
IN
I have a requiment in which based on the name the user provides on the panel I would create a PDS. Could any one pleas elet me know how to create a PDS using REXX.
 
Hi rvemuri,

You'll have to provide your own parameters but use something like ..

[blue]
Code:
Address "TSO" "ALLOC DD(
Code:
DDNAME
Code:
) DS(
Code:
YOUR.PDS.NAME
Code:
) NEW" ,
              "MGMTCLAS(
Code:
EGDEV
Code:
) STORCLAS(
Code:
EGDEV
Code:
)" ,
              "DSORG(PO) RECFM(F M) LRECL(80) SPACE(10, 5) DIR(10) TRACKS"
[/blue]

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Thanks for the help. Could U please let me know once the PDS is created how can I create a member in the PDS and use it to write some data onto it
 
It is pretty straightforward really....take a peek at the ALLOC command. :)

"ALLOC F(filename) DA('"sysuid".CLIST.MSTR(member)') SHR REUSE"

Hoe this helps.
 
Do you have a way to just read the members of a PDS and list out? (ie. if pds has 5members - can rexx look at lib and pull each member out)?

Thanks for any information.

- tmac
 
Hi tmac4,

Can't remember exactly how to do this, but look at the various ISPF LM... commands, something like ..

Code:
[blue]Address "ISPEXEC"
"LMINIT DATAID(LMID) DATASET('"[i]YourDSN[/i]"')"
"LMOPEN DATAID("LMID")"
Do forever = 1
    "LMMLIST DATAID("LMID") MEMBER(LMMEM)"
    If Rc > 0 then Leave
    Say LMMEM
End
"LMFREE DATAID("LMID")"[/blue]

If that isn't enough I'm sure someone with more current knowledge will help you more.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Tony is on the right track using the ISPF service LMMLIST to obtain a member list. I'm not quite sure the syntax shown is exactly right - check the syntax with the ISPF models and I'm sure it will work:

... LMINIT ...
... LMOPEN ...
"ISPEXEC LMMLIST DATAID(&mypds) OPTION(SAVE) GROUP(ML) STATS(YES)"
... LMCLOSE ...

As an alternative, when I wish to create a member list of a PDS without using ISPF services, the TSO command "PRINTDS" can also generate a member list. Check it out by looking up the PRINTDS command in the TSO HELP menus.

Third option: "LISTDS 'input.pds' MEMBERS".

Fourth option: the MVS utility IEHLIST.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top