setRemoteUser()

The sysLib.setRemoteUser() system function sets the userid and password for calls to remote programs from Java™ programs.
Authorization may be required when the linkage options part, callLink element, remoteComType property has one of the following values:

Authorization is based on non-blank values that are passed to sysLib.setRemoteUser().

If a value is blank or not specified, EGL looks for that value in the csouidpwd.properties file, which includes the properties CSOUID (for the user ID) and CSOPWD (for the password). For more information on csouidpwd.properties, see csouidpwd.properties file for remote calls. If you do not use either approach, EGL makes the call without a user name or password.

Before it invokes sysLib.setRemoteUser(), your code can issue Java access functions that display a dialog box to prompt the user for the user ID and password. You can use one or both values in csouidpwd.properties as a default that takes effect when the user does not provide this information.

Syntax

  sysLib.setRemoteUser(
    userID STRING in,
    password STRING in)
userID
The user ID on the remote system.
password
The password on the remote system. This password is encrypted automatically if you pass a string literal to the function. For more information, see Encrypting passwords.

Example

setRemoteUser("jfred", "p0w1d2");

Compatibility

Table 1. Compatibility considerations for setRemoteUser()
Platform Issue
COBOL generation The sysLib.setRemoteUser() function is not supported.
JavaScript generation The sysLib.setRemoteUser() function is not supported.

Feedback