[thelist] Asp Split

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Tue May 23 10:38:29 CDT 2006


		   Agreed.  I don't see what Split will do for you here, unless there are a million of these loops and the string manipulation turns out to be horrendously expensive (as with string concatenation).

   Where did you (Rob) read that Split with an empty string should work that way?  According to the VBScript docs on MSDN ( http://tinyurl.com/rf2hp ), you should receive a single-element array with the entire string in it; the fact that it's getting cut off at the first space makes me think you're returning something other than the standard unicode space character (or that you're using a different encoding schema).
   I'd be very curious about what is actually in these files.  If you get a chance, feel free to run it through the tool at
http://aspalliance.com/peterbrunone/analyzethis/analyzethis.asp ; the results could be interesting.

Cheers,

Peter

				From: "Tab Alleman" talleman at Lumpsum.com

Why not use the MID() function to get the 22-23 characters in each line (and another for the 1-2 characters)?

I once did something like that in an EDI interface I wrote in ASP. 

> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org]On Behalf Of Rob Smith
> 
> > What are you doing that requires an array of characters? 
> 
> :-\ *gulp*
> 
> In a nutshell, we're receiving a export.po file every 15 minutes that
> contains 60 characters or columns per line that contains information
> about the confirmation of our orders sent to third-party 
> warehouse drop
> ship solution that looks like: 
> 
> HR12345600019000012700020768601723BALSACCEPTED 09BBBDG*15:15
> HI12345600019000012800PO-601723 ACCEPTED 
> A112345600019000012900 ACCEPTED 
> A212345600019000013000 ACCEPTED 
> A312345600019000013100 ACCEPTED 
> A412345600019000013200 ACCEPTED 
> A512345600019000013300 ACCEPTED 
> A612345600019000013400 ACCEPTED 
> CI12345600019000013500 ACCEPTED 
> DT 00007312Z1000013600EPST544600 ACCEPTED 
> 
> There are hundreds of these per file.
> 
> Each grouping or set of characters per row has a different 
> meaning. The
> first row columns 1 and 2 is the HR or Header Row. Columns 3 through 8
> is our account number. Columns 9 through 13 is the 
> transmission number.
> And so on and so forth. 
> 
> The columns I'm really trying to isolate are cols 21 and 22. 
> That's the
> confirmation codes. Based upon the first two characters of each row,
> tells me how to handle each row in tandem with the conf codes. 
> 
> I need an array of characters to correctly parse the export file. 
> 
> In the end this is going to save our company and the company we're
> working with about $70k per year in overhead thanks to a little custom
> ASP/VBScript split function.
> 
> Rob Smith



More information about the thelist mailing list