1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-11 06:24:35 +00:00

fix: setting default to best. over 8. for mf_getformat with force option

This commit is contained in:
Allan Bowe
2021-05-07 11:20:01 +03:00
parent af98909753
commit 298acc4e50
2 changed files with 10 additions and 10 deletions

10
all.sas
View File

@@ -932,9 +932,9 @@ options noquotelenmax;
8.
NOTE: Variable renegade does not exist in test
@param libds Two part dataset (or view) reference.
@param var Variable name for which a format should be returned
@param force Set to 1 to supply a default if the variable has no format
@param [in] libds Two part dataset (or view) reference.
@param [in] var Variable name for which a format should be returned
@param [in] force=(0) Set to 1 to supply a default if the variable has no format
@returns outputs format
@author Allan Bowe
@@ -969,7 +969,7 @@ options noquotelenmax;
%let vlen = %sysfunc(varlen(&dsid, &vnum));
%let vtype = %sysfunc(vartype(&dsid, &vnum.));
%if &vtype=C %then %let vformat=$&vlen..;
%else %let vformat=8.;
%else %let vformat=best.;
%end;
@@ -977,7 +977,7 @@ options noquotelenmax;
%let rc = %sysfunc(close(&dsid));
/* Return variable format */
&vformat
%mend;/**
%mend mf_getVarFormat;/**
@file
@brief Returns the length of a variable
@details Uses varlen function to identify the length of a particular variable.

View File

@@ -23,9 +23,9 @@
8.
NOTE: Variable renegade does not exist in test
@param libds Two part dataset (or view) reference.
@param var Variable name for which a format should be returned
@param force Set to 1 to supply a default if the variable has no format
@param [in] libds Two part dataset (or view) reference.
@param [in] var Variable name for which a format should be returned
@param [in] force=(0) Set to 1 to supply a default if the variable has no format
@returns outputs format
@author Allan Bowe
@@ -60,7 +60,7 @@
%let vlen = %sysfunc(varlen(&dsid, &vnum));
%let vtype = %sysfunc(vartype(&dsid, &vnum.));
%if &vtype=C %then %let vformat=$&vlen..;
%else %let vformat=8.;
%else %let vformat=best.;
%end;
@@ -68,4 +68,4 @@
%let rc = %sysfunc(close(&dsid));
/* Return variable format */
&vformat
%mend;
%mend mf_getVarFormat;