Last active
August 29, 2015 14:19
-
-
Save pdemby/f785f74182bc53de24f5 to your computer and use it in GitHub Desktop.
REDEFINES
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MOVE-IT. | |
MOVE PRICE-EACH-TEXT (1:3) TO TEXT-FIELD (1:3). | |
MOVE "." TO TEXT-FIELD (4:1). | |
MOVE PRICE-EACH-TEXT (4:2) TO TEXT-FIELD (5:2). | |
INSPECT TEXT-FIELD REPLACING LEADING ZEROES BY SPACES. | |
MOVE SPACES TO TEXT-FIELD2. | |
MOVE 0 TO TEXT-SUB, TEXT-SUB2. | |
PERFORM DROP-LEADING-ZEROES THRU DROP-LEADING-ZEROES-EXIT. | |
DROP-LEADING-ZEROES. | |
ADD 1 TO TEXT-SUB. | |
IF TEXT-SUB > 10 | |
MOVE SPACES TO TEXT-FIELD | |
MOVE TEXT-FIELD2 TO TEXT-FIELD | |
GO TO DROP-LEADING-ZEROES-EXIT. | |
IF TEXT-FIELD (TEXT-SUB:1) = SPACES | |
GO TO DROP-LEADING-ZEROES. | |
ADD 1 TO TEXT-SUB2. | |
MOVE TEXT-FIELD (TEXT-SUB:1) TO TEXT-FIELD2 (TXT-SUB2:1). | |
GO TO DROP-LEADING-ZEROES-EXIT. | |
DROP-LEADING-ZEROES-EXIT. | |
EXIT. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment