The easiest way to do this is by using a higher group level.<br><br>Example : <br><br>01 char-low-value pic x value x"00".<br>01 variables.<br> 05 var-1 pic x(20).<br> 05 var-2 pic 9(5).<br> 05 var-3x.<br> 10 var-3 pic s9(9) comp.<br> 05 var-4 pic x(5).<br> ...<br><br>string var-2 char-low-value<br> var-3x <br> var-1 char-low-value<br> delimited by size into ... <br><br><br>
Dixi's response will work if you want the binary data in your string. If you want the numeric value, you will have to move it to a different field, eg.
01 STRING-FIELD.
05 NUMERIC-FIELD PIC +9(9).
MOVE COMP-FIELD TO NUMERIC-FIELD.
STRING FIELD-1
FIELD-2
STRING-FIELD
OTHER-FIELD DELIMITED BY SIZE
INTO STRING-VARIABLE.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.