Redwood Documentation

Product Documentation

 

›Agent Definition Types

RunMyJobsPlatform Agents

External Platforms

  • Connecting Redwood Server to External Platforms

Credentials

  • Storing Credentials
  • Credential Protocols

Platform Process Servers

  • On-site Platform Process Servers
  • Cloud Platform Agents
  • Using the Wizard to Create Process Servers
  • Configuring Platform Agents
  • Spool Host Agents
  • The Environment of Platform Agent OS Processes
  • Processing Platform Processes
  • Process Server Services
  • Configuring Agentless Process Servers
  • Automatically Updating Platform Agents
  • Enabling TLS
  • Creating Monitoring Checks
  • Configuring Load Balancing on Platform Agents
  • Platform Agent Registry Entries
  • Monitoring Servers with Platform Process Servers

UNIX Agents

  • UNIX Process Servers
  • UNIX Process Server Configuration Data
  • File Events on UNIX
  • Creating UNIX Process Servers (Advanced)
  • Choosing a User Switching Security Mode
  • Controlling Unix Platform Agents
  • Uninstalling Redwood Server Platform Agents from UNIX

Windows Agents

  • Creating a Microsoft Windows Process Server
  • File Events on Microsoft Windows Process Servers
  • Configuration of a Microsoft Windows Process Server
  • Managed Services
  • Configuring Platform Agents on Microsoft Windows
  • Automating Windows tasks that require a desktop window
  • Uninstalling Redwood Server from Microsoft Windows

Agent Definition Types

  • Using the BASH Definition Type
  • Using the KSH Definition Type
  • Using the CSH Definition Type
  • Using the Perl Definition Type
  • Using the Python Definition Type
  • Using the PowerShell Definition Type
  • Using the Visual Basic Script Definition Type
  • Using the CMD Definition Type
  • Using the R Process Definition Type
  • Using the DCL Definition Type
  • Using Platform Definition Types
  • Using the OS Native Definition Type
  • Microsoft Windows Definition Types
  • Using the SQLPLUS Definition Type
  • Using the FTP Definition Type
  • Using the Groovy Definition Type

Command Line Tools

  • Command Line System Tools
  • jtool
  • jcat
  • jdescription
  • jevent
  • jecho
  • jftp
  • JFTP Return Codes
  • jgetcredential
  • jgetfile
  • jgetpar
  • jjoin
  • jlink
  • jlog
  • jmail
  • jmessage
  • jmonitor
  • jputfile
  • jregister
  • jrfc
  • jscp
  • jtool screenshot
  • jscript
  • jsecret
  • jsleep
  • jsplit
  • api-tool.jar

OpenVMS Process Servers

  • Creating HP OpenVMS Process Servers
  • Installing the Platform Agent on HP OpenVMS
  • Configuring HP OpenVMS Process Servers
  • File Events on HP OpenVMS
  • HP OpenVMS Definition Types

AS/400 Connector

  • IBM AS/400 Connector Architecture
  • Setting up the IBM AS/400 Connector
  • Creating an IBM AS/400 Process Server
  • Files on AS/400 Raise Events
  • Using the AS/400 Definition Type
  • Redwood Server OS Support
  • IBM z/OS Definition Types
  • Using the JCL_FTP Definition Type
  • IBM z/OS System Tools

Reference

  • Balancing the Load
  • Credential Protocols
← Using Platform Definition TypesMicrosoft Windows Definition Types →

Using the OS Native Definition Type

The OS Natvie definition type uses the default shell of the user the process runs as. You specify your code to run directly in the source field just like a CMD or Bash definition type.

note

You must assign at least one process server to run OS Native process definitions in order to use the definition type.

Variables and Parameters

  • Parameters in the process definitions are manipulated in the shell source simply as variables, using:PARAMETER or the standard target system syntax (Windows %PARAMETER% or UNIX $PARAMETER).
    • A third method for specifying parameters is the REL syntax parameters.PARAMETER (available if the source is REL and starts with =)
  • Out parameters are supported by setting the parameter using the native syntax for your shell. For example set PARAMETER1=value on Windows/CMD and UNIX/csh, or PARAMETER1=value on UNIX/sh. Consult the documentation for the default command line interpreter on your platform for more information.

When you specify:PARAMETER and the parameter PARAMETER does not exist, the string is passed as such to the shell.

Note that parameters with multi-line values to be executed should be specified using the REL syntax (for example parameters.P_MULTILINE_COMMANDS ).

Returning an Error

If your script code exits with a non-zero exit code this is correctly reflected in the server.

Code a shell-specific exit command ( set -e in Bourne-based shells, exit /b on Windows) to abort script execution immediately on running a command that has a non-zero exit status.

OS Independent

You use the osFamily parameter to determine the type of OS you are running on (Windows, UNIX, VMS) using REL and have the right shell execute the right code, regardless of which platform the OS process; runs on.

Examples

Echoing parameters:

echo Hello :NAME

='echo Hello ' + Logic.case(osFamily, 'windows', '%NAME%', 'unix', '${NAME}', ':NAME')

The following shows how to use a normal environment variable:

='echo This is running under user:USER with home directory:HOME and temporary directory $TMPDIR.
echo '+osFamily+'
echo '+parameters.Parameter1+'
echo ':Parameter2'

The following shows how to pass numeric (N1), string (S1) and date (D1) parameters to and from BASH scripts:

='# Note BASH allows no spaces around = in variable assignment
N1=$((expr $N1 + $N1))  # Add numeric variable to itself
S1=":S1 :S1"  # Concatenate string
DTEMP="2023/09/28 23:59:59,000 GMT"
echo You said:D1, I propose:DTEMP
D1=:DTEMP   # Set DateTime to new string value'

The following example shows you how to return a non-zero exit code resulting in the process going into Error:

='N=1
echo "Exiting with value :N."
exit:N

echo "Not reached"'

The following example shows you how to use RedwoodExpressionLanguage to detect the underlying operating system and list the contents of the current directory:

=Logic.case(osFamily, 'windows', 'dir', 'unix', 'ls', 'dir')

See Also

  • Platform Agent Definition Types
  • Command Line System Tools
← Using Platform Definition TypesMicrosoft Windows Definition Types →
  • Variables and Parameters
  • Returning an Error
  • OS Independent
  • Examples
  • See Also
Docs
Getting StartedInstallationFinance InstallationConcepts
TroubleshootingArchiving
Learn and Connect
Support Portal
BlogEventsResources
ISO/ IEC 27001 Information Security Management
Automate to be human

2023 All Rights Reserved |

Terms of Service | Policies | Cookies | Glossary | Third-party Software | Contact | Copyright | Impressum |