Using the PeopleSoft Data Mover Command-Line Interface

This section provides an overview of using the PeopleSoft Data Mover command-line interface.

The PeopleSoft Data Mover command-line interface enables you to run PeopleSoft Data Mover scripts from the command line in UNIX and Microsoft Windows environments. The command-line interface is designed only for running scripts, not creating and editing scripts. In Microsoft Windows, you create and edit scripts using the PeopleSoft Data Mover development environment. In UNIX, you can use any supported text editor.

When using the command-line interface, the results of the script run appear in the command-line window, much like the contents of the output pane in the PeopleSoft Data Mover GUI. The system also writes this information to the log file.

The PeopleSoft Data Mover command line supports the environment variable $PS_HOME on UNIX and %PS_HOME% on Windows.

Note: Although the command-line interface also runs on Windows machines, this documentation primarily discusses UNIX.

Important! The PeopleSoft Data Mover command line on UNIX is intended to increase performance with large database loads during installation. Use the PeopleSoft Data Mover Windows interface for other types of scripts.

Before running the PeopleSoft Data Mover command-line interface on UNIX, verify that Tuxedo is installed. Tuxedo is required for PeopleSoft Data Mover to run on UNIX.

Next, configure the psconfig.sh shell script to set the UNIX and PeopleTools environment variables properly for Data Mover, then run the script. You must run it from the PS_HOME directory.

Note: The UNIX environment requires certain platform-specific environment variables. These variables are set automatically, but you can reconfigure the psconfig.sh script file to change their values.

UNIX Environment Variables

Data Mover environment variables for UNIX are stored in the psconfig.sh script. When you run psconfig.sh, several environment variables are automatically set to default values that reflect a standard PeopleSoft Data Mover install.

To modify them, you must edit psconfig.sh or manually change the environment.

Statement

Description

$DM_HOME=$HOME/PS_DM

Data Mover output, log file and trace file path. This environment setting needs to point to a writable location in case of a secure, read-only PS_HOME environment.

The default setting is $HOME/PS_DM

PS_DM_DATA_IN=$PS_HOME/data

Specifies the directory where PeopleSoft Data Mover searches for input data (.DAT) files. The default setting is $PS_HOME/data.

PS_DM_DATA_OUT=$DM_HOME/data

Specifies the directory where PeopleSoft Data Mover writes the output data (.DAT) files. The default setting is $DM_HOME/data.

PS_DM_SCRIPT=script_path;export PS_DM_SCRIPT

$PS_DM_SCRIPT specifies the location of the PeopleSoft Data Mover script files. The default setting is $PS_HOME/scripts.

PS_DM_LOG=log_path;export PS_DM_LOG

$PS_DM_LOG specifies the location of PeopleSoft Data Mover log files. The default is $DM_HOME/log, as in as in $HOME/PS_DM/log.

Note: $DM_HOME/log is an environment variable for UNIX specifying a location to which Data Mover has write access in the case of a read-only PS_HOME configuration.

Note: If you want to perform tracing under UNIX, you must set additional environment variables.

Note: If you have installed your PeopleSoft application outside of PS_HOME, make sure to consider the PS_APP_HOME location.

See Setting Up Tracing.

To enable tracing for PeopleSoft Data Mover, you must set the PS_SERVER_CFG environment variable to point to the Data Mover configuration file, which contains parameters for tracing and character set:

  • In Windows, you can set PS_SERVER_CFG in the System control panel, or issue the following command in a batch file or at a command prompt:

    set PS_SERVER_CFG=%PS_HOME%\setup\psdmtx.cfg
  • In UNIX, edit psconfig.sh to include the following statement:

    PS_SERVER_CFG=$PS_HOME/setup/psdmtx.cfg;export PS_SERVER_CFG

To configure tracing for PeopleSoft Data Mover, you must edit the psdmtx.cfg file to specify the appropriate tracing behavior. Use the TraceSql bitfield parameter to set the level of the SQL trace by adding together the numeric values that represent each degree of tracing required. The values are defined as follows:

Bit Value

Type of Tracing

1

SQL statements.

2

SQL statement variables.

4

SQL connect, disconnect, commit and rollback.

8

Row Fetch (indicates that it occurred, not data).

16

All other API calls except ssb.

32

Set Select Buffers (identifies the attributes of columns to be selected).

64

Database API specific calls.

128

COBOL statement timings.

4096

Manager information.

8192

Mapcore information.

After running PeopleSoft Data Mover, look for the generated trace log file in PS_CFG_HOME\log\APPSRV.LOG.

For UNIX, the TraceFile environment variable enables you to configure the trace file path and name. The system only uses the TraceFile value when TraceSql is set to a value greater than 0. The default value of TraceFile is DM_HOME/datamover.trc. For example,

TraceFile=%DM_HOME%/datamover.trc

The PeopleSoft Data Mover command line program is located as follows:

  • Microsoft Windows: PS_HOME\bin\client\winx86

  • UNIX: PS_HOME/bin

At a command prompt, change to the program directory and issue the psdmtx command with the appropriate parameters.

Standard Command Line Syntax

Use the following standard syntax to run most Data Mover scripts:

psdmtx -CT dbtype  -CD database_name 
-CO user_ID -CP user_password[-CI connect_ID -CW connect_password] 
[-I process_instance] -FP dms_filepath

The value of each parameter follows the parameter name, separated by zero or more spaces. It doesn’t need to have quotation marks around it, even if it has internal spaces — the system treats all text following the parameter name as part of the value, up to the next parameter or the end of the command line.

Note: You must enclose a value in quotation marks only when it includes a hyphen or forward slash, or to include leading or trailing spaces. If the value itself includes a quotation mark character, precede the double quote with a backslash (\).

To display a listing of all the command-line parameters and their arguments at the command prompt, enter:

psdmtx /help

Standard Command Line Parameters

The following table lists the standard command-line parameters and arguments for running the psdmtx command:

Parameter

Argument

Example

–CT

Specify the database type. Valid values are DB2ODBC, DB2UNIX, MICROSFT, and ORACLE.

Note: Notice the spelling of MICROSFT.

DB2ODBC is the database type for DB2 z/OS.

-CT ORACLE

–CD

Specify the name of the database to connect to, as you would when signing in to PeopleSoft.

-CD HR844DMO

–CO

Specify the PeopleSoft user ID you're using to sign in.

-CO JPHAM2

–CP

Specify the user password for the PeopleSoft user ID you specified.

-CP password

–CI

(Optional) Specify the connect ID used to connect to the database server.

Note: This parameter is required only if you're running PeopleSoft Data Mover in regular mode.

-CI people

–CW

(Optional) Specify the password for the Connect ID you specified.

Note: This parameter is required only if you're running PeopleSoft Data Mover in regular mode.

-CW password

–I

(Optional) Specify the Process Scheduler process instance.

Note: This parameter is required only if you're running PeopleSoft Data Mover from PeopleSoft Process Scheduler. You generally enter the predefined meta-string %%INSTANCE%% in the process type definition, and PeopleSoft Process Scheduler inserts the correct value at runtime.

-I %%INSTANCE%%

–FP

Specify the file name and path of the PeopleSoft Data Mover script to run.

-FP $PS_HOME/scripts/
test.dms

/help

No value required.

psdmtx /help

Note: When running scripts, be sure to consider your PS_APP_HOME location if you've installed your PeopleSoft application outside of PS_HOME.

Following is an example of a standard psdmtx command line on a UNIX system:

psdmtx -CT DB2UNIX -CD FS845A1 -CO PSOFT -CP PSOFT
 -CI people -CW peop1e -FP fs845a1dbo.dms

Using a Parameter File

Rather than submitting parameters manually on the command line, you can have PeopleSoft Data Mover read a file that contains appropriate parameters. Create a text file that contains a complete set of parameters as you would enter them on the command line.

If you submit a parameter file name and path to PeopleSoft Data Mover as the first parameter in the command line, PeopleSoft Data Mover reads the contents of the file and interprets them as parameters entered on the command line. For example:

psdmtx c:\dms\myparmfile.txt

Note: You must enter the full path to the parameter file.

Warning! For security reasons, after PeopleSoft Data Mover interprets the contents, it immediately deletes the parameter file.