snt_loader routine

Top  Previous  Next

This routine is invoked by XCICS/TS at startup and reconfiguration time to let the user add programmatically entries in the SNT (users).

For each user entry it wants to add to the SNT, the routine must call the function fCX_add_snt_entry passing the pointer to an area  type struct xcics_user_info containing the information of the user being created.

Prototype

int function_name(short int startup);

Passed parameters

name

type

description

startup

short int

!=0when invoked at XCICS/TS startup.

0 when invoked at XCICS/TS reconfiguration.

Return codes

0     OK
!=0   fault detected

Example declaration

define exit_program type=snt_loader, name=my_define_snt, library=libmysnt.so;

Example code

#include "cics.h"
int my_define_snt() {
struct xcics_user_info ui;
 
memset(&ui, 0x00, sizeof(ui));
ui.userid="SUPERMAN";
ui.opid="SPM";
ui.auth="1-64";
ui.username="Clark Kent";
fCX_add_snt_entry(&ui);
memset(&ui, 0x00, sizeof(ui));
 
ui.userid="BATMAN";
ui.userclass="OPERATOR";
ui.username="Bruce Wayne";
fCX_add_snt_entry(&ui);
 
return 0;
}