There are some global variables predefined as a result of parsing the GRG file which can be accessed from within equates. Writing new values to some of these predefined variables may also change the processing behaviour.
_eq_trace
defines whether trace output of reversed
equate expressions is produced. Assign 1
to this variable to turn on the output.
This is normally done from the eq_init
equate, although it can
be toggled on and off at will for more selective control of tracing.
_eq_version
defines whether the copyright banner
message is displayed (it may be useful to remove this when the program is being
employed as a filter in a pipe for example). The banner can be turned off by
assigning 0
to this variable. This would have to be done in the
eq_init
equate.
_eq_verbose
defines whether the informative message
about what file is being created is displayed. The message can be turned off
by assigning 0
to this variable. This would have to be done in the
eq_init
equate.
_eq_clock
contains the number of seconds since
1/1/1970 at the start of processing.
_eq_datenow
contains the current date at the start of processing
as a date type (ie. dBase3+ format, a string of CCYYMMDD).
_eq_timenow
contains the current time at the start of processing
as a 24hr colon separated string type including seconds (ie. HH:MM:SS).
_eq_banner_val
contains the value of the
banner sort field of the current banner (the value that all the records for
this banner group have in common).
_eq_banner_nest
contains the nesting level
of the the current banner which goes from 1
to the number of defined banners
and indicates which level of sort field the current banner being processed
is associated with.
_eq_totrec
contains the total number of records (pre
filtering) in the master database file.
_eq_currec
contains the index of the current record
being processed. This value has a range from 1
to _eq_totrec
.
_eq_file
contains the full name of the GRG
file being processed including the path and the extension.
The _eq_ptfile
system variable which the above replaces
is deprecated and should not be used.
_eq_base
contains the full name of the output file
excluding the extension.
The _eq_texbase
system variable which the above replaces
is deprecated and should not be used.
_eq_extn
contains the extension of the output file.
The _eq_texext
system variable which the above replaces
is deprecated and should not be used.
_eq_outfile
contains the full name of the output file
including the extension. If the special case name of "-"
is assigned to
this the output file will be set to standard output. The name of the output
file is checked before the start of processing every text body. If it has
changed the existing file is closed and the new file is opened, output is
then written to the new file.
_eq_dbfpath
contains the path component of the master
database file name. Can be rewritten in eq_init
to override the
default.
_eq_dbfname
contains the name component of the master
database file name. Can be rewritten in eq_init
to override the
default.
_eq_dbftype
contains the type component (extension)
of the master database file name. Can be rewritten in eq_init
to override the default.
_eq_block
contains the name of the current user
text body block being processed (this is not set for built in
text body blocks such as headers and footers).
There are a number of other more specialised system variables which are discussed in the sections to which they are relevant.
Go to the first, previous, next, last section, table of contents.