• Subject: Re: IFS API's
  • From: "Art Tostaine, Jr." <atostain@xxxxxxxxxxx>
  • Date: Thu, 22 Jan 1998 12:55:57 -0500
  • Organization: Creative Computer Associates, Inc.


bvining@vnet.IBM.COM wrote:

> Art,
>
> On the open() specify O_TEXTDATA.  If you then specify the codepage,
> then IFS will convert the file data to the specified codepage; if you
> do not specify codepage, then IFS will convert the file data to your
> job CCSID (or default job CCSID if CCSID = 65535).  Most likely you
> just want to specify TEXTDATA (that is, have conversion to your job
> CCSID performed).
>
> Bruce Vining
>

Bruce:

I think I have that already.

The code snippet looks like this:

c                   eval      filename = %trim(filename) + null
c                   eval      oflag = o_rdonly + o_textdata
c                   eval      fp    = open(%addr(filename): oflag)

include member is:

d*    Protoypes and definitions for working with the IFS
d**
d*    OPEN - Open an IFS File
d**
d open            pr            10i 0 extproc('open')
d   filename                      *   value
d   openflags                   10i 0 value
d   mode                        10u 0 value options(*nopass)
d   codepage                    10u 0 value options(*nopass)
d**
d*    READ Read an IFS file
d**
d read            pr            10i 0 extproc('read')
d   filehandle                  10i 0 value
d   datarcved                     *   value
d   nbytes                      10u 0 value
d**
d*   WRITE Write an IFS file
d**
d write           pr            10i 0 extproc('write')
d   filehandle                  10i 0 value
d   datatowrt                     *   value
d   nbytes                      10u 0 value
d**
d*   CLOSE Close an IFS file
d**
d close           pr            10i 0 extproc('close')
d   filehandle                  10i 0 value
d**
d*    RC = IFS API Return Code
d**
d o_append        s             10i 0 inz(256)
d o_codepage      s             10i 0 inz(8588608)
d o_creat         s             10i 0 inz(8)
d o_excl          s             10i 0 inz(16)
d o_rdonly        s             10i 0 inz(1)
d o_rdwr          s             10i 0 inz(4)
d o_textdata      s             10i 0 inz(16777216)
d o_trunc         s             10i 0 inz(64)
d o_wronly        s             10i 0 inz(2)
d**
d s_irusr         s             10i 0 inz(256)
d s_iwusr         s             10i 0 inz(128)
d s_ixusr         s             10i 0 inz(64)
d s_irwxu         s             10i 0 inz(448)
d**
d s_irgrp         s             10i 0 inz(32)
d s_iwgrp         s             10i 0 inz(16)
d s_ixgrp         s             10i 0 inz(8)
d s_irwxg         s             10i 0 inz(56)
d**
d s_iroth         s             10i 0 inz(4)
d s_iwoth         s             10i 0 inz(2)
d s_ixoth         s             10i 0 inz(1)
d s_irwxo         s             10i 0 inz(7)

Thanks for your help.
--
Art Tostaine, Jr.
Creative Computer Associates, Inc.
Parlin, NJ
atostaine@crecomp.com


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


This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2020 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].