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 bydelivering a single long text string delimited by the pipe character (|). Ican't seem to figure out the best technique to break up the incoming stringand build a bunch of varibles that I can then use to write out the finalhtml. Conceptually I have to use this text string a bunch of founditemsthat I would typically get from searching WebCat db.Here's a simplified example of what I get from the legacy system (all onestring-ignore any breaks):Msg_Hdr|Msg_ID|My_ID||Start_of_Record|Tel555-555-1212|NameBob Jones|Add1234Fox St||Start_of_Record|Tel714-555-5555|NameWill Smith|Add36 WillborySt|end_of_msg||And here's what I know about the message: The first section is always themessage 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 recordsbeing returned nor the order of the fields, nor anything about the numberof characters.Out of this mess I'd like to end up setting the following varibles:TotalRecords=2Telephone1=555-555-1212Name1=Bob JonesAddress1=1234 Fox StTelephone2=714-555-5555Name1=Will SmithAddress1=36 Willbory StCan this be done using WebCat? If so can someone point me in the rightdirection? If not, what tools would folks recommend I use to parse out thisstring into something useful? Breaking up the string seems straight forwardbut assigning a record number (ala, using an [index] value) so far elludesme.Many thanks,Marty SchmidArtwerks-------------------------------------------------------------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:
I'm trying to tie-in with a legacy system that responds to my requests bydelivering a single long text string delimited by the pipe character (|). Ican't seem to figure out the best technique to break up the incoming stringand build a bunch of varibles that I can then use to write out the finalhtml. Conceptually I have to use this text string a bunch of founditemsthat I would typically get from searching WebCat db.Here's a simplified example of what I get from the legacy system (all onestring-ignore any breaks):Msg_Hdr|Msg_ID|My_ID||Start_of_Record|Tel555-555-1212|NameBob Jones|Add1234Fox St||Start_of_Record|Tel714-555-5555|NameWill Smith|Add36 WillborySt|end_of_msg||And here's what I know about the message: The first section is always themessage 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 recordsbeing returned nor the order of the fields, nor anything about the numberof characters.Out of this mess I'd like to end up setting the following varibles:TotalRecords=2Telephone1=555-555-1212Name1=Bob JonesAddress1=1234 Fox StTelephone2=714-555-5555Name1=Will SmithAddress1=36 Willbory StCan this be done using WebCat? If so can someone point me in the rightdirection? If not, what tools would folks recommend I use to parse out thisstring into something useful? Breaking up the string seems straight forwardbut assigning a record number (ala, using an [index] value) so far elludesme.Many thanks,Marty SchmidArtwerks-------------------------------------------------------------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)