Using Control Language

15

Entering CL Commands

You can type CL commands on an i5/OS node using any of the following methods:

Embedding CL Commands

You can embed CL commands in an application (user-written CL program), which allows you to combine functions supplied by Sterling Connect:Direct for i5/OS with i5/OS CL commands within a user-written application.

Entering CL Commands in Free Format

You can type CL commands in a free format, which allows you to type a command and its parameters as a string of characters on a command line. This method is useful when typing familiar commands.

Command Prompting

Command prompting guides you through typing commands and parameters.

Note: Sterling Connect:Direct for i5/OS commands are case sensitive if the information sent to the remote node is enclosed in single quotation marks.

Monitoring CL Program Messages

After issuing Sterling Connect:Direct for i5/OS commands such as, CDSND, CDRCV, CDRUNTASK, and CDRUNJOB, use the MONMSG command to monitor the following categories of error messages using a CL program:

Message Category

Message ID

Severity

Other

 

 

 

 

Warning

CDE0107

10

*ESCAPE

 

 

 

 

Unrecoverable error

CDE0108

30

*ESCAPE

 

 

 

 

Unexpected error

CDE0000

 

 

 

(for example, CDE0301)

 

 

 

 

 

 

Note: You cannot use MONMSG to monitor CDS0108 (Process execution ended) because it is not sent as an error message; it is an informational message.

To capture the Sterling Connect:Direct error message after the MONMSG code, add the following after the MONMSG command:

RCVMSG MSGTYPE(*LAST) WAIT(1) RMV(*NO) MSGID(&MSGID)MSGDATA(&MSGDTA) SNDMSG MSG(&MSGID '' &MSGDATA) TOUSR(*SYSOPR)

Page 15
Image 15
IBM CDI5UG1107 manual Entering CL Commands, Monitoring CL Program Messages, Embedding CL Commands, Command Prompting