export ascii and insert a text file

Enrique Arredondo henry at vegena.net
Thu May 12 07:48:30 PDT 2005


----- Original Message ----- 
From: "Brian K. White" <brian at aljex.com>
To: "filePro mailing list" <filepro-list at seaslug.org>
Sent: Wednesday, May 11, 2005 10:46 AM
Subject: Re: export ascii and insert a text file


>
> ----- Original Message ----- 
> From: "Enrique Arredondo" <henry at vegena.net>
> To: <filepro-list at lists.celestial.com>
> Sent: Wednesday, May 11, 2005 10:54 AM
> Subject: export ascii and insert a text file
>
>
>> How can I make this happend :
>>
>> I'm generating a XML document to a ascii file , but Under the tag 
>> "ImageFile" I need to do a quick system command that will convert a JPG 
>> file to a text file and stick in inside this tag and then close the tag.
>>
>> So the Idea is to do this :
>>
>> Then : "<ImageFile>"{system noredraw "base64 chevy350.jpg > 
>> chev350.64"{"</ImageFile>" ;gosub writeit
>>
>> How should I import the chev350.64 to this line ? using a GETENV or 
>> import ascii line by line ?
>
> Neither I think.
>
> assuming the export filename is in ef
> and the jpg filename is in jf
>
> My first suggestion as the best balance between efficient and robust:
> close export
> system noredraw "base64" < jf < ">>" < ef
> reopen export in append mode
>
> Second best suggestion:
> If base64 was only going to generate a few lines it'd bebetter to use 
> readline() to read the base64 file, which you could still do because 
> handily, base64 output is always made of short lines, so the variable used 
> in readline() can safely be 70 or 80 bytes. But since base64 will generate 
> hundreds or thousands of lines, it's ok to close the export, let the 
> system command dump it's output appending to the file all at once, then 
> reopen the export in append mode.
>

Do you know the right syntax for the append command ? I'm trying it but it 
won't compile

Then : filename=@fn{".xml"

Then : export ascii xwrite=(filename) -x -A
                                    ^
Merge name incompatibility.
Word processor or spreadsheet merge has been given two different names.

I check the HELP screen but now enough examples, I checked STN's filepro 
Developers Reference and it doesn't even mention the "-A" under export 
section.

Thanks




More information about the Filepro-list mailing list