/** @file @brief Validates a column of values, including the Data Controller format-catalog form of a libds reference @details Wrapper around mp_validatecol() that adds the Data Controller convention of addressing a format catalog as `LIBREF.CATALOGNAME-FC` to the LIBDS rule. The `-FC` suffix is matched exactly and the remainder is validated as a strict LIBREF.DATASET, so the *whole* value is covered by the validation - a bare scan on the dash would leave anything after it unvalidated. The input column itself is never modified, so a caller that needs the catalog reference downstream (to match MPE_SECURITY, for instance) still receives it. @param [in] incol Input column (a data step variable) @param [in] rule Validation rule, as per mp_validatecol() @param [out] outcol 1 when the value is valid, else 0

SAS Macros

@li mp_validatecol.sas @li mf_getuniquename.sas @version 9.2 @author 4GL Apps Ltd @copyright 4GL Apps Ltd. This code may only be used within Data Controller and may not be re-distributed or re-sold without the express permission of 4GL Apps Ltd. **/ %macro mpe_validatecol(incol,rule,outcol); %if &rule=LIBDS %then %do; /* tempcol is given a unique name with every invocation */ %local tempcol; %let tempcol=%mf_getuniquename(prefix=cat); &tempcol=strip(&incol); /* permit the format-catalog form: LIBREF.CATALOGNAME-FC, exactly */ if length(&tempcol)>3 and upcase(substr(&tempcol,length(&tempcol)-2,3))='-FC' then &tempcol=substr(&tempcol,1,length(&tempcol)-3); %mp_validatecol(&tempcol,LIBDS,&outcol) drop &tempcol; %end; %else %mp_validatecol(&incol,&rule,&outcol); %mend mpe_validatecol;