Script.ges: Syntax and commands

Syntax

You set the parameters by assigning values to keywords. These keywords are divided into sections.

For example:

>Configuration<

DEFINE DAT = "<RDJ_EXEC>/dat"

#--------------------------------------

# Session configuration

SESSION = RDJ_INSTALLATION

# Date undefined : default value = current date

DATE_OPERATION = 22/03/1996

# Identifier stamping (with Auditing choice actived)

STAMPER = COMPOSTEUR1

#----------------------------------------

# Repository definition

REPOSITORY = "<DAT>/ref.dat"

Environment_Transformation = Batch

Turnoff_Group = No

Turnoff_Exit_IEvent = No

Turnoff_Exit_ISegt = No

Turnoff_Exit_Rule = No

Turnoff_Exit_OSegt = No

Rules to follow:

Rule Meaning

1

Each section name is enclosed in less than (>) and greater than (<) symbols:  >Section_Name<

2

Keywords belonging to one section cannot be associated with another section

3

You must not change the names used for keywords and sections

4

Assign values to each keyword that you use as follows:
keyword_name = "keyword_value"

5

Assign values to options as follows: option_keyword = Yes (or No)
The spaces between a keyword and its value are ignored

6

Spaces between a keyword and its value are ignored

7

You can comment out an unused keyword by placing a hash (#) sign in front of it.
The default value of the keyword is then used

For example:

>Configuration<#--------------------------------------# Configuration of stepsStep= IPO# I_Exit_Restructuring_IEvent= No

8

The keywords are not case sensitive. For example, step is the same keyword as Step or STEP

9

The values that you assign to keyword (between quotes) ARE case sensitive and are applied exactly as you enter them. For example, hello, Hello and HELLO are three different values

 

Script commands

Commands Purpose

Define

Defines variables
The variables are local to the transformation or extraction run

Include

Includes another script in the current one

Display

Displays a comment during execution

Define variables in the >Script.ges< section

You can use the variables as follows:

  • In the script, to avoid repeating a directory name that is common to more than one exchange zone
  • In the Transformation-Rules (variables with different initialization periods)

Define Variable_Name = "Variable_Value"

  • Variable_Name: Specifies the name of the variable
  • Variable_Value: Specifies the value of the variable at the start of the session

Rules to follow:

Rule Meaning

1

You can define more than one variable. Just include a line for each variable, each with a different variable name

2

The value of the variable must be enclosed in double quotes ("value")

3

A variable that you use in the script is subsequently referenced as follows: <Variable_Name>

 

Important Variables:

Variable Name Use

THIS_FILE

Defined automatically Indicates the current script

THIS_LINE

Defined automatically Indicates the current line number in the script

REF

Frequently used. Sometimes indicates a reference
If this variable is not defined in the script, the value of the REF environment variable is used on a UNIX or NT machine

Include a script file into the >Script.ges< section

Inserting a script file allows you to use values already defined in another file.

Include "File_Name" ,"Section_Name"

  • File_Name:Specifies the name of the file containing the keywords that are to be included
  • Section_Name:Optional parameter. Indicates the name of the section to be included
    If this parameter is not supplied, the system looks for the >Script< section in the file

Rules to follow:

Rule Meaning

1

The file that is to be included may itself contain an inclusion from a third file.
This inclusion is not copied into the target file if it already exists there.
An example would be a common section that is defined for all sessions

2

You can embed up to 50 inclusions

3

Only one section is analyzed each time a file is opened

 

Display a comment

This command displays a comment when it is executed.

Display "Comment_text"

Where Comment_text is the comment that is displayed when this command is executed.

Related Links