[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] substitute not found ?
From: |
Patrick |
Subject: |
Re: [open-cobol-list] substitute not found ? |
Date: |
Sun, 08 Sep 2013 18:09:02 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130809 Thunderbird/17.0.8 |
I am not sure if I have found a bug or more likely, I have not been
using SUBSTITUTE correctly.
I went back and used the whole snippet from Brian's site:
DISPLAY
FUNCTION UPPER-CASE(
FUNCTION SUBSTITUTE(
"This is the orginal string.";
"original"; "new"; "string"; "text"
)
)
END-DISPLAY
When I used just this in the program all was good. However when I used
it outside of a DISPLAY it did not work.
In the code below, the first SUBSTITUTE is found and the second
generates an error about unexpected function.
BTW I also ran make check and SUBSTITUTE passed
-Patrick
IDENTIFICATION DIVISION.
PROGRAM-ID. debug-file-test.
DATA DIVISION.
WORKING-STORAGE SECTION.
PROCEDURE DIVISION.
DISPLAY
FUNCTION UPPER-CASE(
FUNCTION SUBSTITUTE(
"This is the orginal string.";
"original"; "new"; "string"; "text"
)
)
END-DISPLAY
FUNCTION UPPER-CASE(
FUNCTION SUBSTITUTE(
"This is the orginal string.";
"original"; "new"; "string"; "text"
)
)
STOP RUN.