We have a program that has the following in it: SELECT CVSCATF ASSIGN TO AS-CVSCATF ACCESS IS SEQUENTIAL FILE STATUS IS FILE-STATUS.
FD CVSCATF RECORD CONTAINS 17 TO 69 CHARACTERS. 01 CVSCATF-RECORD PIC X(69). 01 CVSCATF-RECORD-L7 PIC X(17). OPEN I-O CVSCATF READ CVSCATF INTO CVSC-AAT-RECORD ...change something here... REWRITE CVSCATF-RECORD FROM CVSC-AAT-RECORD (Yes, we do check FILE-STATUS after each I-O.) Some of the records are 17 characters and some are 69. The file is a VSAM ESDS. CVSC-AAT-RECORD is a group data item that is *not* varying in length. This program works. We then change CVSCATF is to a regular sequential file and change the SELECT to remove the AS- prefix Now when we read a 17 byte record and try to REWRITE it we get an error with FILE STATUS 44, which means: "A boundary violation exists because an attempt was made to rewrite a record to a file and the record was not the same size as the record being replaced, or an attempt was made to write or rewrite a record that was larger than the largest or smaller than the smallest record allowed by the RECORD IS VARYING clause of the associated file-name." Obviously it's trying to rewrite it as 69 bytes in to a record that was previously only 17 bytes. This can be fixed for the sequential file by adding RECORD IS VARYING DEPENDING ON CVSCATF-REC-LEN to the FD and creating CVSCATF-REC-LEN in working-storage. My question is, why does it work when the file is VSAM, even without the RECORD IS VARYING? Thanks, Frank -- Frank Swarbrick Applications Architect - Mainframe Applications Development FirstBank Data Corporation - Lakewood, CO USA P: 303-235-1403 >>> The information contained in this electronic communication and any document attached hereto or transmitted herewith is confidential and intended for the exclusive use of the individual or entity named above. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any examination, use, dissemination, distribution or copying of this communication or any part thereof is strictly prohibited. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this communication. Thank you. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html