SYS_MGR.FOCSET

How to:

Using SYS_MGR.FOCSET, you can set certain environment settings for the Reporting 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.

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 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 to on, issue the command:

SYS_MGR.FOCSET("MAINTAIN_WARNING ", "ON")