MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Create PDS members with rexx

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
goosse
Beginner


Joined: 30 Sep 2006
Posts: 3
Topics: 1

PostPosted: Sat Nov 22, 2008 10:19 am    Post subject: Create PDS members with rexx Reply with quote

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
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Sat Nov 22, 2008 10:35 am    Post subject: Re: Create PDS members with rexx Reply with quote

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
View user's profile Send private message
goosse
Beginner


Joined: 30 Sep 2006
Posts: 3
Topics: 1

PostPosted: Sun Nov 23, 2008 1:09 am    Post subject: Re: Create PDS members with rexx Reply with quote

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
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Sun Nov 23, 2008 11:30 am    Post subject: Reply with quote

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
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Sun Nov 23, 2008 12:02 pm    Post subject: Reply with quote

Search for 'BPXWDYN' in this forum. This can be used in COBOL programs to read dynamically.
Back to top
View user's profile Send private message Send e-mail
goosse
Beginner


Joined: 30 Sep 2006
Posts: 3
Topics: 1

PostPosted: Tue Nov 25, 2008 10:23 am    Post subject: Reply with quote

ok thanks i'll check those suggestions what best to use for us
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group