IFGERR (HLI function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with " ==Summary== <dl> <dt>Description</dt> <dd>The IFGERR call (GET ERROR) returns the text of the most recent error message issued by Model 204 for the current thread.</dd> <dt>T...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
The conventions used on this page are described in [[HLI: Function summary#Function call notation conventions|Function call notation conventions]].


==Summary==
==Summary==

Latest revision as of 23:02, 12 July 2016

The conventions used on this page are described in Function call notation conventions.

Summary

Description
The IFGERR call (GET ERROR) returns the text of the most recent error message issued by Model 204 for the current thread.
Thread type
multiple cursor IFSTRT, single cursor IFSTRT
IFCALL function number
29

Syntax

IFGERR(RETCODE,MSG_AREA)

Compile-only form
Not available
Execute-only form
Not available

Specify the parameters in the syntax order shown above.

Parameter Description
RETCODE [O,i,r] The Model 204 return code is a required output parameter. The code is a binary integer value.
MSG_AREA [O,c,r] The message area is a required output parameter which specifies the address of the user's data area. The work area contains the text of the error message that is returned by IFGERR. Specify a character string.

Usage notes

Use the IFGERR call to retrieve the text of the latest error message issued by Model 204 for the current thread. IFGERR returns either the latest call cancellation message or the latest counting error message.

Notes: A counting error message is written to the audit trail as an ER line and is refreshed only when a new message is generated or when the thread is ended.

IFGERR truncates messages that are longer than 80 bytes.

Using an IFAM2 or IFAM4 thread, IFGERR also returns the completion code of the previous call.

For more information about Model 204 messages, see the Rocket Model 204 Messages pages.

Coding example (COBOL)

WORKING-STORAGE SECTION. 01 CALL-ARGS. 05 RETCODE PIC 9(5) COMP SYNC. 05 M204-ERROR-MESSAGE PIC X(80) VALUE SPACES. . . . 01 ERROR-REPORT. 05 CONTROL-REPORT-CODE PIC X. 05 CONTROL-REPORT-DATA PIC X(132). . . . WRITE-ERROR-REPORT. . . . CALL 'IFGERR' USING RETCODE, M204-ERROR-MESSAGE. WRITE ERROR-REPORT FROM M204-ERROR-MESSAGE. . . .