dunno how to put my question...
got this table like:
fields a a1 a2 a3
record1 a1
record2 a2
record3 a1
how can i output the result to become
fields a a1 a2 a3
record1 a1 1 0 0
record2 a2 0 1 0
record3 a1 1 0 0
meaning to say, if a="a1", then replace a1 with "1", a2 and a3 with "0"
i tried to output the field name to an array using
y=AFIELDS(p)
FOR x=1 TO y STEP 1
? field(x)
ENDFOR
then i was using something like:
if a=field(x)
repl field(x) with "1"
endif
that gave me an error ... how can i solve this?
got this table like:
fields a a1 a2 a3
record1 a1
record2 a2
record3 a1
how can i output the result to become
fields a a1 a2 a3
record1 a1 1 0 0
record2 a2 0 1 0
record3 a1 1 0 0
meaning to say, if a="a1", then replace a1 with "1", a2 and a3 with "0"
i tried to output the field name to an array using
y=AFIELDS(p)
FOR x=1 TO y STEP 1
? field(x)
ENDFOR
then i was using something like:
if a=field(x)
repl field(x) with "1"
endif
that gave me an error ... how can i solve this?