SYS_MGR.FOCSET

How to:

Using SYS_MGR.FOCSET, you can set certain environment settings for the WebFOCUS Server. Issue this command from a Maintain procedure to set the desired environment variable, then use a local call from the same procedure to use that setting for your Maintain operations. See Customizing Your Environment in the Developing Reporting Applications manual for a complete description of the environment settings.


Top of page

x
Syntax: How to Use the SYS_MGR.FOCSET Command

The syntax is

SYS_MGR.FOCSET("parm","value")

where:

parm

Is one of the following supported SET commands:

CDN
COMMIT
DATEDISPLAY
DEFCENT (DFC)
EMGSRV
LANGUAGE
MESSAGE
NODATA
TRACEON
TRACEOFF
TRACEUSER  WARNING 
YRTHRESH
PASS
USER

In addition, the parameter maintain_warning is included in this command set in order to allow Maintain warning messages to be suppressed.

value

Is an appropriate setting for that command.



Example: Setting DEFCENT From a Maintain Procedure

The following code

MAINTAIN
COMPUTE MYDATE/YYMD;
SYS_MGR.FOCSET("DEFCENT", "21");
COMPUTE DATE1/YMD='90/01/01';
COMPUTE MYDATE=DATE1;
TYPE "After setting DEFCENT=21, MYDATE=<<MYDATE";
END

produces the following output:

After setting DEFCENT=21, MYDATE=2190/01/01


Example: Setting PASS From a Maintain Procedure

The following code will set the password to DBAUSER2:

SYS_MGR.FOCSET( 'PASS', 'DBAUSER2.' );

Note: When setting a password for DBA access, keep in mind that the last value set from within the application will be in effect for all transactions for that end user's session.



Example: Setting maintain_warning From a Maintain Procedure

The following code allows you to display your own error message:

case test1.
Compute date1/a10;
Compute date2/mdyy
Sys_mgr.focset("maintain_warning", "off")
compute date2 = date1;
if date2 = '' then 
compute msg = 'Date is not valid';
endcase

To set the Maintain warning messages on, issue the command:

sys_mgr.focset("maintain_warning", "on")

WebFOCUS