SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Retain Function in Data Intergration studio 3.4

Reply
N/A
Posts: 1

Retain Function in Data Intergration studio 3.4

Good Morning,

Just wondering if someone can help me, i am trying to replicate a Retain Statement in DI studio, but i am struggling to find a method, i am simply wanting to create a new field which holds a value from a field already existing on the previous line,

for example:

retain ret_bal_cu ret_bal_pl ret_cls_dt amal mth_closed;
by pl_accnum pl_open_dt;

if first.pl_accnum and first.pl_open_dt then do;
ret_bal_cu=.;
ret_bal_pl=.;
ret_cls_dt=.;
end;

cu_prev_bal=ret_bal_cu;
pl_prev_bal=ret_bal_pl;
prev_cls_dt=ret_cls_dt;

ret_bal_cu=cu_curr_bal;
ret_bal_pl=pl_curr_bal;
ret_cls_dt=pl_cls_dt;


Can anyone provide any help?

cheers!
Respected Advisor
Posts: 3,900

Re: Retain Function in Data Intergration studio 3.4

Hi

I believe you would have to implement this with a "user written code" node.

... and if it comes to this then it's always worth asking if there is also another way to achieve the final result you need.

HTH
Patrick
Ask a Question
Discussion stats
  • 1 reply
  • 299 views
  • 0 likes
  • 2 in conversation