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


  • Subject: RPG IFS and codepage 37
  • From: "Ed Davidson" <Edavidson@xxxxxxxxxxxx>
  • Date: Wed, 23 Feb 2000 16:39:24 -0600
  • Importance: Normal

I am using the example on IBM's site (code sniplets) to read files from the
IFS.  Everything works great except when I come across code page 37.  For
some reason codepage 37 comes across as garbage.  Below is a snapshot of the
code I am using.  What is special about codepage 37 and what do I need to do
to be able to read it?

Thank you;

Ed Davidson
www.primeinc.com


DO_CREAT          S             10I 0 INZ(8)
DO_RDWR           S             10I 0 INZ(4)
DO_RDONLY         S             10I 0 INZ(1)
DO_TEXTDATA       S             10I 0 INZ(16777216)
DO_CODEPAGE       S             10I 0 INZ(8388608)
Doflag            S             10I 0 INZ(0)
 *
Drcvvar           S           1256
Drcvvarsiz        S             10u 0 inz(1256)
 *********************************************************************
 *  cp is used to set the code page (CCSID) of the IFS file to be
 *  a common US English ASCII.  Others code be substituted as
 *  desired.
 *********************************************************************
 * ASCII (ccsid 437 = 0x1B5)
D*cp              S             10U 0 INZ(819)
D cp              S             10U 0 INZ(37)
D*cp              S             10U 0 INZ(x'1252')
D*cp              S             10U 0 INZ(x'4105')
D*cp              S             10U 0 INZ(x'2100')
C                   Z-ADD     O_RDONLY      oflag
C                   ADD       O_TEXTDATA    oflag
C                   ADD       O_CodePage    oflag
C*                  EVAL      FileDescr=open(FileNamP:oflag)
C                   EVAL      FileDescr=open(FileNamP:Oflag:Omode:cp)


I have had this work in codepage 819 and 437 - why wont it work in 37?


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.