|
From: David E. <de...@us...> - 2005-07-07 18:17:55
|
David Essex wrote:
> Yes, there are several problems here.
> First the TC grammar does not conform to the COBOL85 standard.
>
> Syntax:
> STRING {
> {identifier-1 | literal-1}...
> DELIMITED [BY]
> {identifier-2 | literal-2 | SIZE }
> }...
> INTO identifier-3
> ...
OK, I was wrong, and the two books I consulted were wrong.
I'm not sure if this was part of the original COBOL 1985 standard, or a
later modification, but according to the COBOL 1989 (draft) standard:
STRING ...
The DELIMITED phrase may be omitted only immediately preceding the INTO
phrase. If it is omitted, DELIMITED BY SIZE is implied.
> Carlos Gomes wrote:
>
>> I am getting a invalid result when use STRING verb.
>> The sample above has 3 similar STRINGs, using DELIMITED
>> BY SPACES the result is strange!!
>> ...
>> Result in:
>>
>> DISPLAY 1--> INSERT,999,'12345');
>> DISPLAY 2--> INSERT INTO TEST ,999,'12345 ');
>> DISPLAY 3--> INSERT INTO TEST ,999,'12345 ');
I don't see what the problem is.
Exactly what output did you expect ?
|