× 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.



Problem resolved .... I was compiling back to 7.2. When I changed the compile to go to 7.3, the compile worked. I guess the table sort in COBOL was added in 7.3.

Rich

________________________________


On 4/17/2024 1:34 PM, Rich Loeber wrote:

I am stumped. Trying to sort an in-core table with just 16 table entries. I have the following defined in working storage:

01 work-rcd.
02 filler pic x(15).
02 std-val occurs 16 times.
03 std-key pic x(10).
02 filler pic x(1448).

Then I just have the following in the procedure division:

sort std-val ascending std-key.

The compiler throws up with the following messages:

STMT
* 71 MSGID: LNC1331 SEVERITY: 30 SEQNBR: 004700
Message . . . . : 'STD-VAL' defined as incorrect type.
* 71 MSGID: LNC2750 SEVERITY: 30 SEQNBR: 004700
Message . . . . : 'STD-KEY' table item but not subscripted.
* 71 MSGID: LNC1623 SEVERITY: 30 SEQNBR: 004700
Message . . . . : SORT/MERGE key 'STD-KEY' subordinate to 'STD-VAL'
containing OCCURS. Statement ignored.
* 71 MSGID: LNC1447 SEVERITY: 30 SEQNBR: 004700
Message . . . . : Statement incomplete; last valid item found before
'.'. Statement ignored.

This is based on my review of the IBM i COBOL documentation on line.

What am I missing?

Rich

________________________________



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.