× 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.




On 22/01/2006, at 3:16 AM, Kyle Collie wrote:

If I do a wrklnk on  an IFS file, I see this:

GIF89a    ÷     ÿÿÿðíîGFG...

But in debug, my temp variable contains this:

åñã  /    7        0ÒÓåãå      x¿ÝzÞ^xÐÞ   ~xzwÝ(r)       (í ...

Not nearly the same.

What am I missing? If is a codepage issue?

At least three things:
1) Your code is doing a binary read. What makes you think WRKLNK is doing the same?

        2) This output:
                        GIF89a    ÷     ÿÿÿðíîGFG...
tells me you are viewing the contents of a GIF image file. GIF files are binary but use ASCII code points. The fact that WRKLNK (really DSPF file but ...) shows the characters GIF89a on your green screen in an EBCDIC CCSID tells me it is converting the data otherwise the characters wouldn't be recognisable. Thus DSPF is converting from the CCSID of the file (probably 819) to the CCSID of the job (probably 37) and is doing so, probably, because it opens the file using O_TEXTDATA.

3) Debug always shows the contents of variables using CCSID 65535 (described in the help text) which means no character conversion is performed. It shows the raw content of the variable.

When viewing data in binary you can only rely on the hexadecimal code points of each character. From the above 3 points you can see that the data in debug is the correct output. The data in DSPF has, probably, been converted from ASCII to EBCDIC.

Using the F10=Display Hex option in DSPF will show you the hex data. This should match the hex output in debug.

NOTE:- On 530 DSPF shows the real Hex data from the file content. On some earlier releases DSPF would show the Hex values of the converted output which is not much use at all.

NOTE:- On some early releases DSPF only shows Hex output when using a 24*80 display device. It will not show hex output in wide-screen (27*132) mode--also less than helpful. I see this "oversight" has been corrected in 530. I don't know in exactly what release they fixed this.

Regards,
Simon Coulter.
--------------------------------------------------------------------
   FlyByNight Software         AS/400 Technical Specialists

   http://www.flybynight.com.au/
   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175                                   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.