Local variables start with a hash sign (#). There are two types of local variables:
Local variables with value type Integer:
#CNT0 -
9
|
#FILEHOUR
|
#FILETYPE
|
#COL
|
#FILEMINUTE
|
#FILEYEAR
|
#ELAPSETIME
|
#FILEMONTH
|
#LENGTH
|
#FILEDATE
|
#FILESECOND
|
#PARMNO
|
#FILEDAY
|
#FILESIZE
|
#ROW
|
Local variables with value type String:
#ENVIRONMENT
|
#FILEMODE
|
#FILETIME
|
#FILEDRIVE
|
#FILENAME
|
#PARM0
|
#FILEEXT
|
#FILEPATH
|
#PARM1 -
9
|
#FILEINFO
|
#FILESPEC
|
#RC
|
The value of a local variable is reset when the procedure file terminates. Using the
SET command,
you can define values for local variables. Many Entire Connection commands save their
result(s) in local variables.
This document covers the following topics:
Variables with value type Integer may contain a positive number between 0 and 32767.
You can use the variables #CNT1 through
#CNT9 as counters.
This variable is set by the commands IF and WAITFOR. It then
contains a number between 1 and the maximum line length. This number indicates the
column number of the terminal emulation screen.
This variable is set by the ELAPSETIME command. It then contains the
difference between two date and time stamps.
This variable is set by the DOSDIR command. It then contains the date
on which a file was created or updated.
This variable is set by the DOSDIR command. It then contains the day of
the month on which a file was created or updated.
This variable is set by the DOSDIR command. It then contains the hour
at which a file was created or updated.
This variable is set by the DOSDIR command. It then contains the minute
at which a file was created or updated.
This variable is set by the DOSDIR command. It then contains the number
of the month in which a file was created or updated.
This variable is set by the DOSDIR command. It then contains the second
at which a file was created or updated.
This variable is set by the DOSDIR command. It then contains the size,
in bytes, of the current file.
This variable is set by the DOSDIR command. It then contains the file
attributes. Valid values are:
| 01 | read-only |
| 02 | hidden |
| 03 | read-only and hidden |
| 04 | system |
| 05 | read-only and system |
| 06 | hidden and system |
| 07 | read-only, hidden and system |
| 10 | directory |
| 20 | archive |
Using combinations of the above list, you can also define attributes 21 through 27. For example, 25 contains the following values: archive, system and read-only (20+4+1).
This variable is set by the DOSDIR command. It then contains the year
in which a file was created or updated.
You can use this variable to store the length of data for which a search is to be performed or was performed.
This variable contains the number of #PARM0 through
#PARM9 variables that were passed to a procedure file
during processing.
This variable is set by the commands IF and WAITFOR. It then
contains a number between 1 and the maximum number of rows. This number indicates the
row number of the terminal emulation screen.
Variables with value type String may contain any character or a group of characters. The maximum length is 254 characters.
This variable is used to obtain the value of an environment parameter. The variable
is blank unless the SET command is used. The syntax of the
SET command must include the name of the environment
parameter from which the value is to be obtained. Example:
SET #ENVIRONMENT PATH
This variable is set by the DOSDIR command. It then contains the drive
on which a file is located.
This variable is set by the DOSDIR command. It then contains the
extension of a file name.
This variable is set by the DOSDIR command. It then contains the
following file information: name, extension, size, attributes, and the day and time
the file was created or updated.
This variable is set by the DOSDIR command. It then contains the file
attributes:
| A | archive |
| D | directory |
| H | hidden |
| R | read-only |
| S | system |
This variable is set by the DOSDIR command. It then contains the name
of a file.
This variable is set by the DOSDIR command. It then contains the
directory or directories in which a file is located.
This variable is set by the DOSDIR command. It then contains the path
for a file.
This variable is set by the DOSDIR command. It then contains the time
at which a file was created or updated.
This variable is set by the EXECUTE command. It then contains the name
of the procedure file that is currently being executed.
You can use the variables #PARM1 through
#PARM9 to read and write data, and to pass data to a
procedure file (or to a group of nested procedure files).
The variable #RC is set by the following commands:
CD
CHDRIVE
CHMOD
DOSDIR
ERASE
MD
OPEN-I
OPEN-O
RD
READ
WRITE
The #RC variable contains a return value which indicates
whether a particular command has been executed successfully.