U_RSTREND
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
xcall U_RSTREND([filename], [scheme][, status])
Arguments
filename
(optional) The name of the rendition file. (a)
scheme
(optional) The rendition scheme name. If not specified or blank, the currently loaded renditions are used. (a)
status
(optional) Returned with zero (0) if the restore operation is successful, or with a Synergy DBL error number if it is unsuccessful. (n)
Discussion
U_RSTREND restores a rendition scheme from a rendition file. It opens filename in I:I mode and closes it upon exit.
If filename does not exist and status is not passed, errors during the open are ignored and no renditions are restored. If filename is not specified, UI Toolkit searches for the rendition file as follows:
- If the environment variable DTKRNDFIL is defined, the rendition filename is DTKRNDFIL’s value.
- If DTKRND is defined instead of DTKRNDFIL, the rendition file is opened as DTKRND:dtkrnd.ism.
- If neither environment variable is set, dtkrnd.ism is opened in the current directory.
If Toolkit can’t find the renditions file, U_RSTREND does nothing. Additionally, if Toolkit can’t open a renditions file, no error occurs and no action is taken. You can use status to find out if the operation failed or was successful.
Once a file is opened, U_RSTREND loads the rendition scheme. If scheme is passed, it is used as the key (which is not case sensitive) to the file. If scheme is not passed, a blank key is used. A blank key marks the current rendition scheme. If the desired scheme cannot be found in the file, no error occurs and no renditions are modified. You can use status to find out if the operation failed or was successful.
Once the rendition scheme is loaded, the rendition definitions are used for subsequent screen displays.
See also
Customizing the look of your application
Examples
The following utility subroutine restores and stores personalized rendition schemes from a rendition file.
subroutine pers_rend a_scheme ,a a_rstflg ,n ;Restore flag: 1=restore, 0=save .include "WND:tools.def" .define RENDFILE ,"RND:persrnd" record error ,i4 proc if (a_rstflg) then xcall u_rstrend(RENDFILE, a_scheme, error) else xcall u_savrend(RENDFILE, a_scheme, error, TRUE) if (error) xcall proc_error xreturn endsubroutine