diff --git a/all.sas b/all.sas index eb2c07b..f2925f2 100644 --- a/all.sas +++ b/all.sas @@ -3533,13 +3533,17 @@ run; make use of permanent tables. To avoid duplication in definitions, this macro provides a central location for managing the corresponding DDL. + Note - this macro is likely to be deprecated in future in favour of a + dedicated "datamodel" folder (prefix mddl) + + Any corresponding data would go in a seperate repo, to avoid this one + ballooning in size! + Example usage: %mp_coretable(LOCKTABLE,libds=work.locktable) @param [in] table_ref The type of table to create. Example values: - @li CNTLOUT_DS - Mimics the structure of the table produced by `proc format` - with the `cntlout=` option. @li DIFFTABLE - Used to store changes to tables. Used by mp_storediffs.sas and mp_stackdiffs.sas @li FILTER_DETAIL - For storing detailed filter values. Used by @@ -3570,31 +3574,6 @@ run; %local outds ; %let outds=%sysfunc(ifc(&libds=0,_data_,&libds)); proc sql; -%if &table_ref=CNTLOUT_DS %then %do; - create table &outds( - FMTNAME char(32) label='Format name' - ,START char(16) label='Starting value for format' - ,END char(16) label='Ending value for format' - ,LABEL char(23) label='Format value label' - ,MIN num length=3 label='Minimum length' - ,MAX num length=3 label='Maximum length' - ,DEFAULT num length=3 label='Default length' - ,LENGTH num length=3 label='Format length' - ,FUZZ num label='Fuzz value' - ,PREFIX char(2) label='Prefix characters' - ,MULT num label='Multiplier' - ,FILL char(1) label='Fill character' - ,NOEDIT num length=3 label='Is picture string noedit?' - ,TYPE char(1) label='Type of format' - ,SEXCL char(1) label='Start exclusion' - ,EEXCL char(1) label='End exclusion' - ,HLO char(13) label='Additional information' - ,DECSEP char(1) label='Decimal separator' - ,DIG3SEP char(1) label='Three-digit separator' - ,DATATYPE char(8) label='Date/time/datetime?' - ,LANGUAGE char(8) label='Language for date strings' - ); -%end; %if &table_ref=DIFFTABLE %then %do; create table &outds( load_ref char(36) label='unique load reference', @@ -5871,7 +5850,7 @@ filename &outref temp; FMTNAME char(32) ,START char(16) ,END char(16) - ,LABEL char(23) + ,LABEL char(256) ,MIN num length=3 ,MAX num length=3 ,DEFAULT num length=3 @@ -7157,6 +7136,10 @@ create table &outsummary as proc format library=&&fmtloc&i CNTLOUT=&tempds; select &&fmtname&i; run; + data &tempds; + length label $256; + set &tempds; + run; proc append base=&outdetail data=&tempds; run; %end; diff --git a/base/mp_coretable.sas b/base/mp_coretable.sas index 0aab97f..52a980e 100644 --- a/base/mp_coretable.sas +++ b/base/mp_coretable.sas @@ -5,13 +5,17 @@ make use of permanent tables. To avoid duplication in definitions, this macro provides a central location for managing the corresponding DDL. + Note - this macro is likely to be deprecated in future in favour of a + dedicated "datamodel" folder (prefix mddl) + + Any corresponding data would go in a seperate repo, to avoid this one + ballooning in size! + Example usage: %mp_coretable(LOCKTABLE,libds=work.locktable) @param [in] table_ref The type of table to create. Example values: - @li CNTLOUT_DS - Mimics the structure of the table produced by `proc format` - with the `cntlout=` option. @li DIFFTABLE - Used to store changes to tables. Used by mp_storediffs.sas and mp_stackdiffs.sas @li FILTER_DETAIL - For storing detailed filter values. Used by @@ -42,31 +46,6 @@ %local outds ; %let outds=%sysfunc(ifc(&libds=0,_data_,&libds)); proc sql; -%if &table_ref=CNTLOUT_DS %then %do; - create table &outds( - FMTNAME char(32) label='Format name' - ,START char(16) label='Starting value for format' - ,END char(16) label='Ending value for format' - ,LABEL char(23) label='Format value label' - ,MIN num length=3 label='Minimum length' - ,MAX num length=3 label='Maximum length' - ,DEFAULT num length=3 label='Default length' - ,LENGTH num length=3 label='Format length' - ,FUZZ num label='Fuzz value' - ,PREFIX char(2) label='Prefix characters' - ,MULT num label='Multiplier' - ,FILL char(1) label='Fill character' - ,NOEDIT num length=3 label='Is picture string noedit?' - ,TYPE char(1) label='Type of format' - ,SEXCL char(1) label='Start exclusion' - ,EEXCL char(1) label='End exclusion' - ,HLO char(13) label='Additional information' - ,DECSEP char(1) label='Decimal separator' - ,DIG3SEP char(1) label='Three-digit separator' - ,DATATYPE char(8) label='Date/time/datetime?' - ,LANGUAGE char(8) label='Language for date strings' - ); -%end; %if &table_ref=DIFFTABLE %then %do; create table &outds( load_ref char(36) label='unique load reference', diff --git a/base/mp_filterstore.sas b/base/mp_filterstore.sas index f0ff2e5..8a78d48 100644 --- a/base/mp_filterstore.sas +++ b/base/mp_filterstore.sas @@ -121,7 +121,7 @@ FMTNAME char(32) ,START char(16) ,END char(16) - ,LABEL char(23) + ,LABEL char(256) ,MIN num length=3 ,MAX num length=3 ,DEFAULT num length=3 diff --git a/base/mp_getformats.sas b/base/mp_getformats.sas index 55ead0a..82a0c63 100644 --- a/base/mp_getformats.sas +++ b/base/mp_getformats.sas @@ -134,6 +134,10 @@ create table &outsummary as proc format library=&&fmtloc&i CNTLOUT=&tempds; select &&fmtname&i; run; + data &tempds; + length label $256; + set &tempds; + run; proc append base=&outdetail data=&tempds; run; %end;