|
All,
I'm drawing a blank on a better solution than what I have, so I'd appreciate your input.
My program needs to merge a couple of data sets and write a temp target table which then appended to a permanent data set. I want to ensure that the temp table has the same column attributes as the permanent data set so that PROC APPEND will not complain. Here is the solution I have. it works but it really looks odd and I'm drawing a blank on a better solution than what I have, so I'd appreciate your input.
data append_em;
/* get variable attributes - nothing is read */
if "a" = "b" then
set mylib.perm_data_set;
---merge code and other stuff here ---
run;
proc append base=mylib.perm_data_set
data=append_em
force;
run;
Since the append code will actually be created in the ETL Studio Loader Transformation, I don't care about having extra variables in append_em. I just want to make sure that the variables for mylib.perm_data_set have the correct length, type, label, informat, and format. I tried this:
data append_em;
set mylib.perm_data_set (obs=0);
---merge code and other stuff here ---
run;
but when it runs it generates 0 observations in my tests. I think there is a simple solution other than coding an always-false contruct but I can't think of it.
TIA,
Clint Rickards
Dual Card Fraud Strategy Manager
GE Consumer Finance
Shelton, CT
(Internal) 8*370-6156
(External) (203) 944-6156
|