Re: pipe delimited crconvert database

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 43227
interpreted = N
texte = If the fields you want are always going to be 4|2|2|2 .. Etc characters long why not use a [listwords] to get the info ..[listwords include file=5day.txt&delimiters=%0D][!] ## hide the first row --[/!] [hideif [index]=1] [listwords words=[word]&delimiters=|] do stuff here [/listwords] [/hideif][/listwords]You will need to organise the code so that there are no extra lines but it should do the trick.Alain > Actually, it's been working it's just unpredictable. I have whittled the > problem down to one - one of my records is getting axed. > > Here's the file I am trying to convert (5day.txt), which is Accuweather in > case anyone else out there might want to subscribe to their wacky data > service: > > Saturday|Sunday|Monday|Tuesday|Wednesday > KINX|92|60|01|87|58|02|87|59|02|85|57|01|80|51|03| > VABR|90|57|01|86|55|02|85|56|02|84|56|01|79|49|02| > TN28|90|58|01|84|56|02|86|57|02|85|57|01|80|50|02| > > Yes, I realize there are two types of records in this file. > > So, I run a convertwords to get rid of the Sat, sun ,mon stuff. And then I > run a convert chars to translate the pipes to tabs. > > My code: > > [writefile 5dayFINAL.db][convertchars db=pipeconvert.db][convertwords > db=convertpipewords.db][include > file=5day.txt][/convertwords][/convertchars][/writefile] > > I want: > > KINX 92 60 01 > VABR 90 57 01 > TN28 90 58 ... etc > > > But what I end up with > > > KINX 92 60 01 > > VABR 90 57 01 > > and the TN28 record is missing. > > My convertwords db: > > from to > Saturday|Sunday|Monday|Tuesday|Wednesday (a blank tab here) > (yes, a return) > > And the convertchars : > from to > | %09 > > > Any ideas? > > > > > > > > > > -----Original Message----- > From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf > Of Kenneth Grome > Sent: Friday, September 06, 2002 10:27 PM > To: WebCatalog Talk > Subject: Re: pipe delimited crconvert database > > >> What does the conversion database for converting pipes to tabs? >> There was a discussion that showed: >> >> from to >> | %09 >> >> But I believe that does not work. > > This should work fine, assuming you put a carriage return after the > %09. Have you tried it? Or are you just assuming that it won't work > because of something you read in the archives? If you try it and it > really doesn't work, try this instead: > > from to > %7C %09 > > > > > Sincerely, > Kenneth Grome > > --------------------------------------------------- > WebDNA Professional Training and Development Center > 175 J. Llorente Street +63 (32) 255-6921 > Cebu City, Cebu 6000 kengrome@webdna.net > Philippines http://www.webdna.net > --------------------------------------------------- > > ------------------------------------------------------------- > 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/ > > > ------------------------------------------------------------- > 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/ ------------------------------------------------------------- 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: pipe delimited crconvert database (Alain Russell 2002)
  2. Re: pipe delimited crconvert database (Ben Swihart 2002)
  3. Re: pipe delimited crconvert database (Kenneth Grome 2002)
  4. pipe delimited crconvert database (Ben Swihart 2002)
If the fields you want are always going to be 4|2|2|2 .. Etc characters long why not use a [listwords] to get the info ..[listwords include file=5day.txt&delimiters=%0D][!] ## hide the first row --[/!] [hideif [index]=1] [listwords words=[word]&delimiters=|] do stuff here [/listwords] [/hideif][/listwords]You will need to organise the code so that there are no extra lines but it should do the trick.Alain > Actually, it's been working it's just unpredictable. I have whittled the > problem down to one - one of my records is getting axed. > > Here's the file I am trying to convert (5day.txt), which is Accuweather in > case anyone else out there might want to subscribe to their wacky data > service: > > Saturday|Sunday|Monday|Tuesday|Wednesday > KINX|92|60|01|87|58|02|87|59|02|85|57|01|80|51|03| > VABR|90|57|01|86|55|02|85|56|02|84|56|01|79|49|02| > TN28|90|58|01|84|56|02|86|57|02|85|57|01|80|50|02| > > Yes, I realize there are two types of records in this file. > > So, I run a convertwords to get rid of the Sat, sun ,mon stuff. And then I > run a convert chars to translate the pipes to tabs. > > My code: > > [writefile 5dayFINAL.db][convertchars db=pipeconvert.db][convertwords > db=convertpipewords.db][include > file=5day.txt][/convertwords][/convertchars][/writefile] > > I want: > > KINX 92 60 01 > VABR 90 57 01 > TN28 90 58 ... etc > > > But what I end up with > > > KINX 92 60 01 > > VABR 90 57 01 > > and the TN28 record is missing. > > My convertwords db: > > from to > Saturday|Sunday|Monday|Tuesday|Wednesday (a blank tab here) > (yes, a return) > > And the convertchars : > from to > | %09 > > > Any ideas? > > > > > > > > > > -----Original Message----- > From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf > Of Kenneth Grome > Sent: Friday, September 06, 2002 10:27 PM > To: WebCatalog Talk > Subject: Re: pipe delimited crconvert database > > >> What does the conversion database for converting pipes to tabs? >> There was a discussion that showed: >> >> from to >> | %09 >> >> But I believe that does not work. > > This should work fine, assuming you put a carriage return after the > %09. Have you tried it? Or are you just assuming that it won't work > because of something you read in the archives? If you try it and it > really doesn't work, try this instead: > > from to > %7C %09 > > > > > Sincerely, > Kenneth Grome > > --------------------------------------------------- > WebDNA Professional Training and Development Center > 175 J. Llorente Street +63 (32) 255-6921 > Cebu City, Cebu 6000 kengrome@webdna.net > Philippines http://www.webdna.net > --------------------------------------------------- > > ------------------------------------------------------------- > 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/ > > > ------------------------------------------------------------- > 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/ ------------------------------------------------------------- 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/ Alain Russell

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:

Server IP address? (1998) RE: [sendmail]- bcc? (1998) Random Generator (2005) Beta 18 (1997) ThreadMem ignored? (1998) Problem 2: Prefs file... (1997) includes and cart numbers (1997) when is date system date or order date? (1997) UPPERCASE (1997) WebCat2b13MacPlugin - nested [xxx] contexts (1997) Group Updates (1998) authorizenet and netscape (2002) Popup Menu Options (1998) Attention all list readers (1997) WebCatalog NT beta 18 now available (1997) Parameter Problem (1998) Using [Include] Context (1999) Firesite and [referrer] atg broke (1997) db not being written to disk (2003) Moment of Thanks (1997)