|
Thanks Scott. I misread my conversion table. Although I am curious about writing directly to a stream file. I've never done this before. I'll post the question on RPG400-L. Joel Burke Programmer/Analyst MARYWOOD UNIVERSITY 2300 Adams Ave. Scranton, PA 18509 (570)348-6221 -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement Sent: Wednesday, July 19, 2006 1:01 PM To: Midrange Systems Technical Discussion Subject: Re: Tab-delimited file to IFS
I am trying to create a tab delimited file and then use CPYTOSTMF to copy
it
to our IFS.
Why? Why not write it directly to the IFS? If you're not going to to use an external defifinition, what is it gaining you to write it to a physical file? Do you plan to parse it with RPG II or something?
In RPG ILE, I populate a 4400 character alpha string with character fields seperated by tabs(x'09'). I then output these strings to the file I just created.
x'09' would be the correct code to write on the PC, as it's the ASCII code for tab. HOWEVER... the iSeries isn't an ASCII system, it's an EBCDIC system. The EBCDIC code for tab is x'05' When CPYTOSTMF converts your PF to a stream file, it will translate the x'05' to a x'09' (assuming you get translation working properly, that is). However, right now you have it translating x'09' to x'8D', and since x'09' isn't a tab, neither is x'8D', so you have a mess. Also I strongly recomment *not* using QASCII, I can almost guarantee that some characters won't translate the way you expect them to. Instead, change the data conversion to *AUTO and specify the correct codepage for the PC file. Or, better yet, write it to a stream file in the first place. Don't mess around with a PF and CPYTOSTMF, since all they do is create extra steps without adding any value. If you want an example of how to do that in ILE RPG, please ask me for one on the RPG400-L mailing list. Then I can answer any questions you have there (as they'll be RPG questions.)
As an Amazon Associate we earn from qualifying purchases.
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.