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:

OT - help with filemaker - short (1999) Sorting by SKU Not Working (1998) Debugging (2005) Sort Order on a page search (1997) Filemaker Pro Template for Orders (1999) Missing custom convert.db (1998) Search bug. Help (2002) Expected behavior? (1998) XML Woes Revisited (2004) much help needed NEWBIE alert (2000) Showing once on a founditems (1997) Configuring E-mail (1997) Questions about maximum (1999) [WebDNA] Archives (2009) The beginning (1997) WebCat2 - [format thousands] (1997) [WebDNA] WebDNA on Windows 7 & IIS7.5 (2011) Configuration Q (1998) WebCat & Backoffice Solution? (2000) WebCat odd log behavior (1998)