05 PLAIN-SSN.
10 P1 PIC X(03).
10 P2 PIC X(02).
10 P3 PIC X(04).
05 FORMATTED-SSN.
10 P1 PIC X(03).
10 F PIC X(01) VALUE '-'.
10 P2 PIC X(02).
10 F PIC X(01) VALUE '-'.
10 P3 PIC X(04).
. . .
MOVE CORR PLAIN-SSN TO FORMATTED-SSN
If you're dealing w/lots of data this can save a bit of CPU time. The draw-back is that to reference the Px- fields you have to user qualifiers, e.g. "P1 OF FORMATTED-SSN". That can be cumbersome, but there are ways around it.
Regards, Jack.
"A problem well stated is a problem half solved" -- Charles F. Kettering
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.