I have 4 fields in my map which are 9(6),9(3),9(3),9(3). I wrote validation code like this:
IF ROLLNUM IS NOT NUMERIC
MOVE DFHRED TO ROLLNUMC
MOVE 'INVALID DATA' TO RESMSGO
MOVE ROLLNUMI TO ROLLNUMO
PERFORM SEND-MAP THRU SEND-MAP-EXIT
PERFORM KEY-VALIDATION THRU KEY-VALIDATION-EXIT.
But I am not getting any kind of error while inserting the values like A12AK into the database from cics. It is replacing A with 1, B with 2, and so on…
Why is this happening? And how to avoid this
Add ATTRB=(UNPROT,NUM,FSET,IC) to the DFHMDF fields of the BMS mapset for the numeric fields.
You’ll also need JUSTIFY=(RIGHT,ZERO).