Running CATS in a DO loop
Posted: Fri Jun 26, 2015 12:28 pm
Hi,
I need to run CATS procedures over a large number of datasets. I tried to achieve this with a DO loop, which has the following structure (simplified)
For some reason, the loop stops after CATS has been executed for the first time - it prints all the output, skips the remaining instructions in the DO block, and the executes what comes after it.
My guess is that somewhere in the CATS procedure, either a BREAK instruction occurs and triggers the loop to end, or some 'silent' error occurs (no such thing is being displayed). Is this possible? The procedure as such is working perfectly fine, and any other instructions I include in the loop are being executed without any problems, as long as I omit the CATS bit.
Thanks already,
Lionel
I need to run CATS procedures over a large number of datasets. I tried to achieve this with a DO loop, which has the following structure (simplified)
Code: Select all
source(noecho) "C:\Program Files (x86)\CATS2\CATS.src"
DO i = 1,20
DEC STRING FNAME
COMP FNAME = %dataset(i)+".xls"
open data &FNAME
data(format=xls,org=obs)
calendar 1960
allocate 2007:1
@CATS(lags=1) 1960:1 2007:1
#var1 var2 var3 var4 var5
<some other instructions>
END DO i
<some more instructions>
My guess is that somewhere in the CATS procedure, either a BREAK instruction occurs and triggers the loop to end, or some 'silent' error occurs (no such thing is being displayed). Is this possible? The procedure as such is working perfectly fine, and any other instructions I include in the loop are being executed without any problems, as long as I omit the CATS bit.
Thanks already,
Lionel