Cobol-People

COBOL REVERSE

COBOL REVERSE

How to use COBOL REVERSE string command

WORKING-STORAGE SECTION.
01 WS-STRING PIC X(8) VALUE 'LET ME '.
PROCEDURE DIVISION.
DISPLAY 'WS-STRING = ' '|' WS-STRING '|'
MOVE FUNCTION REVERSE(WS-STRING) TO WS-STRING
DISPLAY 'WS-STRING = ' '|' WS-STRING '|'
GOBACK.

SYSOUT Result

WS-STRING = |LET ME |
WS-STRING = | EM TEL|

Tags : COBOL REVERSE STRING

Edit this page on GitHub