CONFIGURING SHARK:
The CNF file
Default system configuration variables are built into Shark. They include the contents of the function keys (F1 - F10), the date and time from DOS, various default values, file locations, and other information.
Default values can be changed by means of the Shark configuration file "SHARKNET.CNF", otherwise referred to as the "CNF" file. SHARKNET.CNF is a simple ASCII text file. Shark reads this file at startup, adjusting Shark's default settings as requested by the CNF file. The CNF file is located in the base SHARK folder.
Shark system variables are distinguished from other variables by having a colon as the first character of its name, e.g. :TIME.
To see the contents of one particular system variable, give the ? command followed by the system variable name:
? :DATE
To see all system variables, type:
LIST SYSTEM
Like memory variables, the values of most system variables, including the Function Keys, are changeable using the = (equal sign) or STORE...TO commands. Except for the Function Keys, default settings can be changed by editing the SHARKNET.CNF file. The Function Keys, on the other hand, are loaded with memvars by each Shark program.
Each of the function keys contains a pre-defined string (shown with LIST SYSTEM), normally read from the CNF file. Using the = command, you can redefine any function key (e.g., :F2="SET DEFAULT TO b;" assigns the string "SET DEFAULT TO b;" to F2). Function keys can be defined as commands or as frequently repeated entries for use in full-screen editing.
By default, Shark will pre-load the function keys if no values are set in the "SHARKNET.CNF" file. The function keys are managed by your PC's keyboard and can be controlled to a limited extent by the user. In general, you will be able to set the function keys to do something useful, but within your system's limits.
In normal use, Function Keys can be set to default values by simply omitting them from the "SHARKNET.CNF" file. In this case, Shark will fill up the"SHARKNET.CNF" file with its own suggestions like this:
:F1 C 5 HELP :F2 C 10 LIST STRU; :F3 C 6 WRITE :F4 C 10 LIST MEMO; :F5 C 7 BROWSE; :F6 C 5 STAT; :F7 C 12 ^wCONT;EDIT; :F8 C 11 LOCATE FOR :F9 C 5 FIND :F10 C 5 EDIT;
The CNF settings can also be pre-loaded with the programmer's preferred function keys, for example:
:F1="EDIT;" :F2="DIR;" :F3="BROWSE;" :F4="etc " :F5="etc " :F6=" " :F7=" " :F8=" " :F9=" " :F10=" "
There is a short-hand evident in the above descriptions. For example,";" means "execute this function key setting". Function keys can be programmed at any time simply by entering the key name (e.g. :F5) plus the new instruction, in this manner: :F5="DIR;", at the command prompt. The ";" instructs Shark to carry out this instruction when :F5 is pressed. This simple technique can also be used any time within a program for a semi-permanent solution.
FILES *.STM,C:\STMTS\ (e.g. customer statements) *.TXT,C:\TEXT\ (any undefined text output) *.BAK,C:\BAK\ (backup files created while editing Shark PRG program files) *.MSG,C:\MSG\ (message files) *.ERR,C:\ERR\ (error messages) *.LOC,C:\LOC\ (local files used within multi-user systems) *.MEM,C:\MEMO\ (memo files) *.SCR,C:\SCR\ (screen data) *.PRG,C:\PRG\ (Shark PRG program files) *.FRM,C:\FRM\ (form files) *.DTA,C:\DTA\ (data files such as starting bank balances) *.CPL,C:\CPL\ (compiled program files) *.DBF,C:\DBF\ (dbf data files) *.NDX,C:\NDX\ (index files) *.DOC,C:\DOC\ (output to be formatted by OpenOffice or Word) ENDFILES Note that while file names are limited to the "8+3" DOS file name limits, the folders are limited to 5 characters in name size. Thus you can direct files to folders with names such as "\TEXT\" or "\STMTS\". Using FILES/ENDFILES folders organizes & simplifies daily maintenance work!When running under a DOS-type system, Shark may be configured manually using settings in the FILES part of the CNF settings. Refer to the SET(environment controls) documentation.
SET EXECUTE OFF SET END OFF
In some emulators, under Windows/Linux/or Mac for example, you are able to configure the Function Keys to simplify daily operations:
:F1="QUIT;" :F2=" " :F3=" " :F4=" " :F5=" " :F6=" " :F7=" " :F8=" " :F9=" " :F10=" "
Programming the Function Keys is also dependent on your hardware and emulator, and may not always be as described. Various PCs may have from 8 to 12 Function Keys, but Shark provides for only 10 keys. See "FUNCTION" under SET(environment controls). Some experimentation will be useful!
© Specialized Clinical Services Inc, Tustin, CA 1994