Also: If support for one reservered is A.W.O.L, one wonders how many more ... ? Anyone keeping a list they'd like to share?
This was fun, too: > Generative: 'create a callable procedure designed to determine if a string > is part of another in GNU COBOL without using the CONTAINS reserved word. *> Include parameters into the linkage section.' IDENTIFICATION DIVISION. PROGRAM-ID. SubstringCheck. DATA DIVISION. WORKING-STORAGE SECTION. 01 ws-main-string PIC X(100). 01 ws-search-string PIC X(20). 01 ws-found-flag PIC X VALUE 'N'. LINKAGE SECTION. 01 main-string PIC X(100). 01 search-string PIC X(20). 01 found-flag PIC X....
Thanks. Survey said: > Generative: 'how to determine if a string is part of another in GNU COBOL > without using the CONTAINS reserved word.' IDENTIFICATION DIVISION. PROGRAM-ID. SubstringCheck. DATA DIVISION. WORKING-STORAGE SECTION. 01 main-string PIC X(100) VALUE 'GNU COBOL is great for learning COBOL programming.'. 01 search-string PIC X(20) VALUE 'COBOL'. 01 search-length PIC 9(02). 01 main-length PIC 9(03). 01 found-flag PIC X VALUE 'N'. 01 remaining-string PIC X(100). PROCEDURE DIVISION. MAIN-PROCEDURE....
Whilist cobc --list-reservedlist CONTAINS as supported, and VsCode does as well, we're at a loss as how to use it. Copilot, too: Search-By-Author. OPEN INPUT QuoteFile DISPLAY "Enter Author to search: " ACCEPT SearchAuthor PERFORM UNTIL AT-EOF READ QuoteFile INTO QuoteRecord AT END MOVE 1 TO WS-EOF NOT AT END IF QuoteAuthor CONTAINS SearchAuthor DISPLAY "ID: " QuoteID DISPLAY "Author: " QuoteAuthor DISPLAY "Quote: " QuoteText DISPLAY "" END-IF END-READ END-PERFORM CLOSE QuoteFile. Any ideas on how...
Whilist cobc --list-reservedlist CONTAINS as supported, and VsCode does as well, we're at a loss as how to use it. Copilot, too: Search-By-Author. OPEN INPUT QuoteFile DISPLAY "Enter Author to search: " ACCEPT SearchAuthor PERFORM UNTIL AT-EOF READ QuoteFile INTO QuoteRecord AT END MOVE 1 TO WS-EOF NOT AT END IF QuoteAuthor **CONTAINS** SearchAuthor DISPLAY "ID: " QuoteID DISPLAY "Author: " QuoteAuthor DISPLAY "Quote: " QuoteText DISPLAY "" END-IF END-READ END-PERFORM CLOSE QuoteFile. Any ideas on...
Using an older Ubuntu VM I archived awhile back solved the problem: /media/sf_d_drive/cob$ cobc -xv -free EX_SORT_FILE_CHARS2.cob cobc (GnuCOBOL) 2.2.0 Built Jul 17 2018 20:29:40 Packaged Sep 06 2017 18:48:43 UTC C version "8.1.0" loading standard configuration file 'default.conf' command line: cobc -xv -free EX_SORT_FILE_CHARS2.cob preprocessing: EX_SORT_FILE_CHARS2.cob -> /tmp/cob2107_0.cob return status: 0 parsing: /tmp/cob2107_0.cob (EX_SORT_FILE_CHARS2.cob) return status: 0 translating: /tmp/cob2107_0.cob...
Using an older Ubuntu solved the problem: /media/sf_d_drive/cob$ cobc -xv -free EX_SORT_FILE_CHARS2.cob cobc (GnuCOBOL) 2.2.0 Built Jul 17 2018 20:29:40 Packaged Sep 06 2017 18:48:43 UTC C version "8.1.0" loading standard configuration file 'default.conf' command line: cobc -xv -free EX_SORT_FILE_CHARS2.cob preprocessing: EX_SORT_FILE_CHARS2.cob -> /tmp/cob2107_0.cob return status: 0 parsing: /tmp/cob2107_0.cob (EX_SORT_FILE_CHARS2.cob) return status: 0 translating: /tmp/cob2107_0.cob -> /tmp/cob2107_0.c...
Using a Ubuntu solved the problem: /media/sf_d_drive/cob$ cobc -xv -free EX_SORT_FILE_CHARS2.cob cobc (GnuCOBOL) 2.2.0 Built Jul 17 2018 20:29:40 Packaged Sep 06 2017 18:48:43 UTC C version "8.1.0" loading standard configuration file 'default.conf' command line: cobc -xv -free EX_SORT_FILE_CHARS2.cob preprocessing: EX_SORT_FILE_CHARS2.cob -> /tmp/cob2107_0.cob return status: 0 parsing: /tmp/cob2107_0.cob (EX_SORT_FILE_CHARS2.cob) return status: 0 translating: /tmp/cob2107_0.cob -> /tmp/cob2107_0.c...