AMT Help Files

SETTO

Syntax

Command
Mandatory parameter
Optional parameter
Mandatory keyword
Optional keyword

SETTO (<Value>, <Item>[, <Item..N>])

Description

Initializes multiple items in local and global routine definitions.

Diagram

Returned value type

None

Parameters

Parameter Description
<Value> One of the following options:
'' To fill all alphanumeric variables with spaces and all numerics with zeros.
0 To fill all numeric and alphanumeric variables with zeros. In alphanumeric fields, all characters will be set to 0, so if the field length is 5, the value will become "00000".
<Literal> Specification of one or more alphanumeric characters that must be used to fill the item(s) specified as <Item>. Multiple characters can only be specified if the type for every <Item> is alpha. If in the third example below, "target" is alpha 4, then its value will become "AAAA". If "target" would be numeric 4, it would be set to "0000" (because it cannot hold the specified value). If "target" would be a string, its value would be "A" (because string items don't have a fixed length).
HIGH To fill all alphanumeric variables with the highest value possible and all numeric variables to nines.
INITIAL To reset the value of the variable to the value that was initially defined for the item (or sub items). This option can only be used if the value for <item> indicates a variable or the complete form using the FORM keyword.

LOW

To set all alphanumeric data items to the lowest value possible and all numeric values to zeros.

<Item> Name of a field that has to be initialized. Only the following field types are allowed:
  • variables
  • layout controls
  • file items
  • print buffers
  • table query fields
  • application links
A print buffer can only be specified to empty the entire print buffer. So, when initializing a print buffer, the specified <Value> must be ''
FORM 
The form will be initialized to it's initial values.

Can only be used in combination with the INITIAL value keyword.

Examples


setto (''target)

setto (HIGHtarget1target2target3)

setto (INITIALtarget)

setto (INITIALFORM)

setto ('**demo**'sa-20)
// sa-20 (alpha 20) will be set to
// the value "**demo****demo****de"

 

Return to

Commands