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



I don't know if it's supported or not.
I would look for PTF's first
I had a similar problem in the IBM's SQL CLI module
It was resolved by 5722SS1 - SI17551

----- Original Message ----- From: <c400-l-request@xxxxxxxxxxxx>
To: <c400-l@xxxxxxxxxxxx>
Sent: Wednesday, July 06, 2005 19:00
Subject: C400-L Digest, Vol 3, Issue 50


Send C400-L mailing list submissions to
c400-l@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.midrange.com/mailman/listinfo/c400-l
or, via email, send a message with subject or body 'help' to
c400-l-request@xxxxxxxxxxxx

You can reach the person managing the list at
c400-l-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of C400-L digest..."


Today's Topics:

  1. lfind .... not found (Beppe Costagliola)
  2. Re: lfind .... not found (Beppe Costagliola)
  3. MCH3601 error (Chris Wolcott)


----------------------------------------------------------------------

message: 1
date: Wed, 6 Jul 2005 14:05:22 +0200
from: "Beppe Costagliola" <beppecosta@xxxxxxxx>
subject: [C400-L] lfind .... not found

I'm trying to compile a module that uses "bsearch" and "lfind".

The first one seems to be included in srvpgm QC2UTIL1 but "lfind" doesn't appear anywhere.

Thanks for help.


------------------------------

message: 2
date: Wed, 6 Jul 2005 14:53:07 +0200
from: "Beppe Costagliola" <beppecosta@xxxxxxxx>
subject: Re: [C400-L] lfind .... not found

I think I solved the problem because I wrote my own "lfind" and it seems to
work.
But any other suggestion is still appreciated.

----- Original Message ----- From: "Beppe Costagliola" <beppecosta@xxxxxxxx>
To: <c400-l@xxxxxxxxxxxx>
Sent: Wednesday, July 06, 2005 2:05 PM
Subject: [C400-L] lfind .... not found


I'm trying to compile a module that uses "bsearch" and "lfind".

The first one seems to be included in srvpgm QC2UTIL1 but "lfind" doesn't
appear anywhere.

Thanks for help.
_______________________________________________
This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.



------------------------------

message: 3
date: Wed, 6 Jul 2005 10:08:25 -0400
from: "Chris Wolcott" <cwolcott@xxxxxxxxxxxxxxxxxxxxxx>
subject: [C400-L] MCH3601 error

I have the following RPG copybook that prototypes C library functions:

/**

* RPG Procedures definitions for accessing IFS files via C functions.

* Based on article on iSeriesNetwork.com by Jef Sutherland

* If you create an IFS file, specify 'w codepage=1252' on the open,
then
* close it and reopen with 'a codepage=37'.  This will cause the
fputs()
* function to translate the data from EBCDIC to ASCII and back for
fgets().
* Open Modes and their meanings:

* 'r'  Open existing file for reading - Fails if not found

* 'w'  Creates empty file for writting - Clears existing file

* 'a'  Open existing file for appending - Creates file if not found

* 'r+' Open existing file for reading/writing - Fails if not found

* 'w+' Creates empty file for reading/writting - Clears existing file

* 'a+' Open existing file for reading/appending - Creates file if not
found
* @version V0R0M0

* @see
http://www.iseriesnetwork.com/artarchiveImages/2004/jan/17693-fig1.html
* @see
http://www.iseriesnetwork.com/artarchiveImages/2004/jan/17693-Fig2.html
*/

D/IF              NOT DEFINED(UTL_IFS)

D/DEFINE          UTL_IFS



DifsOpn           PR              *   EXTPROC( '_C_IFS_fopen' )
Open IFS file
D                                 *   VALUE OPTIONS( *String )
<full filename
D                                 *   VALUE OPTIONS( *String )
<options


DifsClo           PR            10I 0 EXTPROC( '_C_IFS_fclose' )
Close IFS file
D                                 *   VALUE
<file pointer


DifsDlt           PR            10I 0 EXTPROC( '_C_IFS_remove' )
Delete IFS file
D                                 *   VALUE OPTIONS( *String )
<full filename


DifsRd            PR              *   EXTPROC( '_C_IFS_fgets' )
Read IFS file
D                                 *   VALUE
<record pointer
D                               10I 0 VALUE
<size to read
D                                 *   VALUE
<file pointer


DifsWrt           PR            10I 0 EXTPROC( '_C_IFS_fputs' )
Write IFS file
D                                 *   VALUE OPTIONS( *String )
<data to write
D                                 *   VALUE
<file pointer      >


DifsFileErr       PR            10I 0 EXTPROC( 'ferror')
Chk File Errors
D                                 *   VALUE
<file pointer      >


DifsSts           PR            10I 0 EXTPROC( 'lstat' )
Get File Status
D                                 *   VALUE  OPTIONS( *String )
<STS struc pointer >
D                                 *   VALUE
<file pointer      >


DifsEOF           PR            10I 0 EXTPROC( '_C_IFS_feof' )
End of File Test
D                                 *   VALUE
<file pointer      >


D p_ifsSts        S               *   Inz( %Addr( ifsSts_t ))

D ifsSts_t        DS                  Align
IFS Status Structure
D  st_mode                      10U 0

D  st_ino                       10U 0

D  st_nlink                      5U 0

D                                2A

D  st_uid                       10U 0

D  st_gid                       10U 0

D  st_size                      10I 0
D  st_atime                     10I 0
D  st_mtime                     10I 0
D  st_ctime                     10I 0
D  st_dev                       10U 0
D  st_blksize                   10U 0
D  st_allocsize                 10U 0
D  st_objtype                   11A
D                                1A
D  st_codepage                   5U 0
D  st_reserv1                   62A
D  st_ino_gen_id                10U 0
D/ENDIF


All was well until V5R3 (V4R5 to V5R2), now we get this during the call
to ferror() after doing an fgets():

From program . . . . . . . . . :   QC2IFS
 From library . . . . . . . . :     QSYS
 From module  . . . . . . . . :     QC2IP124
 From procedure . . . . . . . :     fp124
 From statement . . . . . . . :     38

To program . . . . . . . . . . :   QC2IFS
 To library . . . . . . . . . :     QSYS
 To module  . . . . . . . . . :     QC2IP124
 To procedure . . . . . . . . :     fp124
 To statement . . . . . . . . :     38

   Pointer not set for location referenced.

   Function check. MCH3601 unmonitored by QC2IFS at statement
0000000038,
     instruction X'0000'.

   Application error.  *N unmonitored by *N at statement *N,
instruction
     X'4000'.

   Function check. CEE9901 unmonitored by QUIMNDRV at statement *N,

     instruction X'0CDE'.

   Exception handler not available because of reason code 5.

   Function check. CPF2524 unmonitored by QUIMNDRV at statement *N,

     instruction X'0CDE'.


Any ideas?  Are these functions no longer supported?  I called IBM
support and he could not find ANY references to these functions at all.
Is there a better way to access the IFS from RPG?


------------------------------

_______________________________________________
This is the C programming iSeries / AS400 (C400-L) digest list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.



End of C400-L Digest, Vol 3, Issue 50
*************************************


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.