Appendix O (External Variables). DORIC 9.65, INFO-Text software
विज्ञापन
विज्ञापन
Appendix O
External Variables
INFO system external variables
The following external variables, some of which are set when INFO is installed, are used by INFO for such basic functions as picking up INFO’s system files, editing and spooling. These variables may be set by the system administrator or user as required.
INFO will resolve the following external variables:-
UNIX environment variables
_INFOSYS
_INFOARG
_INFOEDIT
_INFOEXT
_INFOSPL
_INFOSPLEX this tells INFO where the infosys directory is and is set up at installation time. The INFO-Text equivalent is
_TEXTSYS may contain any of the INFO run-time options (see
Introduction, Starting INFO, INFO invoking options). Any options on the command line will take precedence over those set in _INFOARG. If the -f option is set in
_INFOARG, then the output filename must be specified on the command line: example: setenv _INFOARG “-e –n –u abc –f” info965 >infologfile this tells INFO which external editor to use when invoking the INFO EDIT command. If it is not set, the default editor is vi.
this is used in conjunction with _INFOEDIT and specifies the extensions that are to be applied to the external editor’s command line invocation.
when set to a command, will replace the default unix command lpr which is used by INFO for spooling.
used in conjunction with _INFOSPL, it can be set to any filter commands that come after the filename.
_SORTPATH set to the scratch area for SORT when creating temporary files. If not set, the default is /tmp
VMS Logicals
INFOSYS this tells INFO where the INFOSYS directory is and is set up at installation time. The INFO-Text equivalent is
TEXTSYS.
INFO Reference Manual Appendices A-121
External Variables
Appendix O
INFO9CMD
INFO###SHR if set, tells INFO to use the INFO commands file
(INFO9.CMD) in the specified directory. If it is not set, the default is the directory specified in the logical INFOSYS. this will be created at installation time if INFO is installed as a shared image. The INFO-Text equivalent is
TEXT###SHR (### refers to the INFO revision number)
.
INFOEDIT this tells INFO which external editor to use when invoking the INFO EDIT command. If it is not set, the default editor will be the one defined by the VMS symbol EDIT.
.
INFOEXT this is used in conjunction with the extensions that are to be applied to the external editor’s command line invocation.
.
INFOEDIT and specifies
PRIMOS Global Variables
INFOSYS this tells INFO where the INFOSYS directory is and is set up at installation time. The INFO-Text equivalent is
TEXTSYS.
.
INFOEDIT this tells INFO which external editor to use when invoking the INFO EDIT command. If it is not set, the default editor is ED.
.
INFOEXT this is used in conjunction with
.
INFOEDIT and specifies the extensions that are to be applied to the external editor’s command line invocation.
User-defined external variables
External variables may be used as all or part of the
file_path in external INFO datafiles; if used, the external variable should be enclosed by the ‘%’ character. The external variable is expanded when the datafile is selected or related. One great advantage of this is that if there are several sets of data in the same format, only one INFO template is required to link into any one of them.
A-122 Appendices INFO Reference Manual
Appendix O
External Variables
e.g. If there are 12 accounting files, one for each month of the year, called jan-acc, feb-acc,mar-acc,...dec-acc, all resident in a directory called /home/accounts/data/, then the INFO datafile ACCOUNTS could be externalled as :
/home/accounts/data/%mth_acc%
where the external variable mth_acc is set, via the INFO command GVSET, to the required filename at the time of execution :
/* prompt for month
DISPLAY ‘Enter month required ( 1 - 12 ) : ‘,=
ACCEPT $NUM40
IF $NUM40 = 1
GVSET ‘mth_acc’ ‘jan-acc’
ELSE
IF $NUM40 = 2 etc
ENDIF
ELSE
GVSET ‘mth_acc’ ‘feb-acc’
SEL ACCOUNTS
It is possible to have more than one external variable in an external pathname. In the above example, if the external variable acc_data was set to the directory_path
/home/accounts/data/ then the INFO datafile template could be externalled as follows :
%acc_data%%mth_acc%
External variables may be used with several INFO commands, such as GET, SAVE, OUTPUT and EXST.
It should be noted that when coding external variables in
INFO programs, the INFO command EDIT should be used, as both the PROGRAM and CHANGE commands will expand the external variable immediately on input, with the result that the current value of the external variable will be hard-coded in the program.
INFO Reference Manual Appendices A-123
डाउनलोड
विज्ञापन