Execution Methods

An Execution Method defines how a Job executes within the JAMS environment. JAMS includes dozens of Executions Methods to run Jobs on Windows, Unix, Linux, OpenVMS, or any operating system supporting connections using SSH. The Execution Methods are set up so they can be used with Job Definitions without any additional configuration. An Execution Method is associated with each Job Definition.

You can also create a new Execution Method by using an existing one as a template. It is recommended that you apply any modifications or customizations to a new Execution Method rather than an existing Execution Method. This helps to ensure any existing Jobs are not impacted. It also helps to ensure any customizations are not affected by an upgrade. For example, you can add a Parameter or a Job Property to an Execution Method and all Jobs that reference it will have the set Parameter or Job Property.

You can also create and customize your own Execution Methods. This is useful if you want to create an Execution Method that uses another programming language, such as Perl or Python. Creating a custom Execution Method is a two-step process that includes creating the Execution Method, and then modifying its properties. Both are described in detail below.

Execution Methods screen

The Execution Methods screen lists all the available Execution Methods in JAMS. Each Execution Method displays the following:

  • Method Name - This is the unique identifier for the Execution Method.
  • Description - This reference property is used to summarize the Execution Method definition.
  • Last Changed - This property displays the date and time this Execution Method parameter was last modified.

Creating a New Execution Method

  1. Click Execution Methods from the Shortcuts menu.
  2. Click +.
  3. In the Name field, enter a name for the Execution Method.
  4. In the Base Method field, select an existing Execution Method that is used as a template.
  5. Click Ok.
  6. Click the Parameters tab to add a Parameter.
  7. Click the Template tab to add any processing for the Execution Method.
  8. Click the Properties tab to review and modify any Properties that are specific to the Execution Method.
  9. Click the Job Properties tab set default values for certain Properties that are inherited by the Job Definition.
  10. Click Save and Close.

Modifying an Execution Method

To make changes to an existing Execution Method, open its Execution Method Definition dialog from the Execution Methods View.

  1. Click Execution Methods from the Shortcuts menu.
  2. Double-click an Execution Method.
  3. Modify the Execution Method, Parameters, Template, Properties, and Job Properties as desired.
  4. Click Save and Close.

Deleting an Execution Method

Before deleting an Execution Method, ensure all Job and Folders that currently use it have been updated to remove references to it. To view where it is referenced, double-click the Execution Method and select the References tab.

  1. Click Execution Methods from the Shortcuts menu.
  2. Click an Execution Method.
  3. Click X.
  4. When you are prompted to confirm the deletion, click Yes.

Execution Method Definition Tabs

Execution Method

This tab contains the basic information about the Execution Method.

  • Method Name - This is the unique identifier for the Execution Method.
  • Description - This reference property is used to summarize the Execution Method definition.
  • Last Changed - This property displays the date and time this Execution Method parameter was last modified.

Parameters

Execution Method Parameters work the same way as Parameters within Job Definitions and apply to all Jobs using this Execution Method. To add a new Parameter, click Add on the Parameters tab to access the Add a Parameter dialog. Each Parameter displays the following:

  • Parameter Name – The unique identifier for the Parameter.
  • Type – The data type for the Parameter.
  • Prompt – The text that is displayed on the Parameters tab when you manually submit a Job.
  • Default Value – The value that is displayed on the Parameters tab when you manually submit a Job.
NOTE: If a Job has a Parameter with the same name as the Execution Method Parameter, the Parameter value on the Job is used.

Template

Templates provide an easy way to include standard pre and post processing for your Jobs. When a Job is submitted, JAMS parses a Job source using either the template defined on this tab or the module defined in the Job Module property for the Job’s source code. Use the built-in text editor to edit the template for this Execution Method.

The example below sets up a simple template that maps two network drives, inserts the Job’s source code, and executes a LogJobComplete program:

NOTE: Ensure the <<JAMS.Source>> or {JAMS.Source} is added to the Template tab. This allows the code from the Job Source tab to be used.
Copy
NET USE E: \\MyServer\EShare NET USE F: \\MyServer\FShare
<<JAMS.Source>>
C:\LogJobComplete.exe <<JAMS.Job.JobName>>

Properties

Assemblies Properties Description
Submit Assembly Name This property is the name of the assembly that contains the class used to handle additional submit behavior for the execution method.
Submit Class Name This property is the name of the class that implements ISubmitSSO that handles additional submit behavior for the execution method.
Start Assembly Name This property is the name of the assembly that contains the class used to start a Job for this execution method.
Start Class Name This property is the name of the class that implements IJobStart for this execution method.
Edit Assembly Name This property is the name of the assembly that contains the class used to edit the source for this execution method.
Edit Class Name This property is the name of the class that implements IViewExecutingJob and IViewJobHistory and will be used to view Jobs that use this execution method.
Edit Module Name This property is the name of the module that contains the source editor that will be used to edit the source of jobs that use this execution method.
View Assembly Name This property is the name of the class that implements IEditSource and will be used to edit the source for this Execution Method.
View Class Name This property is the name of the assembly that contains the class used to view Jobs that use this execution method.
View Module Name This property is the name of the module that contains the source editor that will be used to view the source of this execution method.
Monitor Context Assembly Name This property is the name of the assembly that contains the class used to add additional context menu options for Monitor entries.
Monitor Context Class Name This property is the name of the class that implements IExtendContextMenu and will be used to add additional context menu options for Monitor entries.
Host Assembly Name This property is the name of the assembly that contains the class used to host this execution method.
Executable Sub Directory This property is the name of a sub directory that contains JAMSHost.exe or JAMSHostCore.exe executable.
Host Class Name This property is the name of the class that implements IJAMSHost and will host this execution method.
Host Sub Directory This property is the name of the sub directory that contains the assemblies needed by this execution method.
Host Executable This property is the name of the executable that will host this execution method.
Execute Properties Description
Execution Type This dropdown allows you to choose the Execution Method type. The supported types are:
  • Agent runs a Job using a JAMS Agent.
  • Batch runs a Job by creating a process with a Job or Command.
  • Routine executes a Job using the specified class from a specified assembly using the IJAMSHost interface.
  • SSHAgent executes a Job using a secure shell commands with JAMS AgentX.
Force 32bit When set to true, this Job will run as a 32 bit process, even on 64 bit machines. This option was included for backwards compatibility following V6 to V7 migrations and it should not be adjusted on a V7 Execution Method.
Force V2 When set to true, this Job will run using V2.0 of the .NET Framework. This option was included for backwards compatibility following V6 to V7 migrations and it should not be adjusted on a V7 Execution Method. For more information, see Resolving Mixed Mode Assembly error message in PowerShell.
No BOM When this option is set to true, the Job's source file will not have a Unicode byte order mark.
SSH Prompt This property is a regular expression pattern to handle SSH prompts.
Application This value is passed to the Win32 Create Process function as the value for the Application Name argument.
Command This value is passed to the Win32 Create Process function as the value for the Command Line argument.
Options Properties Description
Host Locally This property indicates that the Job should only be hosted by the machine running the JAMS Scheduler. This setting is used for Execution Methods that need to manage connection to the Agent machine. An example would be the SSH Execution Method which executes locally and uses SSH to connect to the Agent in order to run the actual Job.
Interactive When this option is enabled, this Execution Method can interact with the desktop. However, this option should not be adjusted. The JAMS Agent Interactive should be used for this functionality. Caution: This setting is not recommended since it can lead to potential security issues at the operating system level. The Interactive property has been included here because some applications require access to the desktop to run properly.
No Profile When this option is set to true, PowerShell profiles will not be executed.
Pass Parameters When this option is set to true, Job parameters will be passed to a PowerShell Job as PowerShell parameters.
Redirect This property defines the output redirection behavior to the Job’s log.
Run As Job When this option is set to true, the Job will run as the user defined in the Job even when Host Locally is set to true.
Source Format This property specifies the format of the source code.
Source Properties Description
Edit After Start When activated, this setting permits the source to be edited after a manually submitted Job has started.
Edit Source When activated, this checkbox permits the source to be edited when manually submitting the Job.
Extension This property specifies the default file extension for source code files.
Job Module This is the name of a text module in the template library which is used as the starting point for parsing the Job's command procedure. Entering a value in this property implies that this Job is parsed. The template library is a combination of the macros in the BaseMacros.xml file, the file specified in the "DefaultMacroFile" configuration setting and the macros in the xml file specified in the Job's Folder definition. The BaseMacros.xml file is replaced when installing a JAMS upgrade.
Snapshot Source If this option is enabled, the option allows JAMS to grab a copy of the source when submitting a Job.
Encoding Description
Input Encoding This property is the input encoding for the Job.
Output Encoding This property is the output encoding for the Job’s log file.
Completion Properties Description
Bad Regex Pattern This property is a regular expression pattern, matched in log file output, that indicates a failed execution.
Exit Code Handling This property specifies how JAMS should evaluate a Job's exit code.
Good Regex Pattern This property is a regular expression pattern, matched in log file outputs, that indicates a successful execution for this Job.
Specific Informational This property is a comma-separated list of integer values for Informational Job completion exit codes.
Specific Values This property is a comma-separated list of integer values for the Job completion exit codes based on the Exit Code Handling setting.
Specific Warning This property is a comma-separated list of integer values for Warning Job completion exit codes.

Job Properties

The Job Properties tab lets you add Properties and default values that will be used by all Job Definitions that use the selected Execution Method. For example, you could add the Agent property to an Execution Method so the Job Definitions will use that Agent. To add a property, click + and select a Property from the list.

References

The References tab lets you view which Jobs are referencing an Execution Method as well as where the Job is located.

Predefined Execution Methods

JAMS ships with dozens of Predefined Execution Methods that can run a variety of Jobs on Windows, Linux, UNIX and and other operating systems detailed below.

Predefined Execution Methods Table

Method Description Operating System
Automate This Execution Method runs a Workflow in Automate. Windows
Banner This Execution Method runs a Banner Job on a Unix host. Unix
BannerProcedure This Execution Method runs a BannerProcedure Job. Windows
BannerWin This Execution Method runs a Banner Job on Windows. Windows
Command This Execution Method runs a Windows batch procedure. Windows
CRJobV12 This Execution Method runs Crystal Reports Job using Crystal Reports version 12. Windows
CRJobV13 This Execution Method runs Crystal Reports Job using Crystal Reports version 13. Windows
File Transfer This Execution Method runs a file transfer (FTP, SFTP, or FTP/SSL) Job. Windows
File Watch This Execution Method runs a Job to watch for a file. Multiple
GoAnywhere Project This Execution Method runs GoAnywhere projects from within JAMS. Windows
InformaticaCloud This Execution Method runs an Informatica Cloud task. Windows
JAMSPowerShell This Execution Method runs a PowerShell script with JAMSHost.exe.config set for JAMS. Windows
JAMS Report This Execution Method generates a JAMS Report. Windows
JDEJob This Execution Method runs a J.D. Edwards Job. Windows
JDEJobSsh This Execution Method runs a J.D. Edwards Job on Linux via SSH. Windows
Mail Watch This Execution Method runs a Job to watch for an email. Multiple
MF Job This Execution Method runs a Micro Focus Job. Windows
MSDAX2012Job This Execution Method runs a Microsoft Dynamics AX Job. Windows
NeoBatchCatalog This Execution Method runs a NeoBatch Job from a NeoBatch Catalog. Windows
NeoBatchJcl This Execution Method runs a NeoBatch Job from JCL stored in JAMS. Windows
NetezzaBackup This Execution Method runs a Netezza backup Job using SSH. Unix, Linux
NetezzaLoad This Execution Method runs a Netezza Load Job using SSH. Unix, Linux
NetezzaSQL This Execution Method runs a Netezza Query Job using SSH. Unix, Linux
OdbcCommand This Execution Method runs ODBC Commands. Windows
OleDbCommand This Execution Method runs OLEDB Commands. Windows
OracleEBSConcurrent This Execution Method runs an Oracle EBS Concurrent process. AIX, HP-UX, Linux, Solaris
OracleEBSJobSsh This Execution Method runs an Oracle E-Business Suite Job via SSH. AIX, HP-UX, Linux, Solaris
OracleEBSRequestSet This Execution Method runs an Oracle ES Set Job. AIX, HP-UX, Linux, Solaris
OracleStoredProc This Execution Method runs an Oracle Stored Procedure Job. AIX, HP-UX, Linux, Solaris
OS400 This Execution Method runs IBM System i, OS/400 Jobs. IBM System i
PeopleSoftJobSsh This Execution Method runs a PeopleSoft Job using SSH. Peoplesoft
PeopleSoftJobWindows This Execution Method runs a PeopleSoft Job on Windows. Windows
PowerShell This Execution Method runs a PowerShell script on Windows. Windows
PowerShell32 This Execution Method runs a PowerShell script (32-bit). Windows
PowerShellCore This Execution Method runs a PowerShell Core script on Windows. Windows
SAPDataService This Execution Method runs a SAP Business Objects Data Services Job. Windows
SAPJobV2 This Execution Method runs a SAP multi-step Job. Windows
SAPProcessChain This Execution Method runs a SAP Process Chain. Windows
Sequence This Execution Method runs tasks such as Jobs and File Transfers in sequence or in parallel. It replaces V6.X Setups. Windows
SQLAgent This Execution Method runs a SQL Server Agent Job. Windows
SQLCommand This Execution Method runs SQL commands. Windows
SQLStoredProc This Execution Method runs a SQL Stored Procedure. Windows
SSH This Execution Method runs a Secure Shell. Any
SSHAgent This Execution Method deploys JAMS AgentX using SSH. AIX, HP-UX, Linux, Solaris
SSHDeploy This Execution Method deploys JAMS AgentX using AgentX. Windows
SSHOpenVMS This Execution Method runs a Secure Shell with OpenVMS using prompt matching. OpenVMS
SSHPrompt This Execution Method runs a Secure Shell using prompt matching. Any
SSIS This Execution Method runs SQL Server Integration Services. Windows
SSISDirect This Execution Method runs SQL Server Integration Services. Windows
SSRS This Execution Method runs SQL Server Reporting Services. Windows
UnixScript This Execution Method runs a Unix script based on the shebang on the first line. Unix/Linux
UnixShell This Execution Method runs a shell script on a Unix server. Unix/Linux
Vbs This Execution Method runs a VB script. Windows
VMS This Execution Method runs an OpenVMS DCL Command Procedure. OpenVMS
VMSParsed This Execution Method runs an OpenVMS DCL Command Parsed Procedure. OpenVMS
WindowsDeploy This Execution Method deploys a JAMS Agent to a Windows machine. Windows
Workflow This Execution Method runs a Windows Workflow Job. Windows
z/OS This Execution Method runs an IBM z/OS Job. z/OS

Related Topics