Could you please confirm my understanding on this:
In IMS-DC, usually with each MOD- variable ,we define
an attribute variable e.g.
01 MOD-VAR1-ATTR PIC S9(4) COMP.
01 MOD-VAR1 PIC X(5).
This has to be defined in your output message structure. Make sure that your output message length is increased if you are adding anything. In MFS the MOD variable must have ATTR=YES specified in message field definition. Using your logic you can move predefined values to the attribute variable to change the attribute dynamically (very much similar to CICS attribute handling)..
Set up an 01 level named attribute-byte-values in working storage. You will then define the attribute bytes as 05 levels - here are a couple:
05 protect-alpha pic 9(4) comp value 226.
05 unprotect-numeric-mod pic 9(4) comp value 211.
05 unprotect-alpha-mod-curs pic 9(5) comp value 49347.
05 unprotect-num-hi-mod-curs pic 9(5) comp value 49371.
Now if you want MOD-VAR1 to be protected :
MOVE protect-alpha to MOD-VAR1-ATTR .
Please correct me. Also how do you get values 226 or 211 etc for different attribute types?