View previous topic :: View next topic
|
Author |
Message |
marlm
New User
Joined: 08 Apr 2008 Posts: 2 Location: Brazil
|
|
|
|
I need to write lines one by one and I am getting same error as in post:
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 |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
Did you try the ISPEXEC LMM* functions? |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
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 |
|
|
|