What is the acceptable syntax to pass command from dSeries CLI utility? What is syntax if the CLI is being used in a UNIX / WINDOWS job type?
search cancel

What is the acceptable syntax to pass command from dSeries CLI utility? What is syntax if the CLI is being used in a UNIX / WINDOWS job type?

book

Article ID: 14102

calendar_today

Updated On:

Products

DSERIES- SERVER ESP dSeries Workload Automation - System Agent (dSeries)

Issue/Introduction

When running DE CLI utility from command line, the OS may interfere/limit with the syntax of the command.



What is the acceptable syntax to pass command from dSeries CLI utility?  

What is the syntax if the CLI is being used in a UNIX / WINDOWS job type?

Environment

OS: Linux/UNIXWindows

Workload Automation DE (ESP dSeries): 12.3 or above

Resolution

In Linux, the quotes have to be specified in the following manner:

cli de.example.com 7500 user1 password 'SUSPEND EVENT("USER1.MY_NEW_APP")'

The CLI command requires four parameters hostname, port, user and password and an optional fifth.  If the fifth parameter or command has multiple parts like example above, then entire command must be within single quotes.  This parameter in whole will then be passed to the server after the CLI successfully authenticates.  

The quotes are needed because parenthesis denote sub-shell in Linux and Unixes.  Hence, the command without quote will result in an error.  The following will also work, since the command has only one part in it.

cli de.example.com 7500 user1 password about

 

In Windows OS, the single quotes are not needed.  In fact, single quotes will return an error in Windows.

C:\Program Files\CA\WACLISP1\bin>cli.bat de.example.com 7500 user1 password 'SUSPEND EVENT("USER1.MY_NEW_APP")'

Parse error: Illegal start of identifier "'"

'SUSPEND EVENT("USER1.MY_NEW_APP")'

 

Additional Information

You can define the CLI commands as a DE job in UNIX and Windows job type.  Define them exactly as they would be on the OS CLI.  If the OS requires quotes, then put quotes or leave them if not needed as in Windows. 

 

Attachments

1558718670417000014102_sktwi1f5rjvs16v19.png get_app