× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



>  Mike Wills:
>
>Lawson creates a .prt text file on the IFS for every report it creates. We
>want to be able to read that file for some custom java programs. I have
>looked at these before and have noticed that they are EBCDIC files.
However,
>one program (RW100) seems to be different. On one job (Preliminary) it
>creates the files as EBCDIC, the other job (Final) creates plain text
(NOTE:
>these are the same job except by name). How can we determine what type the
>file is so we can properly read it into our java program or fix it so that
>they are all of one type (EBCDIC or ASCII).


If Lawson is using CPYTOSTMF or CPYTOIMPF to generate the .prt files they're
probably leaving the parameter default for stream file code page
(STMFCODPAG).  The default parameter value is *STMF, which will create .prt
files with the same code page as the source object (EBCDIC) *unless* the
.prt file already exists.  If the .prt file already exists as an ASCII file
it will be recreated (or appended if the STMFOPT parm is *ADD) as ASCII.

You might try to verify this by scanning Lawson's environment source for the
CPYTOSTMF and CPYTOIMPF commands.

You might be able to modify Lawson's environment program(s) to hard code a
code page of *PCASCII or *STDASCII on these commands.  I have no idea what
Lawson uses these files for (other than wasting a lot of disk), so I don't
know what functions might be expecting EBCDIC files and what you might screw
up.

You can visually check the character set of the file by performing a WRKLNK
and checking attributes.  I have no idea how to retrieve it
programmatically.  Maybe there's an API?

-Jim

James P. Damato
Manager - Technical Administration
Dollar General Corporation
<mailto:jdamato@dollargeneral.com>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.