Tim Brown wrote:

>Yes to  "So if you write X records and determine you need a different lrecl?" 

>I will try your suggestions:  An IF Statement with a different ALLOC statement 
>with REUSE or MOD might do it.  Or you may need to FREE and ALLOC as needed.

AFAIK, you need to FREE first and then ALLOC with a new LRECL and REUSE/MODE.

Alternatively, allocate with the largest LRECL you plan to use and just write 
long and short records in that dataset. REXX will put blanks to the right 
(unused columns).

In fact, I have tested it out with a REXX program where I usually write out 
something with LRECL=133 and RECFM = FBA (Not VBA in your post). 

I changed my LRECL to 120, wrote some lines, FREE. Repeat the whole thing with 
LRECL=133. No problems found at all and all lines were written successfully 
without garbage up to the last column.

You can leave out the BLKSIZE out. Let the system guess it on your behalf.

I don't think you can change the DSORG and RECFM on an existing dataset. (I 
have not tested that out.)

Groete / Greetings
Elardus Engelbrecht

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to