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 User


Joined: 30 Nov 2013
Posts: 461
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 User


Joined: 30 Nov 2013
Posts: 461
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 Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
No new posts Creating an 'Enter' event with IMS MF... dileep chirasani Java & MQSeries 1 Sat Aug 06, 2016 2:23 am
No new posts Creating a dynamic sort card in JCL u... ChitraChhabra DFSORT/ICETOOL 4 Wed Aug 03, 2016 6:15 pm
No new posts Execute multiple DB2 Load commands in... faizm DB2 4 Wed Aug 03, 2016 12:53 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm


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