getProfileStringAppServer

getProfileStringAppServer(fileName: String;
                          section:  String;
                          keyName:  String;
                          default:  String): String;

The getProfileStringAppServer method of the Application class returns a parameter (key name) string from the specified section of the JADE initialization file on the application server workstation when the application is running in JADE thin client mode.

If the application is not running in JADE thin client mode, this method functions like the Application class getProfileString method; that is, it returns the specified profile string from the workstation in which the application is running. (Use the getProfileString method to return the specified profile string from the presentation client or node.getProfileString to return the specified profile string from the current node.)

The setProfileStringAppServer method copies the string into the specified section of an initialization file on the presentation client.

The parameters for the getProfileStringAppServer method are listed in the following table.

Parameter Specifies the …
fileName Initialization file. If you set this parameter to windows, the win.ini file on the application server workstation is used. If it does not contain a full path to the file, Windows searches for the file in the Windows directory on the application server.
section Initialization file section containing the key (parameter) name.
keyName Name of the key (parameter) whose associated string is to be retrieved.
default Default value for the specified key if the key cannot be found in the initialization file or if the specified key is found in the initialization file but has the special value <default>.

You can return all initialization file sections or all parameters in a section, by using the JadeProfileString category global constants listed in the following table.

Global Constant Specified in the… Returns all…
ProfileAllKeys keyName parameter Key (parameter) strings in the initialization file section, separated by spaces
ProfileAllSections section parameter Initialization file sections, separated by spaces

You can use this method to retrieve a string from a two-level section name (prefixed with a unique identifier) within a JADE initialization file shared by multiple programs on the same application server host. For details, see "Two-Level Section Names" under "Format of the JADE Initialization File", in the JADE Initialization File Reference.

The following example shows the use of the getProfileStringAppServer method to determine the server mode for the current JADE initialization file.

vars
    server : String;
begin
    server := app.getProfileStringAppServer("\jade\system\JADE.ini",
              "InternalAS.JadeClient", "ServerName", null);
    write "server name is " & server;
end;