× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
Has anyone used data areas in COBOL? I am running into an odd problem, here
is a snippet of it:

                          Create Data Area (CRTDTAARA)



 Type choices, press Enter.



 Data area  . . . . . . . . . . . > DRDACNT       Name

   Library  . . . . . . . . . . .     *CURLIB     Name, *CURLIB

 Type . . . . . . . . . . . . . . > *DEC          *DEC, *CHAR, *LGL, *DDM

 Length:

   Length . . . . . . . . . . . .   13            1-2000

   Decimal positions  . . . . . .   0             0-9

 Initial value  . . . . . . . . .   0

 Text 'description' . . . . . . .   Just a transaction counter




   Special-Names.
     Trans-Count is Data-Area
     .
  Input-Output Section.
.
.
      1 WS-TRANS-COUNT.
        2 TRANS-COUNT          Pic S9(13) Packed-Decimal Value 0.

      1 WS-MISC-VARIABLES.
        2 WS-WORK-LIB             Pic  X(10) Value Space.
        2 WS-NEW-RECORD.
.
.
        Accept WS-TRANS-COUNT from Data-Area
           for "DRDACNT" library WS-WORK-LIB
.
        Display WS-TRANS-COUNT upon Data-Area
           for "DRDACNT" library WS-WORK-LIB
.
.
 5722WDS V5R1M0  010525 LN  IBM ILE COBOL for AS/400      TLMTDOBJ/LMTD615BT
ENDEAVOR   10/16/02 10:25:42        Page     21
                                    M e s s a g e s
   STMT
*    11  MSGID: LNC0830  SEVERITY: 20  SEQNBR:  002303
         Message . . . . :   Environment-name expected, 'TRANS-COUNT' found.
           Environment-name CONSOLE assumed.
*   181  MSGID: LNC1400  SEVERITY: 30  SEQNBR:  016502
         Message . . . . :   A feedback, local data area, data area, or
           attribute data mnemonic-name expected. Statement ignored.
*   274  MSGID: LNC1396  SEVERITY: 30  SEQNBR:  025803
         Message . . . . :   Mnemonic-name of type LOCAL-DATA expected;
           'DATA-AREA' found. Statement ignored.

Now what is odd other than the above (which I may have wrong!) is in SEU. If
I put the cursor on either of the "SPECIAL-NAMES." subsection or the
declaration in it, SEU will show an error:

Syntax error detected at 'TRANS-COUNT'.
                         Additional Message Information



 Message ID . . . . . . :   LNC2913       Severity . . . . . . . :   30

 Message type . . . . . :   Diagnostic



 Message . . . . :   Syntax error detected at 'TRANS-COUNT'.

 Cause . . . . . :   The syntax rules for COBOL do not permit the identified

   item at this point in the program.



If I place the cursor on say the "E" in "SPECIAL-NAME." and overtype an "E",
the error will go away?
As near as I can determine from the ILE COBOL Programming Guide, this is the
way it should be!

Anyone have any experience with this?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.