D
dan.bent
I'm confused and up against a deadline. I expect it's an easy question,
but let me know if I need to provide more info.
I have a source file that contains several fields, any of which may
contain the coverage (I work in Insurance) data I need. I need to find
a way to get the right data. The actual data is in a fixed length ASCII
file, but I'll show it as comma seperated for clarity.
Example:
Record 1:
Bob,MED,DEN,VIS,MEDPLAN,DENPLAN,VISPLAN
Record 2:
Mary,DEN,VIS,MED,DENPLAN,VISPLAN,MEDPLAN
I've parsed the file, so I have field names of:
name,cov1,cov2,cov3,plan1,plan2,plan3
I only need to associate MED with MEDPLAN (of course, the actual plan
names are not so simple). I was thinking that since I can easily
identify which coverage field contains MED, I ought to be able to use
the field number (1 in Bob's case, 3 in Mary's) to get to the plan. I
just don't know the syntax to get the content of the field returned.
I've tried writing code that correctly identifies which "cov" field
contains "MED", but I'm not getting the content of the "plan" field.
I've tried:
if($MED ne '0'){
$medplan=$'plan'.$MED ;
}
Where $MED is the number of the "cov" field that contains "MED", but
that didn't give me what I wanted.
Is that clear? I'm not sure I've explained the problem well.
Anyway, I appreciate the effort or everyone who has taken the time to
read this far, and I'm eager to learn whatever information folks are
willing to share.
but let me know if I need to provide more info.
I have a source file that contains several fields, any of which may
contain the coverage (I work in Insurance) data I need. I need to find
a way to get the right data. The actual data is in a fixed length ASCII
file, but I'll show it as comma seperated for clarity.
Example:
Record 1:
Bob,MED,DEN,VIS,MEDPLAN,DENPLAN,VISPLAN
Record 2:
Mary,DEN,VIS,MED,DENPLAN,VISPLAN,MEDPLAN
I've parsed the file, so I have field names of:
name,cov1,cov2,cov3,plan1,plan2,plan3
I only need to associate MED with MEDPLAN (of course, the actual plan
names are not so simple). I was thinking that since I can easily
identify which coverage field contains MED, I ought to be able to use
the field number (1 in Bob's case, 3 in Mary's) to get to the plan. I
just don't know the syntax to get the content of the field returned.
I've tried writing code that correctly identifies which "cov" field
contains "MED", but I'm not getting the content of the "plan" field.
I've tried:
if($MED ne '0'){
$medplan=$'plan'.$MED ;
}
Where $MED is the number of the "cov" field that contains "MED", but
that didn't give me what I wanted.
Is that clear? I'm not sure I've explained the problem well.
Anyway, I appreciate the effort or everyone who has taken the time to
read this far, and I'm eager to learn whatever information folks are
willing to share.