LET
FUNCTION
This command is used to assign a value to a data name, variable, or format.
SYNTAX
LET data-name|string-value = value|data-name|string-value [, . . . ]
LET format-name = format-name | link-name | string-value [, . . . ]
LET link-name = link-name | format-name | string-value [, . . . ]- data-name
- a data name.
- variable
- a string variable name or numeric variable name.
- value
- a data name, variable, constant, or expression that results in a string or integer value.
- format-name
- the name of a format defined in Dictionary-IV.
- string-value
- a data name, variable, constant, or expression that results in a string value.
NOTES
- Data in one data name, variable, or format can be assigned to another data name, variable, or format.
- Multiple data-name or variable assignments can be made with one LET statement if the assignments are separated by commas.
- When data in one format is assigned to another format, only data with matching data-names will be moved from the sending format-name to the receiving format-name. The data within each field will be moved as string characters. If the receiving field is shorter than the sending field, truncation will occur. If the receiving field is longer than the sending field, the field will be left-justified and space-filled. In some cases, the data in numeric fields may be truncated.
EXAMPLES
LET B$(1,30) = "John Thompson"
LET 4STOPSC1.FIELD = 99
LET 4SSALDT.BASE-PRICE = 4SINVEN.BASE-PRICE
LET 4SSALDT = 4SINVENSEE ALSO
.PREC, PRECISION
From the Script-IV Language Reference, version 8.9.1. Open this page in the PDF