user_signoff routine

Top  Previous  Next

When XCICS/TS auth_mode is set to "user", user may define an user_signoff routine to handle the operator SIGNOFF (CESF and EXEC CICS SIGNOFF).

At SIGNOFF time, XCICS/TS calls the routine passing the USERID and the pointer to the SNT entry of the currently signed-on user.

The routine may handle this information and return a return code to communicate to XCICS/TS whether the operation succeeded or not.

If the return code is not equal to CXE_OK (0), the condition INVREQ is raised.

Prototype

int function_name(char *userid, tCXsnt *snt_entry);

Passed parameters

name

type

description

userid

char *

a NULL terminated string, containing the USERID

snt_entry

tCXsnt *

a pointer to the SNT entry of the user

Return codes

0        OK
!=0      fault (INVREQ is raised)

Example declaration

define exit_program type=user_signoff, name=my_signoff, library=libmysnt.so;

Example code

#include "cics.h"
int my_signoff(char *userid, tCXsnt *snt_entry) {
if (strcmp(userid, "UI98736")==0) {
   /** I don't want UI98736 to signoff */
  return 1;
}
return 0;
}