Skip to content

Instantly share code, notes, and snippets.

@lixzhang
Last active September 1, 2016 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lixzhang/11afdc2d2ed88b02a4ec3c1cb8f6a75f to your computer and use it in GitHub Desktop.
Save lixzhang/11afdc2d2ed88b02a4ec3c1cb8f6a75f to your computer and use it in GitHub Desktop.
data bank_mod (drop = i month Expense) ;
set bank ;
by CardID ;
if _n_ = 1 then do ;
array Expensex(3) Expense1 - Expense3 ;
end ;
retain Expense1 - Expense3 ;
if first.CardID then do ;
do i = 1 to 3 ;
Expensex(i) = . ;
end ;
end ;
Expensex(month) = Expense ;
if last.CardID then output ;
run ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment