What do you expect this to do?
Maybe you should look at CASESTOVARS instead of trying to run code which it appears you do not understand.
eg VECTOR X=diag01 to diag20.
You only have up to diag06 in your data file
and you build an index? tasknum
but don't use it to populate the vector.
--
prasad wrote
How to convert this:
mast_enc ENDTYPE FUND diag01 diag0 diag03 diag04 diag05 diag06
..0.GVcV2Xk DR N E1120 N1891 D638 E1170 H350 Z8643
..0.GVcV2Xk DR N E1120 N1891 D638 E1170 I500 H350 J22
..0.GVcV2Xk DR N K529
To
..0.GVcV2Xk DR N E1120 N1891 D638 E1170 H350 Z8643 1500 J22 K529
i tried this, but it only pickups the first record.
COMPUTE tasknum=1.
DO IF ($CASENUM NE 1).
IF (MAST_ENC EQ LAG(MAST_ENC)) tasknum = LAG(tasknum)+1.
END IF.
VECTOR X=diag01 to diag20.
AGGREGATE
/OUTFILE=*
/BREAK=mast_enc
/diag01 to diag20= max (diag01 to diag 20).
EXECUTE.
your help is invaulable.
prasad
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"