Posts

Showing posts with the label IFC

IFC and IFN functions: New IF functions:

Objective: To Reduce the amount of typing required achieving an objective Syntax: IFN (condition, true, false, missing): ‘N’ stands for Numeric IFN returns a numeric value. It returns the true, false or missing value depending on whether the condition is true, false or missing. Syntax: IFC (condition, true, false, missing): ‘C’ stands for character IFC function has four parameters: 1) a logical expression 2) character value returned when true 3) value returned when false 4) value retuned when missing, which is optional. IFC (logical-expression, Character-value-returned-when-true, Character-value-returned-when-false, Character-value-returned-when-missing); IFC returns a character value. It returns the true, false or missing value depending on whether the condition is true, false or missing. Example: Assign a value to the VISIT variable (new) as per the VTYPE variable value. We can certainly achieve this task in diff. ways.. here are they... data old; input sitesub $ vtype vdate $; card...