IFHNGUP (HLI function)

From m204wiki
Revision as of 23:04, 12 July 2016 by ELowell (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Summary

Description
The IFHNGUP call (HANGUP) ends an IFDIAL or IFDIALN connection.
Thread type
IFDIAL
IFCALL function number
8

Syntax

IFHNGUP | IFHNGP(RETCODE,USER_RETCODE,URC_TYPE)

Compile-only form
Not available
Execute-only form
Not available
Parameter Specifies
RETCODE [O,i,r] Model 204 return code, the required output parameter. The code is a binary integer value.

If the IFHNGUP call is unsuccessful, Model 204 returns an error code of 100 which indicates that the connection was lost prior to the call.

USER_RETCODE [O,i,o]

Model 204 return code for the current user. The code is a binary integer value and is output only.

URC_TYPE [I,c,o] Type of return code to return in USER_RETCODE.

Return values are:

  • N for return code = 0
  • O for highest Online value
  • B for highest batch value

Usage notes

USER_RETCODE and URC_TYPE parameters are optional, however, if you enter one, you must enter both.

If the connection to Model 204 was lost prior to the call to IFHNGUP, the RETCODE value returned is 0. In this case, the USER_RETCODE value returns -1, indicating that it is unknown. If an IFDIAL application explicitly includes the LOGOUT command in the CCAIN stream, the connection is disconnected and a subsequent call to IFHNGUP returns an unknown USER_RETCODE.

Use the IFHNGUP call only with an IFDIAL connection. IFHNGUP ends a connection to the Model 204 SOUL facility that was established by a call to IFDIAL or IFDIALN.

IFHNGUP issues an IFATTN call and then sends a LOGOUT command to ensure that the caller's session is terminated.

Coding example (COBOL)

WORKING-STORAGE SECTION. 01 CALL-ARGS. 05 RETCODE PIC 9(5) COMP SYNC. . . . PROCEDURE DIVISION. OPEN-FILES. OPEN INPUT... CALL "IFDIAL"... . . . CLOSE-FILES. . . . CALL "IFHNGUP" USING RETCODE.