:GENERATE

ScriptEigener Objekttyp in der Automation Engine Statement: This controls the processing of script lines during the execution of a script.

Syntax

:GEN[ERATE]Generation Mode

Syntax

Description/Format

Generation Mode

Generation modes for restarts:

  • ON_RESTART_ALWAYS
    Script lines are always processed, regardless of the restart point.
  • ON_RESTART_CHECK
    Script lines are not processed when they are located before the restart point.
  • ON_RESTART_NEVER
    Script lines are never processed, regardless of the restart point.

Generation modes for DATA lines:

  • UPPER_CASE
    Converts the text in all DATA lines to uppercase letters.
  • LOWER_CASE
    Converts the text in all DATA lines to lowercase letters.
  • CASE_UNCHANGED
    Restores the initial condition of the text (uppercase and lowercase letters).

Comments

Various expressions can be passed on to the :GENERATE statement as Generation Modes. On the one hand, a Generation Mode controls the handling of the script lines when an executable object is restarted. On the other hand, they can be used to determine whether DATA lines should be written in uppercase or lowercase letters.

Restarting executable objects

The Generation Mode can be used when restarting an executable object in order to define the handling of script lines during script execution. This definition is valid until

If :GENERATE is not used for restarting an object, all script lines until the first :RESTART statement will be processed and also all lines that are located after the indicated restart point.

Uppercase and lowercase characters

Text in DATA lines is generally left untouched and transferred to the target system as it was. Script variables -which can be part of DATA lines- are exempted. They are supplied with values (in modified form) with the activation of an object that contain such a script.

Some target systems require the DATA lines to be in a certain format. The operating system BS2000, for example, processes JCL statements (Job Control Language"Abkürzung für ""Job Control Language"". Damit sind Anweisungen gemeint, die Verarbeitungsschritte bilden und auf Rechnern ausgeführt werden.") only when they are capitalized which means that any command would have to be formatted in the Automation EngineDiese Komponente steuert ein Automation Engine-System. Besteht aus verschiedenen Serverprozessen.. The :GENERATE statement provides several generation modes so that restrictions of the specific target system can be avoided when writing scripts.

Examples

The first example shows how :GENERATE can be used for restarting an object and then the different report outputs resulting from the specified restart points are listed.

:PRINT "Script start"

:
RESTART R1
:
PRINT "Point R1"

:
GENERATE ON_RESTART_ALWAYS
:
PRINT "ON_RESTART_ALWAYS"

:
GENERATE ON_RESTART_CHECK
:
RESTART R2
:
PRINT "Point R2"
:
RESTART R3
:
PRINT "Point R3"

:
GENERATE ON_RESTART_NEVER
:
PRINT "Script end"

Restart with R1:

2005-01-31 12:17:05 - U0020408 Script start
2005-01-31 12:17:05 - U0020408 Point R1
2005-01-31 12:17:05 - U0020408 ON_RESTART_ALWAYS
2005-01-31 12:17:05 - U0020408 Point R2
2005-01-31 12:17:05 - U0020408 Point R3

Restart with R2:

2005-01-31 12:17:23 - U0020408 Script start
2005-01-31 12:17:23 - U0020408 ON_RESTART_ALWAYS
2005-01-31 12:17:23 - U0020408 Point R2
2005-01-31 12:17:23 - U0020408 Point R3

Restart with R3:

2005-01-31 12:17:48 - U0020408 Script start
2005-01-31 12:17:48 - U0020408 ON_RESTART_ALWAYS
2005-01-31 12:17:48 - U0020408 Point R3

 

In the following example, the text of the DATA lines is converted to uppercase letters.

:GEN UPPER_CASE
fs $AE.

See also:

Script element Description

:RESTART

This is used to set restart points in an executable object.

Script Elements - Script Structure and Processing

Restarting Executable Objects

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by function