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.
77 ws-len pic s9(004) comp.
77 ws-ptr pic s9(004) comp.
01 ws-string-fld.
05 ws-how pic x(003).
05 ws-dy pic x(004).
01 ws-howdy pic x(005).
move +1 to ws-ptr ws-len
unstring ws-string-fld
into ws-howdy delimited
by all ' '
count ws-len pointer ws-ptr
end-unstring
unstring ws-string-fld
into ws-howdy(ws-len + 1:) delimited
by all ' ' pointer ws-ptr
end-unstring
move + 1 to in-ptr out-ptr
perform
until ws-string-fld(in-ptr:1) = ' '
or in-ptr > length of ws-string-fld
if ws-string-fld(in-ptr:1) not = ' '
move ws-string-fld(in-ptr:1)
to ws-howdy (out-ptr:1)
add +1 to out-ptr
end-if
add +1 to in-ptr
end-perform
01 remove-space-field.
03 rsf-leading-space pic x.
03 rsf-rest pic x(100).
move subject-of-interest to remove-space-field.
if remove-space-field not = space
perform until rsf-leadings-space not = space
move rsf-rest to remove-space-field
end-perform
end-if.
01 IN-PTR PIC 999.
01 OUT-PTR PIC 999.
01 HOW PIC X(10) VALUE " how ".
01 DY PIC X(10) VALUE " dy ".
01 HOWDY PIC X(20).
...
MOVE 1 to OUT-PTR.
MOVE SPACES TO HOWDY.
if HOW not equal SPACES
MOVE 1 to IN-PTR
INSPECT HOW TALLYING IN-PTR FOR LEADING SPACES
STRING HOW (IN-PTR:) DELIMITED BY SPACE
INTO HOWDY POINTER OUT-PTR
end-if.
if DY not equal SPACES
MOVE 1 to IN-PTR
INSPECT DY TALLYING IN-PTR FOR LEADING SPACES
STRING DY (IN-PTR:) DELIMITED BY SPACE
INTO HOWDY POINTER OUT-PTR
end-if.
INSPECT VAR2 TALLYING SPACE-CNT FOR LEADING SPACES
IF SPACE-CNT > ZERO
MOVE VAR2(SPACE-CNT+1 :) TO TEMP-VAR2
ELSE
MOVE VAR2 TO TEMP-VAR2
END-IF
STRING
VAR1 TEMP-VAR2
DELIMITED BY SPACE
INTO VAR3
END-STRING