WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: 1bosborn on April 18, 2014, 04:32:28 AM

Title: Retrieving data from an array
Post by: 1bosborn on April 18, 2014, 04:32:28 AM
I have an old version of the compiler, 2003H. I have a text file with several hundred records that I need to compare to another file with about 90 records. I figured I would load the second file into an array using ArrayFileGetCSV and then as I read each line of the first file I would search the array for a match to a particular field and return another piece of data from the second file (like vlookup in a spreadsheet program). Problem is I've never used arrays before and can't figure out how to search the array. The only functions I see are to create arrays either from scratch or from a file and to create a file from an array. Any suggestions?
Title: Re: Retrieving data from an array
Post by: Deana on April 18, 2014, 08:12:29 AM
WinBatch 2003H is quite an old version. A number of new array functions have been added since your version. Current versions of WinBatch use ArrayLocate or ArraySearch to easily search arrays. Older versions of WinBatch had to use 'Content Addressable Memory'. For details please see the end of this article: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/Arrays+Searching~an~array~for~data.txt


Title: Re: Retrieving data from an array
Post by: 1bosborn on April 18, 2014, 09:23:38 AM
Thanks for the reply. I know mine was WAY old. I guess I got my money's worth over the years and will bite the bullet and get the new version. Thanks again.
Title: Re: Retrieving data from an array
Post by: Deana on April 18, 2014, 09:37:40 AM
Quote from: 1bosborn on April 18, 2014, 09:23:38 AM
Thanks for the reply. I know mine was WAY old. I guess I got my money's worth over the years and will bite the bullet and get the new version. Thanks again.

There have been lots of improvements since WinBatch  2003. To see a list of everything that is new since your version check out:  http://www.winbatch.com/whatsnew.html

If you are interested in updating to a more recent version, visit our renewals page:  http://renewal.winbatch.com