10-23-2012 11:40 AM
I wondered if anyone could shed some light here:
I have some User Written Code in a DI Studio job which was working fine. The user written code is within a loop and I changed the ordering of some of the tranforms and incorporated more things into the loop and suddenly the User Written Code stopped working.
The original code was:
data _null_; length keepvar $2000; retain keepvar;
set &_INPUT end=e;
if e then do;
/* write the macro variables just set to the log - for checking during development*/
When the code stopped working the %put &Keepvar was resulting in .
After much deliberation with my colleagues we decided to try changing the &_Input in the Data Step set statement to &_Input1 and this then worked. In the User Written Body code &_Input and &_Input1 appeared to be defined as the same thing as there is only one input data set so why did changing the code to &_Input1 work? Is it something to do with the ordering of the transforms and the loop?