Im trying to create a string list of all the series in a workfile whose end date is before a certain benchmark end date which Ive stored as a scalar program variable (using @dateval) called !current. By end date of a series I mean the last non-NA value.
Code: Select all
group short
for %co {%alls}
smpl if TUBPSF{%co}<>na
!end_date = @dateval(@otods(@obs(TUBPSF{%co})))
if !end_date<!current then
short.add TUBPSF{%co}
endif
next
%shorts = short.@members
The above code does the job, But Im wondering if there is a more efficient way of doing this, as it seems computationally expensive.
We can do this operation in a single line of code in AREMOS. Thanks!