IBM Mainframe Discussion List <IBM-MAIN@bama.ua.edu> wrote on 12/17/2008 
05:16:27 PM:

> > Subject: Re: COBOL question: Why can't we use "RECORD CONTAINS 0
> > CHARACTERS" for RECFM=V files?
> > 
> > Overriding LRECL for varying-length files simply works.
> > Specify LRECL=32756 (32752?) and be done with it.
> 
> Do you mean just define the COBOL FD as RECORD CONTAINS 0 TO 32756
> CHARACTERS and then use LRECL=32760 as a JCL override for a file no
> matter what it's variable max length is?
> 
> Have not tried that but I certainly will.  Thanks!
> 
> Peter

I am very interested in this because I gave someone advice on this 
recently.

So I coded a small program to test my memory (see below).

I get this error message of the actual LRECL of input file is not the same 
as the implied LRECL from 01(s) under the FD.

So yes you need a JCL override that matches the program.  Or else some 
parameter I have been unable to define.

richard

IGZ0201W A file attribute mismatch was detected. File QSAMVARIABLE in 
program T the file specified in the ASSIGN clause had a record length of 
255.
<<39>>

IDENTIFICATION DIVISION.
PROGRAM-ID.  TSNOTIFX.
***************************************************************
Environment Division.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
    SELECT QsamVariable                    ASSIGN  I
           FILE STATUS  IS InStatusWs.
***************************************************************
DATA DIVISION.
File Section.
FD  QsamVariable
    Record varying.
01  InRecord1.
  05 InData1                         PIC X.
01  InRecord2.
  05 InData2                         PIC XX.
***************************************************************
Working-Storage Section.
01.
  05                                 PIC X         VALUE SPACE.
    88 InEof                                       VALUE 'E'.
    88 InInit                                      VALUE SPACE.
  05 InStatusWs                      PIC 99.
***************************************************************
PROCEDURE DIVISION.
    OPEN INPUT QsamVariable
    DISPLAY '<<' InStatusWs '>>'
    READ QsamVariable
      AT END
        SET InEof                    TO TRUE
      NOT AT END
        DISPLAY '<<' InData1 '>>'
        DISPLAY '<<' InData2 '>>'
END-READ
Goback
.

-----------------------------------------
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. If the reader of this message is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination, copying,
or unauthorized use of this information, or the taking of any
action in reliance on the contents of this information is strictly
prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original
message. 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

Reply via email to