Function SET190D

LANSA

Function SET190D

********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_190);
********** COMMENT(Function .......: SET190D);
********** COMMENT(Created on .....: 20/11/00 at 14:53:52);
********** COMMENT(Description ....: Request web system variables);
********** COMMENT(Version.........: 1);
********** COMMENT();
********** COMMENT(Full Description: The purpose of this function is to);
********** COMMENT(request and if necessary update the web system);
********** COMMENT(variables);
********** COMMENT();
********** COMMENT(Disclaimer: The following material is supplied as);
********** COMMENT(sample material only. No warranty concerning the);
********** COMMENT(material or its use in any way whatsoever is);
********** COMMENT(expressed or implied.);
********** COMMENT();
********** COMMENT(Minimum Release of LANSA: 8.0);
********** COMMENT();
********** COMMENT(=======================================================);
********** COMMENT(Function control options);
FUNCTION OPTIONS(*DIRECT);
********** COMMENT();
********** COMMENT(Group and field definitions);
********** COMMENT();
********** COMMENT();
********** COMMENT(Mainline);
********** COMMENT();
********** COMMENT();
DEFINE FIELD(#S_178POS) TYPE(*DEC) LENGTH(003) DECIMALS(0);
MESSAGE MSGTXT('Update the web system variable values if required');
REQUEST FIELDS((#S_IFSPATH)(#S_HOSTPRT)(#S_HOSTURL)) DESIGN(*DOWN) IDENTIFY(*DESC);
BEGINCHECK;
********** COMMENT(Reject IFS Path if it contains quotes);
USE BUILTIN(SCANSTRING) WITH_ARGS(#S_IFSPATH #QUOTE) TO_GET(#S_178POS);
IF COND('#S_178POS *GT 0');
SET_ERROR FOR_FIELD(#S_IFSPATH) MSGTXT('The IFS Path must not include quotes');
ENDIF;
ENDCHECK;
********** COMMENT(Check for changes in #S_IFSPATH #S_HOSTPRT #S_HOSTURL);
EXECUTE SUBROUTINE(CHK_SYSVAR);
********** COMMENT();
RETURN;
********** COMMENT();
********** COMMENT(=======================================================);
********** COMMENT(Subroutine ....: CHK_SYSVAR);
********** COMMENT(Description ...: Update the Web system variables if reg);
********** COMMENT(=======================================================);
SUBROUTINE NAME(CHK_SYSVAR);
********** COMMENT();
DEF_LIST NAME(#PARM_NAME) FIELDS(#S_SVNAME) TYPE(*WORKING);
DEF_LIST NAME(#PARM_VALU) FIELDS(#S_SVCHVAL) TYPE(*WORKING);
CLR_LIST NAMED(#PARM_VALU);
CLR_LIST NAMED(#PARM_NAME);
********** COMMENT();
********** COMMENT(Update system variables if changed);
IF COND('#S_IFSPATH *ne *S_IFSPATH');
CHANGE FIELD(#S_SVNAME) TO('''*S_IFSPATH''');
CHANGE FIELD(#S_SVCHVAL) TO(#S_IFSPATH);
ADD_ENTRY TO_LIST(#PARM_VALU);
ADD_ENTRY TO_LIST(#PARM_NAME);
ENDIF;
********** COMMENT();
IF COND('#s_hosturl *ne *s_hosturl');
CHANGE FIELD(#S_SVNAME) TO('''*S_HOSTURL''');
CHANGE FIELD(#S_SVCHVAL) TO(#S_HOSTURL);
ADD_ENTRY TO_LIST(#PARM_VALU);
ADD_ENTRY TO_LIST(#PARM_NAME);
ENDIF;
********** COMMENT();
IF COND('#s_hostprt *ne *s_hostport');
CHANGE FIELD(#S_SVNAME) TO('''*S_HOSTPORT''');
CHANGE FIELD(#S_SVCHVAL) TO(#S_HOSTPRT);
ADD_ENTRY TO_LIST(#PARM_VALU);
ADD_ENTRY TO_LIST(#PARM_NAME);
ENDIF;
********** COMMENT();
IF COND('(#s_hostprt *ne *s_hostport) or (#s_hosturl *ne *s_hosturl) or (#S_IFSPATH *ne *s_IFSPATH)');
CALL PROCESS(*DIRECT) FUNCTION(SETCHSV) PASS_LST(#PARM_NAME #PARM_VALU );
ENDIF;
********** COMMENT();
ENDROUTINE;