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.
The syntax is
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.
Is an appropriate setting for that command.
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
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.
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: