dsmSetUp

The dsmSetUp function call overwrites environment variable values. Call dsmSetUp before dsmInitEx. The values that were passed in the envSetUp structure overwrite any existing environment variables or defaults. If you specify NULL for a field, values are taken from the environment. If you do not set a value, the values are taken from the defaults.

Requirements:
  1. If you use dsmSetUp, always call dsmTerminate before dsmCleanUp.
  2. API instrumentation can only be activated if the testflag INSTRUMENT: API is set in the configuration file and the dsmSetUp or dsmCleanUp calls are used in the application.

Syntax

dsInt16_t DSMLINKAGE dsmSetUp
        (dsBool_t    mtFlag,
         envSetUp    *envSetUpP);         

Parameters

dsBool_t mtFlag (I)
This parameter specifies if the API will be used in a single thread, or a multithread mode. Values include:
   DSM_SINGLETHREAD
   DSM_MULTITHREAD
Requirement: The multithread flag must be on for LAN-free data transfer to occur.
envSetUp *envSetUpP(I)
This parameter is a pointer to the structure that holds the overwrite values. Specify NULL if you do not want to override existing environment variables. The fields in the envSetUp structure include:
  Name Description
  dsmiDir A fully-qualified directory path that contains a message file on UNIX or Linux®. It also specifies the dsm.sys directories.
  dsmiConfig The fully-qualified name of the client options file.
  dsmiLog The fully-qualified path of the error log directory.
  argv Pass the argv[0] name of the calling program if the application must run with authorized user authority. See Controlling access to password files for more information.
  logName The file name for an error log if the application does not use dsierror.log.
  inclExclCaseSensitive Indicates whether include/exclude rules are case-sensitive or case-insensitive. This parameter can be used on Windows only, it is ignored elsewhere.

Return codes

The return code numbers are provided in parentheses ( ).

Table 1. Return codes for dsmSetUp
Return code Explanation
DSM_RC_ACCESS_DENIED (106) Access to the specified file or directory is denied.
DSM_RC_INVALID_OPT (0400) An invalid option was found.
DSM_RC_NO_HOST_ADDR (0405) The TCPSERVERADDRESS for this server is not defined in the server name stanza in the system options file.
DSM_RC_NO_OPT_FILE (0406) The options file specified by filename cannot be found.
DSM_RC_MACHINE_SAME (0408) The NODENAME defined in the options file cannot be the same as the system HostName.
DSM_RC_INVALID_SERVER (0409) The system options file does not contain the SERVERNAME option.
DSM_RC_INVALID_KEYWORD (0410) An invalid option keyword was found in the dsmInitEx configuration file, the option string, dsm.sys, or dsm.opt.
DSM_RC_PATTERN_TOO_COMPLEX (0411) The include or exclude pattern issued is too complex to be accurately interpreted by IBM® Storage Protect.
DSM_RC_NO_CLOSING_BRACKET (0412) The include or exclude pattern is incorrectly constructed. The closing bracket is missing.
DSM_RC_NLS_CANT_OPEN_TXT (0610) The system is unable to open the message text file.
DSM_RC_NLS_INVALID_CNTL_REC (0612) The system is unable to use the message text file.
DSM_RC_NOT_ADSM_AUTHORIZED (0927) You must be the authorized user to have multithreading and passwordaccess generate.
DSM_RC_NO_INCLEXCL_FILE (2229) The include-exclude file was not found.
DSM_RC_NO_SYS_OR_INCLEXCL (2230) Either the dsm.sys or the include-exclude file was not found.