Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 506
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: 506
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
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us