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: 623
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: 623
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 TRAILER3 is creating blank record in ... kodeesm DFSORT/ICETOOL 3 Fri May 18, 2018 5:45 pm
No new posts Splitting one row into multiple Rows ... Rajan Moorthy DFSORT/ICETOOL 9 Mon May 14, 2018 10:58 pm
No new posts write multiple lines in PS file in cobol Balu5491 COBOL Programming 7 Wed Mar 07, 2018 10:27 am
No new posts Using multiple routines at exit 6 in ... Randy Horowitz All Other Mainframe Topics 2 Sat Feb 10, 2018 11:57 pm
No new posts Sum the fields in particular format f... sharana64 DFSORT/ICETOOL 9 Fri Jan 05, 2018 1:11 am

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