Running a program in real time
A template step that runs a program in real time is called an immediate execution step.
<submitAs>):- TSO-REXX
- Run a REXX exec program in real time.
- TSO-UNIX-REXX
- Run a REXX exec program for the UNIX environment in real time.
- TSO-UNIX-shell
- Run a UNIX shell script in real time.
The program results are immediately available to the step owner.
Input parameters
<scriptParameters> element with the following attributes: -
<description> - Text description of the parameter, such as its intended use or recommended value.
<value>- Default value of the parameter.
Writing variables to a properties file
In your program, you might choose to create variables, and save them to a properties file. When the file is saved, the properties are available for use with the same workflow. For more information, see Creating a properties file.
- Specified in the Output File field in the Workflows task UI.
- Read in as a workflow variable input file on creation of the workflow.
For a program that creates variables in a properties file, you can optionally include a prefix on
the output variables. Here, you can specify a meaningful prefix that identifies a string as an
output variable. To do so, add the element <outputVariablesPrefix> to the
<submitAs> element.
outvar: is applied to the names of any
variables that are created by the step:
<outputVariablesPrefix needResolveConflicts="true">outvar:</outputVariablesPrefix>To manage potential variable name conflicts, you can specify a default behavior by adding the
attribute <needResolveConflicts> to the element
<outputVariablesPrefix>. By default, the step owner is prompted to choose the
appropriate variable value in the Workflows task.
loadOutputFileArrayValue) attribute. Add this attribute to the element
<outputVariablesPrefix> and set it to true or false, as follows: - If set to true (the default), the workflow uses the array variable values from the output file, rather than from the Workflows task.
- If set to false, the workflow uses the existing values from the Workflows task.
TSO/E address space for program execution
<regionSize>- Region size (in kilobytes) to be used for the address space. The valid range of values is 50000 - 2096128 (kilobytes). The Workflows task UI allows the step owner to specify a different region size, or use the supplied value. If no value is specified, the region size is 50000 kilobytes, by default.
<procName>- TSO logon procedure to be used for the address space. If no value is specified, the default is to use IZUFPROC, which is supplied by IBM as a cataloged procedure in proclib.
<timeout>- Time limit for an executable program. The valid range of values is 60 - 3600 (seconds). If no value is specified, the timeout value is 1800 seconds (30 minutes), by default.
Completion messages
<submitAs> element: <successPattern>- Successful completion message. This element is required. You must specify one (and only one)
regular expression for a successful program completion. The format is:
<successPattern>success regular expression</successPattern> <failedPattern>- Error message. This element is optional. You can omit this element or specify up to 100
different expressions for potential program errors. The format is:
<failedPattern>failure regular expression</failedPattern>
- TSO-REXX
- The maximum length is 10000 lines.
- TSO-UNIX-REXX
- The maximum length is 255 characters; extra characters are truncated.
- TSO-UNIX-shell
- The maximum length is 255 characters; extra characters are truncated.
Temporary locations
- TSO-REXX
userID.IZUWFTSO.W, plus a randomly generated 7-digit number.- TSO-UNIX-REXX
/tmp/fileName-scriptRexxFile.rexx, where fileName is a randomly generated 32-digit number.- TSO-UNIX-shell
/tmp/fileName-scriptShellFile.sh, where fileName is a randomly generated 32-digit number.
- Variable output file is saved at
/data/app/IZUWorkflows-workflowKey/outputFiles/stepName-outputfile - Message output file is saved at
/data/app/IZUWorkflows-workflowKey/scriptFile/stepName-scriptOutputMessageFile
Examples
workflow_sample_program_execution.xml, which is supplied with z/OSMF in the /samples subdirectory
of the product file system.
<step name="TSO-TSO-REXX_Execution">
<title>A step that runs a REXX exec program.</title>
<description>In this step, an inline REXX exec is processed immediately on the host system.
The processing is ended by a time-out condition.
</description>
<variableValue name="st_group" required="true"/>
<variableValue name="st_user" required="true"/>
<variableValue name="procNameVariable" required="true"/>
<instructions substitution="false">This step outputs some variables and prints a few words.
</instructions>
<weight>1</weight>
<skills>System Programmer</skills>
<template>
<inlineTemplate substitution="true">/* rexx */
parse arg arg1
SAY "this is a sample to submit TSO REXX script to run immediately"
SAY "the first parameter is :" arg1
SAY ${instance-st_user}
SAY "prefix:st_group =" SYS123
SAY "prefix:st_user =" USERS
SAY "This execution will meets timeout."
</inlineTemplate>
<submitAs>TSO-REXX</submitAs>
<successPattern>success.*</successPattern>
<failedPattern>failed.*</failedPattern>
<outputVariablesPrefix needResolveConflicts="true">prefix:</outputVariablesPrefix>
<scriptParameters>
<description>A simple parameter</description>
<value>para1</value>
</scriptParameters>
<procName substitution="true">${instance-procNameVariable}</procName>
<regionSize>50000</regionSize>
<timeout>60</timeout>
<saveAsUnixFile substitution="true">/u/${instance-st_user}/savedStuff/myScript.sh</saveAsUnixFile>
</template>
</step>