Guest_imported
New member
- Jan 1, 1970
- 0
I am new to VBscript and am writing a script to read in one file and write 2 other files based on a couple criteria.
For example: In the incoming file if field 3, positions 2,2 ="02" or "04" or "06" or "08" then write file1 else write file2. I have the code written to do all of this except I can't figure out how to easily make the determination as to which file it goes to. How do I code this to look in a particular position (its a particular position in the record since these files are fixed length ascii) for several different possibilities? I read the regexp and match objects/collections and didnot understand how to do this. At the end of this code I just need a variable that is equal to constant "file1" or constant "file2".
Please help.
Thanks
H
For example: In the incoming file if field 3, positions 2,2 ="02" or "04" or "06" or "08" then write file1 else write file2. I have the code written to do all of this except I can't figure out how to easily make the determination as to which file it goes to. How do I code this to look in a particular position (its a particular position in the record since these files are fixed length ascii) for several different possibilities? I read the regexp and match objects/collections and didnot understand how to do this. At the end of this code I just need a variable that is equal to constant "file1" or constant "file2".
Please help.
Thanks
H