Function SETWEBN
********** COMMENT(=======================================================);
********** COMMENT(Copyright .....: (C) = LANSA SET Team =);
********** COMMENT(Process .......: S_SYSVAR);
********** COMMENT(Function ......: SETWEBN);
********** COMMENT(Type ..........: System Variable Evaluator);
********** COMMENT(Created by ....: SETUSER);
********** COMMENT(Created on ....: 25/05/00 at 10:58:30);
********** COMMENT(Description ...: This is a general purpose system);
********** COMMENT(variable evaluation program for numeric sys vars);
********** COMMENT();
********** COMMENT();
********** COMMENT(=======================================================);
********** COMMENT(Function Mainline : SETWEBN);
********** COMMENT(=======================================================);
********** COMMENT();
FUNCTION OPTIONS(*DIRECT *NOMESSAGES *LIGHTUSAGE *NUM_SYSTEM_VARIABLE);
********** COMMENT();
********** COMMENT();
********** COMMENT();
DEF_COND NAME(*AS400) COND('*CPUTYPE = AS400');
********** COMMENT();
IF COND(*AS400);
CASE OF_FIELD(#SYSVAR$NM);
WHEN VALUE_IS('= ''*S_190PID''');
CHANGE FIELD(#SYSVAR$NV) TO(*AUTONUM15S_190PID);
ENDCASE;
********** COMMENT();
ELSE;
********** COMMENT(running on a PC which needs to get the value for the);
********** COMMENT(system variable from the AS/400);
IF COND('*SSERVER_CONNECTED *EQ Y');
EXCHANGE FIELDS(#SYSVAR$NM);
USE BUILTIN(CALL_SERVER_FUNCTION) WITH_ARGS(*SSERVER_SSN SETWEBP Y Y) TO_GET(#S_RETCDA2);
********** COMMENT(get back #SYSVAR$NV with the correct value for the);
********** COMMENT(system variable exchanged);
ELSE;
********** COMMENT(not connected - set system variable to 0);
CHANGE FIELD(#SYSVAR$NV) TO(0);
ENDIF;
ENDIF;
RETURN;
********** COMMENT(=======================================================);
********** COMMENT(Copyright .....: (C) = LANSA SET Team =);
********** COMMENT(Process .......: S_SYSVAR);
********** COMMENT(Function ......: SETWEBN);
********** COMMENT(Type ..........: System Variable Evaluator);
********** COMMENT(Created by ....: SETUSER);
********** COMMENT(Created on ....: 25/05/00 at 10:58:30);
********** COMMENT(Description ...: This is a general purpose system);
********** COMMENT(variable evaluation program for numeric sys vars);
********** COMMENT();
********** COMMENT();
********** COMMENT(=======================================================);
********** COMMENT(Function Mainline : SETWEBN);
********** COMMENT(=======================================================);
********** COMMENT();
FUNCTION OPTIONS(*DIRECT *NOMESSAGES *LIGHTUSAGE *NUM_SYSTEM_VARIABLE);
********** COMMENT();
********** COMMENT();
********** COMMENT();
DEF_COND NAME(*AS400) COND('*CPUTYPE = AS400');
********** COMMENT();
IF COND(*AS400);
CASE OF_FIELD(#SYSVAR$NM);
WHEN VALUE_IS('= ''*S_190PID''');
CHANGE FIELD(#SYSVAR$NV) TO(*AUTONUM15S_190PID);
ENDCASE;
********** COMMENT();
ELSE;
********** COMMENT(running on a PC which needs to get the value for the);
********** COMMENT(system variable from the AS/400);
IF COND('*SSERVER_CONNECTED *EQ Y');
EXCHANGE FIELDS(#SYSVAR$NM);
USE BUILTIN(CALL_SERVER_FUNCTION) WITH_ARGS(*SSERVER_SSN SETWEBP Y Y) TO_GET(#S_RETCDA2);
********** COMMENT(get back #SYSVAR$NV with the correct value for the);
********** COMMENT(system variable exchanged);
ELSE;
********** COMMENT(not connected - set system variable to 0);
CHANGE FIELD(#SYSVAR$NV) TO(0);
ENDIF;
ENDIF;
RETURN;