How is the 01-level defined under
> FD INFILE ...
If it is something like:
01 INREC PIC X(1500)
then you WILL have problems. If, however, it is defined somethink like
01 INREC.
05 INRE-BYTE Occurs 59 to 1500
Depeing on WS-REC-LENGTH
Pic X.
The the results that you hae desribed don't make any sense to me
P>S. It looks to me as if you are using the bit.listserv.ibm-main USENET
newsgroup directly. This is "highly frowned upon" and does NOT get your
post to all readers. Please use the IBM-MAIN list-server instead. See
bottom of this note for further information.
<[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> I've got a question for the group as a whole which
> I'm hoping someone with more experience will find
> simple to explain.
>
> 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.
>
> The first read returns a RDW value in WS-REC-LENGTH of
> 318 which I know to be correct from dumping the file.
> However this RDW value seems to be ignored and 1500
> bytes of data are actually read from the input file.
>
> Note - the 1st record record is 318 bytes, the 2nd record
> 318 bytes and the 3rd record is 1499 bytes. So the first
> read has actually read half way into the third record.
>
> Upon the second read an RDW value of 16444 is returned
> in WS-REC-LENGTH and the abend follows.
>
> Anyone seen this behaviour before or know how to correct
> it?
----------------------------------------------------------------------
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