Variables from a long text string

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 35400
interpreted = N
texte = I'm trying to tie-in with a legacy system that responds to my requests by delivering a single long text string delimited by the pipe character (|). I can't seem to figure out the best technique to break up the incoming string and build a bunch of varibles that I can then use to write out the final html. Conceptually I have to use this text string a bunch of founditems that I would typically get from searching WebCat db.Here's a simplified example of what I get from the legacy system (all one string-ignore any breaks):Msg_Hdr|Msg_ID|My_ID||Start_of_Record|Tel555-555-1212|NameBob Jones|Add1234 Fox St||Start_of_Record|Tel714-555-5555|NameWill Smith|Add36 Willbory St|end_of_msg||And here's what I know about the message: The first section is always the message header delimited by 2 pipes, followed by sections for each record, each record also ends with 2 pipes. I do not know the number of records being returned nor the order of the fields, nor anything about the number of characters.Out of this mess I'd like to end up setting the following varibles:TotalRecords=2 Telephone1=555-555-1212 Name1=Bob Jones Address1=1234 Fox St Telephone2=714-555-5555 Name1=Will Smith Address1=36 Willbory StCan this be done using WebCat? If so can someone point me in the right direction? If not, what tools would folks recommend I use to parse out this string into something useful? Breaking up the string seems straight forward but assigning a record number (ala, using an [index] value) so far elludes me.Many thanks, Marty Schmid Artwerks------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Variables from a long text string (Marty Schmid 2000)
  2. Re: Variables from a long text string (James Howarth 2000)
  3. Re: Variables from a long text string (John Butler 2000)
  4. Re: Variables from a long text string (Kenneth Grome 2000)
  5. Variables from a long text string (Marty Schmid 2000)
I'm trying to tie-in with a legacy system that responds to my requests by delivering a single long text string delimited by the pipe character (|). I can't seem to figure out the best technique to break up the incoming string and build a bunch of varibles that I can then use to write out the final html. Conceptually I have to use this text string a bunch of founditems that I would typically get from searching WebCat db.Here's a simplified example of what I get from the legacy system (all one string-ignore any breaks):Msg_Hdr|Msg_ID|My_ID||Start_of_Record|Tel555-555-1212|NameBob Jones|Add1234 Fox St||Start_of_Record|Tel714-555-5555|NameWill Smith|Add36 Willbory St|end_of_msg||And here's what I know about the message: The first section is always the message header delimited by 2 pipes, followed by sections for each record, each record also ends with 2 pipes. I do not know the number of records being returned nor the order of the fields, nor anything about the number of characters.Out of this mess I'd like to end up setting the following varibles:TotalRecords=2 Telephone1=555-555-1212 Name1=Bob Jones Address1=1234 Fox St Telephone2=714-555-5555 Name1=Will Smith Address1=36 Willbory StCan this be done using WebCat? If so can someone point me in the right direction? If not, what tools would folks recommend I use to parse out this string into something useful? Breaking up the string seems straight forward but assigning a record number (ala, using an [index] value) so far elludes me.Many thanks, Marty Schmid Artwerks------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Marty Schmid

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Stripping attachments in shared pop (2005) automatic reload of frameset (1997) WebCatalog2 Feature Feedback (1996) Not really WebCat- (1997) [SHOWIF AND/OR] (1997) what's wrong with this picture (2006) webcat NT with [dos] command (1997) Silly date question (2006) Getting total number of items ordered (1997) shipping costs (1997) Alternating colors (1997) textA (1998) I give up!! (1997) test mail (2004) [WebDNA] MATH shortcut (2014) RE: error count with $purchase (1997) [referrer] tag (1997) Re:listfiles-looking for slick solution (1997) F*** you (1998) Director 7 (1999)