On 28 Nov 2015 11:50:44 -0800, in bit.listserv.ibm-main you wrote:

>All:
>
>Our STC use several files and I want to verify that the files have the
>correct logical record length. The STCs are written LE Cobol.
>I would like to know before I open the file if the file that is created or
>allocated is correct in record length. For example, if the Logical Record
>Length is 121 as defined in the program tries to open a file with a LRECL
>300 bytes. Can i do the following ?

It is simple.  Assign a status code (2 bytes) to any file you want to
check and then check the status code after ALL I-O operations for the
file.  The status codes and their meanings are in the COBOL manual.
Status codes 00 and 97 are the only codes I normally accept on open.
One of the status codes returned on open is for wrong length record.
The presence of a status code on the SELECT statement for a file means
that the default error handling is bypassed.

CLark Morris
>
>1. Call a Assembler subroutine using RDJFCB and determine the lrecl on the
>volume for the dataset and allocation ?
>2. If the lrecl i want to pass back a RTNCD in R15 and then then have Cobol
>fail ....
>
>
>Regards,
>Scott
>
>----------------------------------------------------------------------
>For IBM-MAIN subscribe / signoff / archive access instructions,
>send email to [email protected] with the message: INFO IBM-MAIN

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

Reply via email to