My COBOL is getting a little rusty from disuse ... but, (1) shouldn't the FD clause in the sample program below contain DATA RECORDS ARE x, y, z (where x, y, z refer to the 01-level record layout descriptions? (2) what about the clause RECORD VARYING FROM 59 TO 1500 CHARACTERS Shouldn't the values inlcude the 4 bytes RDW, in other words, shouldn't it read RECORD VARYING FROM 63 TO 1504 CHARACTERS ???
I'd appreciate some refresher on that and I'd also appreciate if the OP would be so good and post a fragment of the code that works for him, after all the bugs have been worked out, just so we can all learn from it. Regards, Ulrich Krueger Mainframe Systems Services National Semiconductor Corp. Santa Clara, CA 95051 Tel: (408) 721-8071 Email: [EMAIL PROTECTED] "IBM Mainframe Discussion List" <[email protected]> wrote on 06/12/2006 05:57:31 AM: > > I've got a COBOL program that opens a QSAM variable > > length file with the following description: > > > > Data set name : dsa.vbtest > > Organisation : PS > > Record Format : VB > > Record Length : 1504 > > Block Size : 15000 > > > > > > This is defined in my program by the following SELECT > > and FD statements: > > > > > > SELECT INFILE ASSIGN TO INFILE > > ORGANIZATION IS SEQUENTIAL > > > > FILE STATUS IS WS-FILE-STATUS. > > > > > > FD INFILE > > > > RECORDING MODE V > > > > LABEL RECORDS STANDARD > > > > RECORD VARYING FROM 59 TO 1500 CHARACTERS > > DEPENDING ON WS-REC-LENGTH > > BLOCK CONTAINS 0 RECORDS. > > > > > > where > > > > 01 WS-REC-LENGTH PIC 9(8) COMP. > > > > > > The file appears to open as input correctly but returns > > an abend s002 - 00000004 whilst performing a second read. > > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

