5 6 1 aXes Terminal Operations Scripts Definition

LANSA Composer

5.6.1 aXes Terminal Operations Scripts Definition

You must provide an aXes terminal server operations script to the TS_EXECUTE activity in the form of a comma-separated (CSV) file. To do this, you may use common tools such as a text editor or a spreadsheet program.

Following is an example of an aXes terminal operations script designed to enter the details of a received sales order. For the benefit of illustration, it is displayed in a spreadsheet program.

 

A single aXes terminal server operations script file may contain one or more script routines.

Each (non-comment) row of the comma-separated script file should contain a minimum of ten fields/columns and may contain up to thirteen. The purpose and meaning of each field/column that makes up an aXes terminal operations script is described below.

Note: Script lines beginning with a semi-colon (;) or asterisk (*) are treated by LANSA Composer as comments and are not processed.

1. Routine name
(axRN)

Specifies the name of a routine to which this aXes terminal operations script line belongs. Lines for a routine must be specified contiguously in the script. The routine name is optional - if you leave it blank, then the line implicitly belongs to a script routine with blank routine name.

2. Label name
(axLB)

This column may specify a unique (within a routine) label associated with the line. This label may be referenced as the next action on success or failure of other lines in the same routine/script.

3. Operation
(axOP)

Specifies the aXes terminal operation performed by this script line. It may be one of the following:

GET (gets a field value)

SET (sets a field value)

SEND (sends data to the aXes terminal server)

Lines containing any other value in the Operation column are ignored.

4. Field name
(axSF)

(GET/SET)  This column may specify the name of the screen field whose value is to be set or retrieved. The name may be a user-defined name (if an aXes project name was specified on the TS_CONNECT activity) or an aXes field identifier. If the field name is not specified for a GET or SET operation, then the field row and column must be specified.

NOTE:  LANSA Composer supports the specification of a Processing Sequence variable name in this column. Refer to 5.6.2 aXes Terminal Operations Script Variables for more information.

5. Field index
(axSX)

(GET/SET)  If the field named in the previous column is contained in a subfile, this column may specify the index of the instance on the current screen of the field whose value is to be set or retrieved. The first instance on the current screen has an index of 1, irrespective of the scroll position of the subfile. If your program needs to process fields in subfiles, it must do so a screen at a time and send ROLL_UP/ROLL_DOWN using the TS_SEND activity (just like a 5250 terminal user would have to do).

NOTE:  LANSA Composer supports the specification of a Processing Sequence variable name in this column. Refer to 5.6.2 aXes Terminal Operations Script Variables for more information.

6. Field row
(axSR)

(GET/SET)  This column may specify the screen row number of the field whose value is to be set or retrieved. The row and column together, if used, must refer to the first position of the required field. The value of this column is ignored if the field name is specified. Conversely, if the field name is not specified, then the field row and column must be specified.

7. Field column
(axSC)

(GET/SET)  This column may specify the screen column number of the field whose value is to be set or retrieved. The row and column together, if used, must refer to the first position of the required field. The value of this column is ignored if the field name is specified. Conversely, if the field name is not specified, then the field row and column must be specified.

8. Field value
(literal)
(axVC)

(SET)  This column may specify the literal value to be set in the specified field.

9. Field value
(field name)
(axVX)

(GET/SET)  This column may specify the name of a Processing Sequence variable that will receive (GET) or provide (SET) the value for the specified screen field.

For a GET operation, the Processing Sequence variable name is required.

For a SET operation, you must specify either the Processing Sequence variable name in this column or the literal field value in the previous column.

10. Function key
(axKY)

(SET/SEND)  If a value is specified in this column, the operation will send the current aXes screen data to the aXes terminal server using the function key specified here after setting the field value for a SET operation successfully. You may use any of the function key values shown for the TS_SETBYNAME, TS_SETBYPOS and TS_SEND activities. For a SET operation, if no value is specified, no send operation is performed. For a SEND operation, if no value is specified, ENTER is assumed.

11. Action on success
(axOK)

This column may be used to control the next script routine operation performed when this operation completes successfully. It may be one of the following:

*NEXT (the script proceeds to the next line in the same routine)

*ERROR (the script execution ends with an error status)

Any other non-blank value is interpreted as the Label name of another script line in the same script routine, and the script continues with the first line in the script routine that matches the specified label.

If no value is specified, *NEXT is assumed.

12. Action on error
(axER)

This column may be used to control the next script routine operation performed when this operation ends in error (*). It may be one of the following:

*NEXT (the script proceeds to the next line in the same routine)

*ERROR (the script execution ends with an error status)

Any other non-blank value is interpreted as the Label name of another script line in the same script routine, and the script continues with the first line in the script routine that matches the specified label.

If no value is specified, *ERROR is assumed.

(*) An operation ends in error when, for example, a screen field is not found at the specified row or column or with the specified field name, or when a field is not input capable for a SET operation or for other cases where the requested aXes terminal server operation cannot be performed. However, such errors do not include 5250 application errors. For example, a validation error on an entered value detected by the 5250 application program is not an error for this purpose.

13. Comment
(axComment)

You may use this column to enter any comment text pertaining to the script, for documentary purposes. This column is reserved by the LANSA Composer aXes terminal server activities for this purpose.