View previous topic :: View next topic |
Author |
Message |
goosse Beginner
Joined: 30 Sep 2006 Posts: 3 Topics: 1
|
Posted: Sat Nov 22, 2008 10:19 am Post subject: Create PDS members with rexx |
|
|
Last week a colleague of me started to create packages and plans for our new environment. He started creating them by hand but he has to create several thousand of them so i realized just now it has to be possible to create a rexx programma which reads a sequential file with the pds members to create and write in those members the statements which are all alike except for the member name.
We are both experienced programmers but not whit rexx.
Does anyone have a simple rexx programma to create pds members and write in those members some statements?
If we have an example it's easy to adapt to program for us but we it would be nice if someone has a nice example for us we can use.
Thanks allready |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Sat Nov 22, 2008 10:35 am Post subject: Re: Create PDS members with rexx |
|
|
goosse wrote: | We are both experienced programmers but not whit rexx. |
So why use REXX? It doesn't do anything different with PDS's that any other language. Why not stick with what you're already familiar with? Besides, is a program really necessary? Can't you just use standard PDS utilities like IEBUPDTE? |
|
Back to top |
|
 |
goosse Beginner
Joined: 30 Sep 2006 Posts: 3 Topics: 1
|
Posted: Sun Nov 23, 2008 1:09 am Post subject: Re: Create PDS members with rexx |
|
|
superk wrote: | goosse wrote: | We are both experienced programmers but not whit rexx. |
So why use REXX? It doesn't do anything different with PDS's that any other language. Why not stick with what you're already familiar with? Besides, is a program really necessary? Can't you just use standard PDS utilities like IEBUPDTE? |
Because COBOL and PL/1 are not very usefull for this and rexx is able to allocate dynamic pds members |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Sun Nov 23, 2008 11:30 am Post subject: |
|
|
Well, based on your requirements, it seemed logical to me that you'd probably want to use ISPF Library Management (LM) routines, which aren't going to care what language you use to call them. I was also thinking of possible TSO/E EDIT or ISPF Edit Macros, again which really don't care about the language used.
There's nothing native in TSO/E REXX for dealing with PDS's, so you'll also have to use some TSO/E commands as well.
So, for running a REXX exec within a TSO/E environment, I'd approach it this way:
- Read the PS file with the member names into a REXX stem variable:
"EXECIO * DISKR ddname (STEM mem. FINIS"
TSO/E REXX EXECIO command syntax.
TSO/E REXX Stems.
- Setup a loop for each element of the stem variable mem., allocate the target PDS with the member name, and write the content to that member:
Do loop = 1 To mem.0
mem.loop = Strip(mem.loop) /* Remove spaces */
"ALLOCATE FI(ddname) DA('THE.PDS("mem.loop")') SHR REUSE"
Queue "whatever you want to write"
Queue "more ...."
...
"EXECIO "Queued()" DISKW ddname (FINIS"
"FREE FI(ddname)"
End
TSO/E REXX STRIP FUNCTION.
TSO/E REXX QUEUE INSTRUCTION.
TSO/E REXX QUEUED() FUNCTION.
TSO/E ALLOCATE COMMAND.
TSO/E FREE COMMAND. |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Sun Nov 23, 2008 12:02 pm Post subject: |
|
|
Search for 'BPXWDYN' in this forum. This can be used in COBOL programs to read dynamically. |
|
Back to top |
|
 |
goosse Beginner
Joined: 30 Sep 2006 Posts: 3 Topics: 1
|
Posted: Tue Nov 25, 2008 10:23 am Post subject: |
|
|
ok thanks i'll check those suggestions what best to use for us |
|
Back to top |
|
 |
|
|