Re: Loading Fixed Length ASCII / EBCDIC
Posted in 1997
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
On Mon, 06 Jan 1997 10:30:07 +0200, "Mark D. Stock" <marks@west.co.za>
wrote:
>John Cokos wrote:
>>
>> Thanks to everyone who responded to my earlier questions...now I have some new ones...
>>
> > Importing ASCII Files
> > I am able to convert and load from Delimited Ascii, and DBF
>files via 4gl
> > and Perl...
> > but I am having a lot of difficulty with Fixed Length and
>EBCDIC Files.
> > Has anyone solved this?
> > How?
> > Is there some common utility for this that I am not seeing?
>
>I don't know about EBCDIC, what about converting to ASCII first with
>something like dd? Have you looked at dbload?
>
>> One more thing
> > Is there an *easy* way to save a variable to a file? As I am
>trying to write
> > the code for the above, I was trying to create an Awk
>statement for use with
> > the RUN command. The variable cAwk in my code is about 250
>bytes long, so I
> > cannot display it on screen. I would like to be able to
>store the variable in
> > a text file so I can take a look at it and see where the bugs
>are. Do I have
> > to OUTPUT TO REPORT to do this?
>
>Yes. A report will generate your file for you. Remember to issue the
>FINISH REPORT before you issue the RUN command. You may have to set the
>execute permissions as well, if you are executing it.
>
>Hope that helps,
>--
With 4Gl (don't know your version, but as of 4.0, I believe) you can
use the startlog(filename) call to open an errorlog file and write to
it at any point in your program.
call startlog("errlog")
call errorlog(cAwk)
The startlog will create the file errlog in your current directory and
errorlog() will write the value of cAwk to it. Usefull for debugging
and error trapping.
-robw