mirror of
https://github.com/sasjs/core.git
synced 2026-01-06 00:50:05 +00:00
fix: tidy up of SAS flavour DDL
This commit is contained in:
10
all.sas
10
all.sas
@@ -2642,7 +2642,7 @@ run;
|
|||||||
%let curds=%scan(&dsnlist,&x);
|
%let curds=%scan(&dsnlist,&x);
|
||||||
data _null_;
|
data _null_;
|
||||||
file &fref mod;
|
file &fref mod;
|
||||||
length nm lab $1024;
|
length nm lab $1024 typ $20;
|
||||||
set &colinfo (where=(upcase(memname)="&curds")) end=last;
|
set &colinfo (where=(upcase(memname)="&curds")) end=last;
|
||||||
|
|
||||||
if _n_=1 then do;
|
if _n_=1 then do;
|
||||||
@@ -2656,10 +2656,12 @@ run;
|
|||||||
end;
|
end;
|
||||||
else put " ,"@@;
|
else put " ,"@@;
|
||||||
if length(format)>1 then fmt=" format="!!cats(format);
|
if length(format)>1 then fmt=" format="!!cats(format);
|
||||||
len=" length="!!cats(length);
|
if length(label)>1 then lab=" label="!!quote(trim(label));
|
||||||
lab=" label="!!quote(trim(label));
|
|
||||||
if notnull='yes' then notnul=' not null';
|
if notnull='yes' then notnul=' not null';
|
||||||
put name type len fmt notnul lab;
|
if type='char' then typ=cats('char(',length,')');
|
||||||
|
else if length ne 8 then typ='num length='!!left(length);
|
||||||
|
else typ='num';
|
||||||
|
put name typ fmt notnul lab;
|
||||||
run;
|
run;
|
||||||
|
|
||||||
/* Extra step for data constraints */
|
/* Extra step for data constraints */
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ run;
|
|||||||
%let curds=%scan(&dsnlist,&x);
|
%let curds=%scan(&dsnlist,&x);
|
||||||
data _null_;
|
data _null_;
|
||||||
file &fref mod;
|
file &fref mod;
|
||||||
length nm lab $1024;
|
length nm lab $1024 typ $20;
|
||||||
set &colinfo (where=(upcase(memname)="&curds")) end=last;
|
set &colinfo (where=(upcase(memname)="&curds")) end=last;
|
||||||
|
|
||||||
if _n_=1 then do;
|
if _n_=1 then do;
|
||||||
@@ -145,10 +145,12 @@ run;
|
|||||||
end;
|
end;
|
||||||
else put " ,"@@;
|
else put " ,"@@;
|
||||||
if length(format)>1 then fmt=" format="!!cats(format);
|
if length(format)>1 then fmt=" format="!!cats(format);
|
||||||
len=" length="!!cats(length);
|
if length(label)>1 then lab=" label="!!quote(trim(label));
|
||||||
lab=" label="!!quote(trim(label));
|
|
||||||
if notnull='yes' then notnul=' not null';
|
if notnull='yes' then notnul=' not null';
|
||||||
put name type len fmt notnul lab;
|
if type='char' then typ=cats('char(',length,')');
|
||||||
|
else if length ne 8 then typ='num length='!!left(length);
|
||||||
|
else typ='num';
|
||||||
|
put name typ fmt notnul lab;
|
||||||
run;
|
run;
|
||||||
|
|
||||||
/* Extra step for data constraints */
|
/* Extra step for data constraints */
|
||||||
|
|||||||
Reference in New Issue
Block a user