gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [open-cobol-list] address@hidden


From: William M. Klein
Subject: RE: [open-cobol-list] address@hidden
Date: Mon Feb 9 21:03:20 2004

According to:

 http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3lr10/1.2.8.4


"When a table element is specified, the LENGTH OF special register contains
the length, in bytes, of one occurrence. When referring to a table element,
it need not be subscripted."

Therefore, either the source code:  

MOVE LENGTH OF FW058R-DSET-NAME(FW058R-INDEX) TO WS-MAX-LENGTH
        or
MOVE LENGTH OF FW058R-DSET-NAME TO WS-MAX-LENGTH

should be valid - and should give the same results (i.e. either with or
without the subscripting should be allowed)

FYI - the FUNCTION LENGTH intrinsic function requires a "data item" rather
than an "identifier" in the '89 ANSI amendment.  Therefore, I do not think
(but am uncertain) that it may be subscripted.

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden On 
> Behalf Of David Korn
> Sent: Monday, February 09, 2004 10:45 AM
> To: address@hidden
> Subject: [open-cobol-list] address@hidden
> 
> 
> Here is another program that is failing to compile:
> 
> ================cut here====================
>        ID DIVISION.
>        PROGRAM-ID. PROG3.
>        ENVIRONMENT DIVISION.
>        DATA DIVISION.
>        WORKING-STORAGE SECTION.
>        01  WS-P-SUMM-HDR.
>            05 FW058R-RESP-TBL              OCCURS 100 TIMES
>                                            INDEXED BY FW058R-INDEX.
>               10 FW058R-DSET-NAME          PIC X(44).
>        01  WS-MAX-LENGTH                  PIC 9(2).
>        PROCEDURE DIVISION.
>            MOVE LENGTH OF FW058R-DSET-NAME(FW058R-INDEX) TO
>                    WS-MAX-LENGTH
> ================cut here====================
> prog3.cob:12: parse error, unexpected '(', expecting TO
> 
> 
> David Korn
> address@hidden
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> open-cobol-list mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/open-cobol-list
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]