[HECnet] Slightly OT - How to concatenate multi line strings in DEC COBOL
Sampsa Laine
sampsa at mac.com
Wed Sep 12 14:41:20 PDT 2012
I figured it out, had to do with the DELIMITED BY SIZE issue - the old buffer was overwriting the whole new one, thus nothing was ever being stored.
I added a delimiter literal and it works now, code looks like this if interested (||||) is the delimiter:
GetPayload.
MOVE "||||" TO Payload.
Move " " TO EditLine.
PERFORM UNTIL EditLine = "."
DISPLAY "> " WITH NO ADVANCING
ACCEPT EditLine
MOVE Payload TO PreviousPayload
STRING PreviousPayload DELIMITED BY "||||"
CRLF DELIMITED BY SIZE
EditLine DELIMITED BY SIZE
"||||" DELIMITED BY SIZE
INTO NewPayload
END-STRING
MOVE NewPayload TO Payload
END-PERFORM.
DISPLAY "<EOT>".
On 12 Sep 2012, at 16:35, Dennis Boone wrote:
Nothing seems to happen, however.
I assume you don't mean that literally.
De
More information about the Hecnet-list
mailing list