Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
INSPECT REVERSE(WS-ADDR-1) TALLYING WS-TALLY FOR LEADING SPACES
COMPUTE WS-DATA-LENGTH = LENGTH OF WS-ADDR-1 - WS-TALLY
MOVE WS-ADDR-1(1:WS-DATA-LENGTH) TO ...........
01 SCAN-ADDRESS VALUE SPACES.
02 TEMP-ADDRESS PIC X(40).
02 TEMP-DELIMITER Pic X(40).
01 I pic 99.
01 CURRENT-ADDRESS PIC x(40). (This has the address values with spaces.)
...
MOVE CURRENT-ADDRESS TO TEMP-ADDRESS.
MOVE 0 TO I
INSPECT SCAN-ADDRESS
TALLYING I FOR CHARACTERS
BEFORE INITIAL TEMP-DELIMITER.
IF I = 0
[i]address is spaces[/i]
ELSE
MOVE CURRENT-ADDRESS (1:I) TO [i]whatever[/i]
END-IF
STRING ADDRESS1 delimited by spaces
', ' delimited by size
address2 delimited by spaces
space delimited by size
City delimited by spaces
', ' delimited by size
State delimited by spaces
space delimited by size
ZIP-Code delimited by spaces
into ONE-BIG-ADDRESS
END-STRING.
01 v1.
05 v2 pic x(200) occurs 20.
01 v-orig pic x(200)
01 v-dest pic x(200).
01 v-pointer pic 9(4).
01 v-x pic 9(4).
move 1 to v-pointer
move 1 to w-x.
if v-orig not = spaces
perform until v-pointer > 200
unstring v-orig delimited by all spaces
into v2(w-x)
pointer v-pointer
add 1 to v-x
end-perform
end-if.
move 1 to v-pointer
if v-orig not = spaces
perform varying w-x from 1 by 1
until v2(w-x) not = spaces
string v2(w-x) delimited by spaces.
" " delimited by size
into v-dest
pointer v-pointer
end-perform
end-if.
01 VOUT PIC X(200).
01 VWORK PIC X(200).
01 VTEMP PIC X(200).
01 p1 pic 9999.
01 p2 pic 9999.
move 1 to p1 p2.
move spaces to vout vtemp.
perform until p1 > 200
unstring vwork delimited by all spaces
into vtemp
pointer p1
if vtemp not = spaces
string vtemp delimited by spaces
" " delimited by size
into vout
pointer p2
end-if
end-perform.