|
Macros for SAS Application Developers
https://github.com/sasjs/core |
Returns the type of the format. More...
Go to the source code of this file.
Returns the type, eg DATE / DATETIME / TIME (based on hard-coded lookup) else CHAR / NUM.
This macro may be extended in the future to support custom formats - this would necessitate a call to dosubl() for running a proc format with cntlout.
The function itself takes the following (positional) parameters:
| PARAMETER | DESCRIPTION |
|---|---|
| fmtnm | Format name to be tested. Can be with or without the w.d extension. |
Usage:
%mcf_getfmttype(wrap=YES, insert_cmplib=YES)
data _null_;
fmt1=mcf_getfmttype('DATE9.');
fmt2=mcf_getfmttype('DATETIME');
put (fmt:)(=);
run;
%put fmt3=%sysfunc(mcf_getfmttype(TIME9.));
Returns:
fmt1=DATE fmt2=DATETIME fmt3=TIME
| [out] | wrap= | (NO) Choose YES to add the proc fcmp wrapper. |
| [out] | lib= | (work) The output library in which to create the catalog. |
| [out] | cat= | (sasjs) The output catalog in which to create the package. |
| [out] | pkg= | (utils) The output package in which to create the function. Uses a 3 part format: libref.catalog.package |
| [out] | insert_cmplib= | DEPRECATED - The CMPLIB option is checked and values inserted only if needed. |
Definition in file mcf_getfmttype.sas.