All,
I am encountering an interesting problem and would again appreciate your insights.
Essentially, I have a fanout record and asub record that resemble the following pseudocode:
record(fanout, “fanout_rec”)
{
field(SCAN, “Passive”)
field(LNK0, “aao_rec_1”)
field(LNK1, “aao_rec_2”)
field(LNK2, “asub_rec”)
}
record(asub, “asub_rec”)
{
field(SCAN, “Passive”)
field(SNAM, “c_code”)
field(INPA, “aao_rec_1”)
field(FTVA, “CHAR”)
field(NOA, 2048)
field(INPB, “aao_rec_2”)
field(FTVB, “DOUBLE”)
field(NOB, 2048)
}
My goal was to first process the first two aao records so they contain the most up-to-date values before processing “asub_rec”. When I attempt to retrieve the values from both aao records within “c_code”, it is getting previous values that
they contained prior to their latest processing.
For instance, if “aao_rec_1” contained “hello”, then when I print out “(CHAR*)prec->a” in “c_code”, it prints out nothing. But when I process it again, but with a different value, I print out “hello”, rather than the latest value it has.
I’m beginning to think it might be better to use the PP flag for INPA and INPB like this:
record(asub, “asub_rec”)
{
field(SCAN, “Passive”)
field(SNAM, “c_code”)
field(INPA, “aao_rec_1 PP”)
field(FTVA, “CHAR”)
field(NOA, 2048)
field(INPB, “aao_rec_2 PP”)
field(FTVB, “DOUBLE”)
field(NOB, 2048)
}
Any thoughts or suggestions?
Andy