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



Thanks to Vern who taught me how to fish, and to Scott who gave me a fish.  I 
got it to work as far as it goes.  Now for the next step.  

Now as to the manual I was asking about SC41-8223, does anyone have a pdf of it 
that I can get access to?  I still need to read this manual to get things 
moving. Otherwise it will be small steps and extreme frustration.

Marvin

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

message: 5
date: Wed, 22 Nov 2006 20:42:49 +0000
from: vhamberg@xxxxxxxxxxx
subject: Re: API Question

Hi Marvin

Please read the API Concepts manual at InfoCenter (Programming->APIs->API 
concepts); it explains all this stuff, and you will save yourself a lot of 
headaches if you do that first instead of asking questions as they arise - 
there are landmines out there if you don't get grounded. As to the error data 
structure, you will find in that manual that you have some options - use the 
QUSEC copy member from QSYSINC/QRPGLESRC or QSYSINC/QRPGSRC for ILE or OPM, 
resp. Or you can an 8-character string that is all x'00's. The former lets you 
get error information directly from that structure, the latter says the API 
should just use normal iSeries error handling. See the manual for more info.

HTH
Vern
---
------------------------------

message: 6
date: Wed, 22 Nov 2006 14:43:23 -0600 (CST)
from: Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
subject: RE: API Question


The problem is not in the API Error Data structure. The problem is in 
defining the prototype so the API doesn't give me an

No.  The problem is that you're passing a pointer where the API wants a 
character string.  Here's your prototype:

0153.00 d Dump_Module_Variables...
0154.00 d                 pr                  
extproc('QteDumpModuleVariables')
0155.00 d     Reveiver...
0156.00 d                                 *

Here's what it SHOULD be:

      d Dump_Module_Variables...
      d                 pr                  extproc('QteDumpModuleVariables')
      d     Reveiver...
      d                            65535a   const options(*varsize)

Note that the API documentation states that this first parameter is INPUT 
(in RPG, that's CONST) and that it's a CHAR(*) field.  CHAR(*) means
"character field that varies". in RPG, that's the A data type with 
options(*VARSIZE).

The Error Code parameter ( parameter #9 ) should be the same thing -- 
except that it's not CONST.

Make sure you initialize the error code parameter. In particular, make 
sure the first field is either set to zero or the length of the data 
structure. If you leave it at the default value (*blanks) you'll get 
another similar error.




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.