My format table contains start, end and label columns,
For Label - Not Prime the start and end vales are **OTHER**, the other labels are correctly populates where as Not Prime is not populated and output is getting impacted, how to over come this and get "Not Prime " instead below values
It is not clear what you mean.
Did you define a custom format? Did you do it by writing a VALUE statement? Please show the value statement.
Did you do it by creating a CTLNIN dataset? Please show the dataset. Does the dataset contain the HLO variable?
Show an example input dataset and how you want those values to print when using the format.
Please post code and data as text, not photographs.
***OTHER*** for start/end values appear when the format was defined with an "OTHER =" statement, or setting the HLO variable to include 'O' in a format cntlin data set indicating that any value not appearing in an explicit assignment range will be assigned the label. This is normal.
Showing a picture from a part of spreadsheet is not particularly helpful to diagnose something.
Where is the code that creates the format? That would help.
Or if you used a Cntlin data set with proc format then the values in that data set.
Then actual examples of the data. I am afraid that the picture you show sort of implies that the values of your data are likely to be character and ranges notoriously do not work well with character values because of the comparisons are conducted to result in equal/not equal.
The key for the "other" category to work is that variable HLO='O'. If HLO is blank or not even contained in your CNTLIN dataset, the string "**OTHER**" in the START and END variables is treated like any other string. It has no special meaning. However, if HLO='O', the values of START and END are ignored for that observation, so you can leave them blank. The string "**OTHER**" for START and END will appear in FMTLIB output and a CNTLOUT dataset automatically. There is no need to type it.
data fmt; retain fmtname '$testfmt'; input start $ label $ hlo $; cards; A one . B two . . any O ; proc format cntlin=fmt; run; data _null_; do c='A','B','X'; put c $testfmt.; end; run;
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.