22%macro mddl_derivedvars(libds=work.derived_vars);
25 %let libds=%upcase(&libds);
26 %
if %index(&libds,.)=0 %then %let lib=WORK;
27 %
else %let lib=%scan(&libds,1,.);
31 libref
char(8) label=
'Library Reference (8 chars)',
32 dsn
char(32) label=
'Dataset Name (32 chars)',
33 var_nm
char(32) label=
'Name of the derived variable',
34 var_deps
char(4000) label=
'Columns and derived variables this uses',
35 var_type
char(1) label=
'Either (C)haracter or (N)umeric',
36 var_len num label=
'Length of the derived variable',
37 var_fmt
char(32) label=
'SAS format, eg DATE9.',
38 var_label
char(256) label=
'Optional label; defaults to NAME=expression',
39 var_logic
char(4000) label=
'SAS expression that produces the value',
40 active num label=
'Is the variable active? (1/0)'
44 proc datasets lib=&lib noprint;
45 modify %scan(&libds,-1,.);
47 pk_derivedvars=(libref dsn var_nm)
51%mend mddl_derivedvars;