Thanks for any help.
I have 2 files and I am reading in the second file and reformating it with output going to a third file. My problem is I need to read the first file and compare with second file and if data in a field matches I need to replace it with the data from the first file. The compare has to ignore case.
File 1:
FieldType: Text
FieldName: loan_dt
FieldNameAlt: enter date of loan
---
FieldType: Text
FieldName: Contract_nmbr
FieldNameAlt: enter contact number
and so on.
File 2:
^FIELD LOAN_DT
12/31/2011
^FIELD CONTACT_NMBR
A351232
and so on.
I have a script that does all of the reformating and output to file 3 but what I need is if:
File 2: If ($1 == "^FIELD") I need to use $2 data to search File1 and if found replace what is in $2 with data from File1 so I can send it to output.
I know I probably need to array File1 but have not been able to get anything to work.
I am trying to get LOAN_DT to be loan_dt and CONTACT_NMBR to be Contact_nmbr.
Thanks,
I have 2 files and I am reading in the second file and reformating it with output going to a third file. My problem is I need to read the first file and compare with second file and if data in a field matches I need to replace it with the data from the first file. The compare has to ignore case.
File 1:
FieldType: Text
FieldName: loan_dt
FieldNameAlt: enter date of loan
---
FieldType: Text
FieldName: Contract_nmbr
FieldNameAlt: enter contact number
and so on.
File 2:
^FIELD LOAN_DT
12/31/2011
^FIELD CONTACT_NMBR
A351232
and so on.
I have a script that does all of the reformating and output to file 3 but what I need is if:
File 2: If ($1 == "^FIELD") I need to use $2 data to search File1 and if found replace what is in $2 with data from File1 so I can send it to output.
I know I probably need to array File1 but have not been able to get anything to work.
I am trying to get LOAN_DT to be loan_dt and CONTACT_NMBR to be Contact_nmbr.
Thanks,