xlate question
Matthew Williams
matthew.d.williams at gmail.com
Thu Jan 20 17:44:22 PST 2005
As it turned out I was able to get around it where I only had to
eliminate a quote and the comma could stay.
Although when fooling around with it trying to eliminate both I tried:
rep(15)=xlate(15,chr("34")chr("44")," ")
and that had reported a error, so count that out, I however did not
try with a & inbetween, that sounds like it would work but I never
ended up needing it.
Thanks,
-Matt
On Thu, 20 Jan 2005 15:45:33 -0600, Mike Schwartz-PC Support &
Services <mschw at athenet.net> wrote:
> > bounces at lists.celestial.com ] On Behalf Of Matthew Williams
> >
> > I would like to replace any commas and single quotes in a field with
> > blank spaces with xlate, however I can only figure it out to eliminate
> > one or the other, how would I do it with multiple ascii chars? so far
> > this works to eliminate one of them:
> >
> > rep(15)=xlate(15,chr("34")," ")
> >
> > That eliminates all single quotes, now I would like to also remove
> > commas which is chr("44"), how do I add that to the list of characters
> > to translate?
> >
> > This is as i'm writing out to a file on a export if that helps out any...
> >
> > Thanks!
> > -Matt
> > Hale Mfg. Co.
>
>
> I think you meant to say "double quotes" in your text above, because chr 34
> is a double quote.
>
> If you use the "export word" format, you will automatically get double
> quotes on each end of the fields you are exporting, so that you don't have
> to worry about whether commas are included inside your fields.
>
> However, since xlate accepts lists of characters, if you still want to
> eliminate the commas, I think you could use a line like:
>
> rep(15)=xlate(15,chr("34")chr("44")," ")
>
> or maybe the syntax is:
>
> rep(15)=xlate(15,chr("34")chr("44")," "" ")
>
> Actually, let me know whether that line works or not. I don't have a system
> I can test that on right now. If that doesn't work, you could always setup
> another variable, like xx, and pipe the date through 2 xlate commands.
>
> *** Mike Schwartz ***
> *** PC Support & Services, Appleton, WI ***
>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
More information about the Filepro-list
mailing list