[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] redefines problem
From: |
Wim Niemans ri |
Subject: |
Re: [open-cobol-list] redefines problem |
Date: |
Mon Mar 1 09:59:03 2004 |
To my opinion the error is correct.
You might find out what is happening, by moving
the field WS-FUPPENVI-PRO to another field.
Does the compiler move 80 bytes, or 70 bytes, which is the correct
length.
ex:
move all quote to WS-FUPPENVI-ENV in WS-FUPPENVI-ENV.
move WS-FUPPENVI-PRO to a field of length 80.
Also, but I'm not sure, is it legal to redefine a group-item that
contains a redefines too?
Cheers,
wim niemans
On 1 Mar 2004 at 12:02, David Korn wrote:
> cc: address@hidden
> Subject: redefines problem
> --------
>
> With the following program I get
> prog20.cob:14: size of `WS-FUPPENVI-DEV' larger than size of `WS-FUPPENVI-PRO'
> even though the size of WS-FUPPENVI-DEV is not larger than WS-FUPPENVI-ENV.
> The MVS compiler does not generate this error.
> ===================cut here==========================
> IDENTIFICATION DIVISION.
> PROGRAM-ID. PROG20.
> DATA DIVISION.
> WORKING-STORAGE SECTION.
> 01 WS-FUPPENVI-REC.
> 05 WS-FUPPENVI-ENV.
> 10 WS-FUPPENVI-ENV PIC X(80) VALUE SPACES.
> 05 WS-FUPPENVI-PRO
> REDEFINES WS-FUPPENVI-ENV.
> 10 WS-FUPPENVI-PRO-DSNPREFX.
> 15 WS-FUPPENVI-PRO-HLQ PIC X(04).
> 15 WS-FUPPENVI-PRO-LVL PIC X(01).
> 10 WS-FUPPENVI-PRO-FILL01 PIC X(65).
> 05 WS-FUPPENVI-DEV
> REDEFINES WS-FUPPENVI-PRO.
> 10 WS-FUPPENVI-DEV-DSNPREFX PIC X(25).
> 10 WS-FUPPENVI-FILL01 PIC X(55).
> ===================cut here==========================
>
> David Korn
> address@hidden
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> open-cobol-list mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/open-cobol-list
>