Re: Re: MVT COBOL under MVS3.8j.

"Joe Monk [email protected] [H390-MVS]" <[email protected]>
Newsgroups gmane.comp.emulators.hercules390.mvs
Message-ID <CAPcd4G_7UafkT72JjBa5w5LBAMzZiV0ZvDp+kp0OqYhkss_uPw@mail.gmail.com>
Remember Peppe, this is '68 Cobol, not '74 Cobol.

You use an occurs with the depending on in the data record.

FD BLAH BLAH BLAH
      DATA RECORD IS DATA-RECORD
      LABEL RECORDS ARE STANDARD.

01 DATA-RECORD.
    02 FIELD-1 PIC 99.
    02 FIELD-2 PIC X OCCURS 1 TO 99 TIMES
         DEPENDING ON FIELD-1.

Joe

On Mon, Sep 16, 2019 at 4:19 AM Giuseppe Vitillaro giuseppe-yuD/ahkh7LvrZ44/[email protected]
[H390-MVS] <[email protected]> wrote:

>
>
> A side question about this compiler, not related
> with the XREF problem.
>
> I'm reading the IBM manuals about variable length
> datasets.
>
> I can't see a way to read a variable length record
> and retrieve the length of the record at runtime,
> like what is done in modern implementation of
> mainframe COBOL compilers with a syntax like this:
>
> FD VREDDV01-FILE
> DATA RECORD IS VREDDV01-REC
> RECORDING MODE IS V
> RECORD VARYING FROM 00001 TO 00080
> DEPENDING ON VREDDV01-LRECL,
>
> The GC28-6399-2 manual claims , page 136:
>
> Variable-length record descriptions, for
> input and output files, must not define
> space for the control bytes. Control bytes
> are automatically provided when a record is
> written and are not communicated to the
> use when a file is read.
>
> So, my question.
>
> How were variable length records handled
> at the time this compiler was in use?
>
> Peppe.
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.