Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Is there a way of creating multiple members in a PDS ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
marlm

New User


Joined: 08 Apr 2008
Posts: 2
Location: Brazil

PostPosted: Wed Feb 12, 2014 12:56 am    Post subject: Is there a way of creating multiple members in a PDS ?
Reply with quote

I need to write lines one by one and I am getting same error as in post:
http://ibmmainframes.com/viewtopic.php?t=57113&highlight=rexx+pds+allocation

Allocation Error, saying that the dataset is already allocated


using FINIS it closes the file, therefore on next iteration it will not add a new line on member but delete the previous line and overwrite it. Any other suggestion ? Any way of write a member without allocate the dataset?
Back to top
View user's profile Send private message

steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 574
Location: The Universe

PostPosted: Wed Feb 12, 2014 1:07 am    Post subject:
Reply with quote

Yes, but one member at a time. You cannot create multiple members in parallel in a PDS. You can create multiple members in parallel in a PDSE.
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Wed Feb 12, 2014 10:06 am    Post subject:
Reply with quote

Did you try the ISPEXEC LMM* functions?
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 574
Location: The Universe

PostPosted: Wed Feb 12, 2014 11:10 am    Post subject:
Reply with quote

I don't do Rexx, but here's a CLIST that creates 5 members.
Code:
PROC 0                                           
CONTROL LIST                                     
LISTDSI MC.PDS                                   
SET RC = &LASTCC                                 
IF &RC NE 0 THEN +                               
 DO                                             
  ALLOC F(PDS) SP(1 1) TRA RECFM(F B) LRECL(80) +
     BLKSIZE(800) DIR(1) REUS DA(MC.PDS)         
  FREE F(PDS)                                   
 END                                             
DO &I = 1 TO 5                                   
 ALLOC F(PDS) DA(MC.PDS(M&I)) REUS               
 OPENFILE PDS OUTPUT                             
 SET PDS = &STR(MEMBER &I)                       
 PUTFILE PDS                                     
 CLOSFILE PDS                                   
END                                             
LISTDS MC.PDS ME
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Wed Feb 12, 2014 2:33 pm    Post subject: Re: Is there a way of creating multiple members in a PDS ?
Reply with quote

marlm wrote:
using FINIS it closes the file, therefore on next iteration it will not add a new line on member but delete the previous line and overwrite it. Any other suggestion ? Any way of write a member without allocate the dataset?


Post the code you are working on, then we may be able to identify the exact problem and help you with a solution.
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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 10 Tue Sep 05, 2017 4:24 pm
No new posts Historical/statistical details for me... elixir1986 TSO/ISPF 13 Wed Aug 30, 2017 9:02 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us