You are here: Development Standards > Upgrading OSAS > OSAS 4.5x Upgrade Procedure > Implement Error 43 Protection

# Implement Error 43 Protection

You must merge the GENNUM routine into programs that display or print numerics. This general routine uses line 10000–10009, and handles numeric masking, using a function called FNNUM$(). This function accepts a numeric value and a mask, and returns a string containing the masked numeric value or asterisks (*) if the value overflows the mask. To use this function within a program, follow these steps:

1. Assign the masks used in the program to string variables. For example,
   `DOLLMASK$=“-”+STBL(“+DOLL”)`
   `PCTMASK$=“-#####.00”`
   The global strings for user-defined masks do not contain minus signs (-). You must add them, in keeping with OSAS standards, to the beginning of the mask for screen display or to the end of the mask for report output.
2. When displaying or printing a numeric value, use the FNNUM$() function:
   `PRINT @(12,4),FNNUM$(QUANTITY,QTYMASK$),`
   or
   `PRINT (F)@(45),FNNUM$(PERCENT,PCTMASK$),`