Sample Command

Option

Description

Value

Entry

 

 

 

 

-e nn

Defines the error level above

0 4 8 16

$ direct -e 16

 

which the CLI automatically

Valid values in the

 

 

exits. If the returned error code

 

 

is greater than the error level

error level code are:

 

 

specified, the CLI automatically

0—Indicates successful

 

 

exits.

 

 

completion.

 

 

 

 

 

Use this command within shell

4—Indicates warning.

 

 

scripts.

 

 

 

 

 

This parameter prevents

8—Indicates error.

 

 

 

 

 

unwanted execution of

16—Indicates

 

 

commands following a

 

 

catastrophic error.

 

 

command that generates an

 

 

 

 

 

error above the specified level.

 

 

 

When the CLI terminates, it

 

 

 

returns a UNIX exit code that

 

 

 

can be tested by the shell.

 

 

 

 

 

 

-n name

Identifies the host name of the

Sterling Connect:Direct

$ direct -n hostname

 

computer where the Sterling

host name

 

 

Connect:Direct server (PMGR)

 

 

 

is running.

 

 

 

Note: Invoking direct with -p

 

 

 

or -noverrides the settings in

 

 

 

the ndmapi.cfg file.

 

 

 

 

 

 

-p nnnnn

Identifies the communications

1024–65535. The format

$ direct -p 2222

 

port number for the Sterling

is nnnnn.

 

 

Connect:Direct node.

 

 

 

Note: Invoking direct with -p

 

 

 

or -noverrides the settings in

 

 

 

the ndmapi.cfg file.

 

 

 

 

 

 

-x

Displays command input on

none

$ direct -x

 

standard out. Use this

 

 

 

command when debugging

 

 

 

scripts.

 

 

 

 

 

 

-r

Makes the Process number

none

$direct -r grep

 

available to user-written shell

 

“_CDPNUM_”

 

scripts. The CLI displays a

 

 

 

special string, _CDPNUM_

 

 

 

followed by a space, followed

 

 

 

by the Process number.

 

 

 

 

 

 

-h

Displays command usage

none

$ direct -h

 

information if a Sterling

 

 

 

Connect:Direct command is

 

 

 

typed incorrectly.

 

 

 

 

 

 

-z

Appends a newline character

none

$ direct -z

 

after a prompt.

 

 

 

 

 

 

CLI Job Control

Sterling Connect:Direct enables you to switch the CLI Process between the foreground and the background in shells that support job control. This capability

Chapter 1. Controlling and Monitoring Processes 3

Page 9
Image 9
IBM 4J manual CLI Job Control, Cdpnum