> -----Original Message----- > From: IBM Mainframe Discussion List [mailto:[email protected]] On > Behalf Of Tim Brown > Sent: Tuesday, March 01, 2016 6:31 AM > To: [email protected] > Subject: rexx and tso alllocate > > In a rexx program I have an allocate, Can the DCB be changed after all the records are > written to it, > If I know there are not any records in it up to a certain size. > > 'ALLOC DA('PDSNF') F ('DDJOB') > SP (40,5) CYLINDERS UNIT(3390) VOLUME(WRK007) RELEASE > DSORG(PS) RECFM( V B A ) LRECL(304) BLKSIZE(27900)'
What do you hope to accomplish? Changing the DCB will not alter any of the existing data nor reduce the space it consumes. Does your REXX write the dataset or just allocate it for another process? What DCB attributes do you want to change? Changing some, like DSORG and RECFM or reducing BLKSIZE, may render the dataset useless. Increasing LRECL or BLKSIZE will have no effect on existing data but will be used if you ever MOD data onto the end. This usually does not cause problems with VBA data. Reducing LRECL will not affect existing data but will prevent any new records from exceeding the new size. (Was the original LRECL determined by some analysis? Is that analysis no longer valid?) Despite your assumption, if any existing records exceed the new LRECL size, the dataset will unreadable from that point on. Most of the common methods for altering DCB attributes require the process to open the dataset for output. You might want to back it up before performing the alteration. Keep the backup until you are sure you were successful and the data is still usable. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
