Transpose your data into a narrow format with columns Acct Amount Date and everything else becomes simple.
What @Patrick said: transpose, and it's almost a non-issue. See Maxims 19 & 33.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.