hancockin
IS-IT--Management
- Sep 1, 2008
- 2
Hi,
I am trying to read a ~ delimited file which has one record starting with say 'A' (that's the identifier record), multiple records starting with 'B' and then multiple records (say record type 'C') within a record 'B'. I need to pull a field from record 'A', and store it in a variable say var1, read record 'B', again pull a field and store it in a variable (var2) and rewrite record 'B' by appending var1 to it (pulled from record 'A'). Now I'll be reading all the records of type 'C' (which appear within a record 'B') and rewrite them by appending var2 to them. One catch here is that position of var2 is not fixed because we may or may not receive values in few fields but the delimiter will be able to handle it.
I was trying to do this in DOS first but that didn't work out and now I am back to using vb script (because those r the only 2 options i have). Can someone help me with this ?
Thanks
I am trying to read a ~ delimited file which has one record starting with say 'A' (that's the identifier record), multiple records starting with 'B' and then multiple records (say record type 'C') within a record 'B'. I need to pull a field from record 'A', and store it in a variable say var1, read record 'B', again pull a field and store it in a variable (var2) and rewrite record 'B' by appending var1 to it (pulled from record 'A'). Now I'll be reading all the records of type 'C' (which appear within a record 'B') and rewrite them by appending var2 to them. One catch here is that position of var2 is not fixed because we may or may not receive values in few fields but the delimiter will be able to handle it.
I was trying to do this in DOS first but that didn't work out and now I am back to using vb script (because those r the only 2 options i have). Can someone help me with this ?
Thanks