mirror of
https://github.com/sasjs/core.git
synced 2026-01-20 15:00:05 +00:00
fix: ensuring test for mp_sortinplace passes, fixing uninitialised var in mp_mdtablewrite, fix for non pk table in mp_getformats
This commit is contained in:
35
all.sas
35
all.sas
@@ -5674,30 +5674,26 @@ run;
|
|||||||
@param [out] outsummary= (work.mp_getformats_summary) Output dataset
|
@param [out] outsummary= (work.mp_getformats_summary) Output dataset
|
||||||
containing summary definitions - structure taken from dictionary.formats as
|
containing summary definitions - structure taken from dictionary.formats as
|
||||||
follows:
|
follows:
|
||||||
|libname:$8.|memname:$32.|path:$1024.|objname:$32.|fmtname:$32.|fmttype:$1.|source:$1.|minw:best.|mind:best.|maxw:best.|maxd:best.|d
|
|
||||||
efw:best.|defd:best.|
|
|libname:$8.|memname:$32.|path:$1024.|objname:$32.|fmtname:$32.|fmttype:$1.|source:$1.|minw:best.|mind:best.|maxw:best.|maxd:best.|defw:best.|defd:best.|
|
||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||
|||||$|F|B|1|0|32767|0|1|0|
|
| | | | |$|F|B|1|0|32767|0|1|0|
|
||||||
|||||$|I|B|1|0|32767|0|1|0|
|
| | | | |$|I|B|1|0|32767|0|1|0|
|
||||||
|||/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWIANYDT|$ANYDTIF|I|U|1|0|60|0|19|0|
|
| | |/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWIANYDT|$ANYDTIF|I|U|1|0|60|0|19|0|
|
||||||
|||/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWFASCII|$ASCII|F|U|1|0|32767|0|1|0|
|
| | |/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWFASCII|$ASCII|F|U|1|0|32767|0|1|0|
|
||||||
|||/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWIASCII|$ASCII|I|U|1|0|32767|0|1|0|
|
| | |/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWIASCII|$ASCII|I|U|1|0|32767|0|1|0|
|
||||||
|||/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWFBASE6|$BASE64X|F|U|1|0|32767|0|1|0|
|
| | |/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWFBASE6|$BASE64X|F|U|1|0|32767|0|1|0|
|
||||||
|||/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWIBASE6|$BASE64X|I|U|1|0|32767|0|1|0|
|
|
||||||
|||/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWFBIDI|$BIDI|F|U|1|0|32767|0|1|0|
|
|
||||||
|||||$BINARY|F|B|1|0|32767|0|8|0|
|
|
||||||
|||||$BINARY|I|B|1|0|32767|0|8|0|
|
|
||||||
|
|
||||||
@param [out] outdetail= (0) Provide an output dataset in which to export all
|
@param [out] outdetail= (0) Provide an output dataset in which to export all
|
||||||
the custom format definitions (from proc format CNTLOUT). Definitions:
|
the custom format definitions (from proc format CNTLOUT). Definitions:
|
||||||
https://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473477.htm
|
https://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473477.htm
|
||||||
Sample data:
|
Sample data:
|
||||||
|
|
||||||
|NAME $|LENGTH 8|VARNUM 8|LABEL $|FORMAT $49|TYPE $1 |DDTYPE $|
|
|FMTNAME:$32.|START:$16.|END:$16.|LABEL:$256.|MIN:best.|MAX:best.|DEFAULT:best.|LENGTH:best.|FUZZ:best.|PREFIX:$2.|MULT:best.|FILL:$1.|NOEDIT:best.|TYPE:$1.|SEXCL:$1.|EEXCL:$1.|HLO:$13.|DECSEP:$1.|DIG3SEP:$1.|DATATYPE:$8.|LANGUAGE:$8.|
|
||||||
|---|---|---|---|---|---|---|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||
|AIR|8|2|international airline travel (thousands)|8.|N|NUMERIC|
|
|WHICHPATH|0|0|path1|1|40|28|28|1E-12||0||0|N|N|N| | | | | |
|
||||||
|DATE|8|1|DATE|MONYY.|N|DATE|
|
|WHICHPATH|`**OTHER**`|`**OTHER**`|big fat problem if not path1|1|40|28|28|1E-12||0||0|N|N|N|O| | | | |
|
||||||
|REGION|3|3|REGION|$3.|C|CHARACTER|
|
|
||||||
|
|
||||||
<h4> SAS Macros </h4>
|
<h4> SAS Macros </h4>
|
||||||
@li mf_dedup.sas
|
@li mf_dedup.sas
|
||||||
@@ -7631,6 +7627,7 @@ drop table &ds1;
|
|||||||
data _null_;
|
data _null_;
|
||||||
file &fref;
|
file &fref;
|
||||||
length line $32767;
|
length line $32767;
|
||||||
|
call missing(line);
|
||||||
put '|'
|
put '|'
|
||||||
%local i var fmt;
|
%local i var fmt;
|
||||||
%do i=1 %to %sysfunc(countw(&vars));
|
%do i=1 %to %sysfunc(countw(&vars));
|
||||||
@@ -8360,7 +8357,7 @@ select distinct memname into: table_list separated by ' '
|
|||||||
/* overlay actual sort key if it exists */
|
/* overlay actual sort key if it exists */
|
||||||
data _null_;
|
data _null_;
|
||||||
set work.&tempds1;
|
set work.&tempds1;
|
||||||
call symputx('sortkey',pk_fields);
|
call symputx('sortkey',coalescec(pk_fields,symget('sortkey')));
|
||||||
run;
|
run;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,30 +18,26 @@
|
|||||||
@param [out] outsummary= (work.mp_getformats_summary) Output dataset
|
@param [out] outsummary= (work.mp_getformats_summary) Output dataset
|
||||||
containing summary definitions - structure taken from dictionary.formats as
|
containing summary definitions - structure taken from dictionary.formats as
|
||||||
follows:
|
follows:
|
||||||
|libname:$8.|memname:$32.|path:$1024.|objname:$32.|fmtname:$32.|fmttype:$1.|source:$1.|minw:best.|mind:best.|maxw:best.|maxd:best.|d
|
|
||||||
efw:best.|defd:best.|
|
|libname:$8.|memname:$32.|path:$1024.|objname:$32.|fmtname:$32.|fmttype:$1.|source:$1.|minw:best.|mind:best.|maxw:best.|maxd:best.|defw:best.|defd:best.|
|
||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||
|||||$|F|B|1|0|32767|0|1|0|
|
| | | | |$|F|B|1|0|32767|0|1|0|
|
||||||
|||||$|I|B|1|0|32767|0|1|0|
|
| | | | |$|I|B|1|0|32767|0|1|0|
|
||||||
|||/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWIANYDT|$ANYDTIF|I|U|1|0|60|0|19|0|
|
| | |/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWIANYDT|$ANYDTIF|I|U|1|0|60|0|19|0|
|
||||||
|||/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWFASCII|$ASCII|F|U|1|0|32767|0|1|0|
|
| | |/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWFASCII|$ASCII|F|U|1|0|32767|0|1|0|
|
||||||
|||/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWIASCII|$ASCII|I|U|1|0|32767|0|1|0|
|
| | |/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWIASCII|$ASCII|I|U|1|0|32767|0|1|0|
|
||||||
|||/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWFBASE6|$BASE64X|F|U|1|0|32767|0|1|0|
|
| | |/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWFBASE6|$BASE64X|F|U|1|0|32767|0|1|0|
|
||||||
|||/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWIBASE6|$BASE64X|I|U|1|0|32767|0|1|0|
|
|
||||||
|||/opt/sas/sas9/SASHome/SASFoundation/9.4/sasexe|UWFBIDI|$BIDI|F|U|1|0|32767|0|1|0|
|
|
||||||
|||||$BINARY|F|B|1|0|32767|0|8|0|
|
|
||||||
|||||$BINARY|I|B|1|0|32767|0|8|0|
|
|
||||||
|
|
||||||
@param [out] outdetail= (0) Provide an output dataset in which to export all
|
@param [out] outdetail= (0) Provide an output dataset in which to export all
|
||||||
the custom format definitions (from proc format CNTLOUT). Definitions:
|
the custom format definitions (from proc format CNTLOUT). Definitions:
|
||||||
https://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473477.htm
|
https://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473477.htm
|
||||||
Sample data:
|
Sample data:
|
||||||
|
|
||||||
|NAME $|LENGTH 8|VARNUM 8|LABEL $|FORMAT $49|TYPE $1 |DDTYPE $|
|
|FMTNAME:$32.|START:$16.|END:$16.|LABEL:$256.|MIN:best.|MAX:best.|DEFAULT:best.|LENGTH:best.|FUZZ:best.|PREFIX:$2.|MULT:best.|FILL:$1.|NOEDIT:best.|TYPE:$1.|SEXCL:$1.|EEXCL:$1.|HLO:$13.|DECSEP:$1.|DIG3SEP:$1.|DATATYPE:$8.|LANGUAGE:$8.|
|
||||||
|---|---|---|---|---|---|---|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||
|AIR|8|2|international airline travel (thousands)|8.|N|NUMERIC|
|
|WHICHPATH|0|0|path1|1|40|28|28|1E-12||0||0|N|N|N| | | | | |
|
||||||
|DATE|8|1|DATE|MONYY.|N|DATE|
|
|WHICHPATH|`**OTHER**`|`**OTHER**`|big fat problem if not path1|1|40|28|28|1E-12||0||0|N|N|N|O| | | | |
|
||||||
|REGION|3|3|REGION|$3.|C|CHARACTER|
|
|
||||||
|
|
||||||
<h4> SAS Macros </h4>
|
<h4> SAS Macros </h4>
|
||||||
@li mf_dedup.sas
|
@li mf_dedup.sas
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
data _null_;
|
data _null_;
|
||||||
file &fref;
|
file &fref;
|
||||||
length line $32767;
|
length line $32767;
|
||||||
|
call missing(line);
|
||||||
put '|'
|
put '|'
|
||||||
%local i var fmt;
|
%local i var fmt;
|
||||||
%do i=1 %to %sysfunc(countw(&vars));
|
%do i=1 %to %sysfunc(countw(&vars));
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
/* overlay actual sort key if it exists */
|
/* overlay actual sort key if it exists */
|
||||||
data _null_;
|
data _null_;
|
||||||
set work.&tempds1;
|
set work.&tempds1;
|
||||||
call symputx('sortkey',pk_fields);
|
call symputx('sortkey',coalescec(pk_fields,symget('sortkey')));
|
||||||
run;
|
run;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user