Difference between revisions of "API Error Code Structure (ApiErrC)"
From MidrangeWiki
DaveLClarkI (talk | contribs) m (DaveLClarkI moved page ApiErrC to ApiErrC — API Error Code) |
DaveLClarkI (talk | contribs) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:API]] | [[Category:API]] | ||
− | = Summary = | + | [[Category:RPG Prototypes]] |
+ | == Summary == | ||
The following is an RPG/LE free-form definition for the IBM API Error Code data structure. | The following is an RPG/LE free-form definition for the IBM API Error Code data structure. | ||
− | = The API Error Code data structure = | + | By [[User:DaveLClarkI|Dave Clark]] |
+ | |||
+ | == The API Error Code data structure == | ||
<pre> | <pre> | ||
*========================================================================* | *========================================================================* | ||
Line 14: | Line 17: | ||
* | * | ||
* DOCUMENTATION: | * DOCUMENTATION: | ||
− | * | + | * https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apiref/error.htm |
*========================================================================* | *========================================================================* | ||
− | dcl-ds ApiErrC Inz | + | dcl-ds ApiErrC Qualified Inz; |
BytProv Int(10:0) Inz(%size(ApiErrC)); | BytProv Int(10:0) Inz(%size(ApiErrC)); | ||
BytAvail Int(10:0); | BytAvail Int(10:0); | ||
Line 24: | Line 27: | ||
end-ds; | end-ds; | ||
</pre> | </pre> | ||
+ | |||
+ | == Example == | ||
+ | See the [[Find Source Member (FNDSRCMBR)]] sample command. |
Latest revision as of 15:50, 21 December 2018
Summary
The following is an RPG/LE free-form definition for the IBM API Error Code data structure.
By Dave Clark
The API Error Code data structure
*========================================================================* * IBM API Error Code parameter -- ERRC0100 format * * NOTE: If supported, including this data structure as a parameter in your * API calls is equivalent to using MONITOR to trap hard errors. If * an error occurs, it allows the API to pass back the error message * id and any replacement data associated with that message id. * * DOCUMENTATION: * https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apiref/error.htm *========================================================================* dcl-ds ApiErrC Qualified Inz; BytProv Int(10:0) Inz(%size(ApiErrC)); BytAvail Int(10:0); MsgId Char(7); Reserved Char(1); MsgData Char(3000); end-ds;
Example
See the Find Source Member (FNDSRCMBR) sample command.