This document contains PROPRIETARY and CONFIDENTIAL information. Such information may not be disclosed for any purpose without written permission from:
Touch Technologies, Inc. (TTI) has prepared this publication for use by TTI personnel, licensees, and customers. This information is protected by copyright. No part of this document may be photocopied, reproduced or translated to another language without prior written consent of Touch Technologies Incorporated.
TTI believes the information described in this publication is accurate and reliable; much care has been taken in its preparation. However, no responsibility, financial or otherwise, is accepted for any consequences arising out of the use of this material.
The information contained herein is subject to change without notice and should not be construed as a commitment by Touch Technologies, Inc.
The following are trademarks of Touch Technologies, Inc., and may be used only to describe products of Touch Technologies, Inc.:
DYNAMIC TAPE ACCELERATOR INTOUCH REMOTE TAPE FACILITY DYNAMIC LOAD BALANCER PLUS CleanDisk REMOTE DEVICE FACILITY
The following are trademarks of Digital Equipment Corporation, and may be used only to describe products of Digital Equipment Corporation:
DBMS DCL DECNET RDB RMS VAX VMS
Last Revision date: 01-Jun-1995
INTOUCH 4GL is a next generation database language for VAX and Alpha AXP computers. It includes a fourth-generation database language and an advanced development environment.
The INTOUCH language:
INTOUCH includes a transparent interface to the RMS file management system as well as other database engines. The interface includes:
The INTOUCH environment is designed for developing complex applications rapidly. The interactive environment:
Development cycle time is the time it takes to edit, compile, link, run and debug code. INTOUCH reduces this time by providing an interactive and fast response environment. INTOUCH offers features that cut cycle time significantly--up to 80%.
You will find INTOUCH an exciting and powerful programming tool.
This manual is one of two reference manuals describing the INTOUCH system. Both manuals are designed to provide the information you need in a manner that is concise and easy to use. The manuals are:
A Guide to the Language describes the INTOUCH system and how to develop programs with it. The Guide explains the development cycle and INTOUCH's features for speeding up this cycle. It describes the INTOUCH environment, program elements and the INTOUCH language and debugging system.
INTOUCH's Specifications contain a brief description of the INTOUCH system, statements, commands, etc., and some background on how the system operates.
The purpose of this Guide is to present the information you will need to develop programs with INTOUCH. The intent is to provide you, the user, with simple and concise explanations of the INTOUCH system, features, and language. This manual is designed to provide a basic and thorough explanation of each element. This manual can also be used as a reference guide by advanced users.
This Guide is written for both experienced programmers and those self-learners who have had some exposure to computers and programming languages. If you have little programming experience, or are using this manual to teach yourself, please start with chapter one.
In some places in this manual, the format of statements and commands is represented abstractly. For example:
Format: [LET] var = expr
Certain conventions are used to represent values which you (the user) must supply. These conventions are always shown in lower-case. These are the user conventions:
array | Array element. |
block of code | An INTOUCH statement or a series of INTOUCH statements. |
chnl | An I/O channel associated with a file. |
chnl_num | An I/O channel associated with a file. |
cond_expr | Conditional expression. |
col | Column. Used in the TAB or AT option to indicate the column to print at. |
const | Constant value. |
expr | Expression. May be a variable, constant, array element, structure reference, etc. or any combination of the previous separated by operators. |
field_expr | Field name expression. |
filename | File name. (Described briefly below and in the Command Language and DCL User's Guide of the OpenVMS documentation set). |
file_spec | File specification. (See the Command Language and DCL User's Guide of the OpenVMS documentation set). |
func | Function. |
handl | Exception handler. Pertaining to an exception handling routine. |
handler | The block of code in an exception handler which is executed when an exception is generated. |
int | Integer value. |
int_expr | Integer expression. |
int_var | Integer variable. |
label | Alphanumeric statement label. |
libr | Pertaining to libraries. |
line_num | Program line number. |
name | Name. Indicates the declaration of a name or the name of a program unit, such as a subprogram. |
num | Numeric value. Num indicates that either a real or integer numeric value may be used. |
num_expr | Numeric expression. Num_expr indicates that either a real or integer numeric value may be used. |
num_var | Numeric variable. |
param | An expression which is passed to a function, subprogram or other program unit. A parameter can be any valid INTOUCH expression. |
protected block | The block of code protected by an exception handling routine. |
real | Real number. Indicates that only a real number may be used. |
row | Row. Used in the AT option to specify the row to print at. |
str | String. Str indicates that only a string value may be used. |
str_expr | String expression. |
struc | An INTOUCH structure. |
struc_name | Structure name. |
struc_expr | Structure expression. |
sub | An INTOUCH subprogram. |
target | The target point of a branch statement. The target can be either a program line number, an alphanumeric label, or a ROUTINE statement. |
uncond_expr | Unconditional expression. Uncond_expr indicates that only an unconditional expression can be used. |
var | Variable. May be a simple variable, array element or a structure reference. |
In the program examples, keywords in INTOUCH statements and commands are in upper-case letters and information you (the user) supply is in lower-case. For example:
10 OPEN STRUCTURE cl: NAME 'tti_run:client' ASK STRUCTURE cl, FIELD id: CHANGEABLE z ASK STRUCTURE cl, FIELD city: CHANGEABLE z1 PRINT z PRINT z1 CLOSE STRUCTURE cl 20 END
The double quote (") can be used in place of the single quote (') as long as they are paired and not specified.
Other conventions used in this manual are:
[ ] | Optional portions of a statement are enclosed in brackets. |
INPUT [PROMPT str_expr] : var
{ | } | Braces combined with a vertical bar indicate that one of the elements in the braces must be chosen. The elements are separated by the vertical bar. |
EXIT {FOR | DO}
[ | ] | Brackets combined with a vertical bar indicates that one of the options in the brackets can be used. The elements are separated by the vertical bar. Only one of the elements can be used. |
DO [WHILE expr | UNTIL expr]
... | An ellipsis indicates that the language element can be repeated. An ellipsis following an option enclosed in braces indicates that you can repeat the format of the whole option. |
INPUT [PROMPT str_expr] : var, var...
dashes | Three sets of dashes indicate a block of code. |
DO --- --- block of code --- LOOP
. . . |
A vertical ellipsis indicates the continuation of a body of program code which is not a defined block of code. |
It is easy to start INTOUCH, simply type the word INTOUCH in upper or lower-case letters, at the system prompt (usually the $). This will put you into the INTOUCH environment and the INTOUCH screen frame will be displayed.
Example 1-1 The INTOUCH Screen Frame
INTOUCH 4.2 Program: NONAME The Next Generation Language Status : INTOUCH INTOUCH Copyright (c) 1984-1995 Touch Technologies, Inc. EXIT = Exit \ = Back HELP = Help
The frame consists of the two highlighted bars across the top of the screen and the three highlighted bars across the bottom. Inside the frame, is the highlighted INTOUCH prompt INTOUCH.
When you are in the INTOUCH environment you can create, edit and run INTOUCH programs, access files, and use VMS system utilities. You can also change the INTOUCH environment by using the INTOUCH commands and debugging system.
1.2 Accessing the VMS System Utilities
You can access the VMS system utilities from within the INTOUCH environment.
To run a VMS system utility program, enter $ utility_name at the INTOUCH prompt. INTOUCH will run the utility and return you to the the INTOUCH environment--the INTOUCH prompt. Here is an example:
Example 1-2 Running a VMS System Utility Program
INTOUCH 4.2 Program: NONAME The Next Generation Language Status : INTOUCH $ show user VAX/VMS User Processes at 30-APR-1995 11:42:20.29 Total number of users = 5, number of processes = 16 Username Node Interactive Subprocess Batch BATCH_CTL TTI - 1 1 HTTP_SERVER JR - 1 1 TESTER FAST 5 1 TESTER TTI 1 MRF_HANDLER FAST - - 1 UUCP_DAEMON TTI - 1 3 INTOUCH EXIT = Exit \ = Back HELP = Help
To get into the VMS system environment and still remain in INTOUCH, you can enter $$ at the INTOUCH prompt. You will be placed at the DCL prompt and the screen will appear as:
Passed to VMS... Press RETURN when done. USER:[TESTER] $$
You can run any of the VMS utilities at this point. The $$ reminds you that you are still in INTOUCH. When you want to return to the INTOUCH environment, simply press the Return key and the INTOUCH frame (if it is on) and the INTOUCH prompt will be displayed.
1.3 Recalling Previous Commands
The INTOUCH environment handles command recall. That is, you can access previous commands entered at the INTOUCH prompt. You can recall the last 50 previously entered commands or statements by using the UP and DOWN arrow keys. (You can also use Ctrl/B or the Prev key for UP and Ctrl/V or the Next key for DOWN.)
You can also recall a previous command or statement by entering part of the command and pressing the Find or PF2 key.
1.4 Getting Help when in INTOUCH
You can get help when at the INTOUCH prompt by entering HELP and pressing the Return key. The screen will clear and you will enter INTOUCH's HELP Facility.
Example 1-3 The INTOUCH HELP Facility
INTOUCH is The Next Generation Language for VAX computers. This help file contains information on INTOUCH. o For detailed and basic level help, use Language o To exit help, press the RETURN key repeatedly o To redisplay a list of available topics, type a ? o For information about the advantages of INTOUCH and the INTOUCH manuals, type Features at the topic prompt below Additional information available: Features HELP Language Tables Topic?
If you want information about one of the listed topics--Features, HELP, Language, Tables--enter the topic at the "Topic?" prompt and press Return. Some topics have subtopics. You can select a subtopic by entering the subtopic at the "TOPIC Subtopic?" prompt.
When you want to exit out of the HELP Facility, press the Return key continuously until you are back at the INTOUCH prompt.
INTOUCH has an extensive library of HELP text on many topics. When in the HELP Facility, you can type a question mark (?) at any HELP topic prompt and get a list of the available topics and sub-topics.
1.5 Using INTOUCH--Some Examples
Once you enter the INTOUCH environment, all of the INTOUCH features are available to you. For example, PRINT can be executed from the INTOUCH environment and it can also be a statement in an INTOUCH program. Enter print 'hello' in upper or lower-case at the INTOUCH prompt and you will see:
INTOUCH print 'hello' hello INTOUCH
and if you enter print date$, you will see:
INTOUCH print date$ 19950430 INTOUCH
Spaces and Quotes
INTOUCH is space sensitive. As you try out the examples in this manual, be sure to type spaces where they are shown.Either pairs of single quotes ('xxx') or pairs of double quotes ("xxx") can be used both in INTOUCH immediate mode (e.g. SAVE 'x.int' or SAVE "x.int") and within an INTOUCH program for string values (e.g. print 'hello' or print "hello").
1.5.1 Writing an INTOUCH program
Here is a sample program for you to try. Enter each line exactly as shown. At the end of each line, press the RETURN key. Example 1-4 Writing a Sample Program
10 input 'Please enter your name': name$ 20 print 'Hello, '; name$ 30 end
If you make an error such as misspelling the word print: Example 1-5 INTOUCH Program Error Message
10 input 'Please enter your name' : name$ 20 printt 'Hello, '; name$ 20 printt 'Hello, '; name$ ..1 Unrecognized statement Unrecognized statement EXIT = Exit \ = Back HELP = Help
Now that you have typed in the sample program, you are ready to run it.
1.5.2 Running an INTOUCH program
To run or execute the sample INTOUCH program, you can enter RUN or RNH. RUN will print a program header and RNH will not.
When you run the program, you will be asked to enter your name. Enter your name and press Return. Example 1-6 Running an INTOUCH Program
10 input 'Please enter your name': name$ 20 print 'Hello, '; name$ 30 end run NONAME 30-APR-1995 14:51 Please enter your name? Sally Hello, Sally INTOUCH rnh Please enter your name? Sam Hello, Sam INTOUCH
1.5.3 Interrupting and Changing an INTOUCH program
You can interrupt an INTOUCH program while it is running, make immediate changes and continue execution. This can be done because INTOUCH compiles each statement as it is entered. And, as you have seen previously, it returns any compile-time errors immediately.
The following shows how to run the sample program, iterrupt it, make a change and continue execution.
To interrupt an INTOUCH program, enter Ctrl/C while the program is running.
To interrupt the sample program, RUN the program and at the "Please enter your name?" prompt, enter Ctrl/C. INTOUCH will interrupt program execution and tell you where it stopped. Example 1-7 Interrupting an INTOUCH Program
INTOUCH 4.2 Program: NONAME The Next Generation Language Status : BREAK at 10 INTOUCH run NONAME 30-APR-1995 15:33 Cancel nter your name? BREAK at 10 INTOUCH
BREAK at 10 tells you that the program was stopped when it was executing line 10.
You are now at the INTOUCH prompt and can make changes.
Before making changes, you can list the current program lines by entering the word LIST. For example: Example 1-8 Listing Program Lines
INTOUCH list NONAME 30-APR-1995 16:11 10 input 'Please enter your name': name$ 20 print 'Hello, '; name$ 30 end INTOUCH
You can change the sample program by entering the following two lines:
10 name$ = 'Sunny' 25 print day$
You have changed the sample program and are now ready to resume execution. You want the program to start running at line 10. To continue program execution, enter GOTO 10 and press Return.
Example 1-9 Resuming INTOUCH Program Execution
INTOUCH 10 name$ = 'Sunny' 25 print day$ goto 10 Hello, Sunny Sunday INTOUCH
INTOUCH started program execution at line 10 and ran all the program lines including line 25, the line you added.
As you can see, INTOUCH makes it easy to add and change program code.
1.6 Using EXIT and Back
When you want to get out of the INTOUCH environment, enter EXIT and you will be returned to the system prompt (the $ prompt).
When you EXIT out of INTOUCH, you lose the environment you have set up. Any unsaved changes you have made to the environment are lost. When you re-enter INTOUCH, you will begin again with the default INTOUCH environment.
When you are in INTOUCH and at the INTOUCH prompt or in an INTOUCH program, utility or routine, you will see a summary message line at the bottom of the screen frame.
INTOUCH EXIT = Exit \ = Back HELP = Help
The summary message reminds you that, while you are in INTOUCH:
You also have access to these three commands from within your own INTOUCH programs. Here is an example of how they are used in a program:
10 DO INPUT 'Please enter your name': name$ IF _HELP THEN MESSAGE 'Type in your name' IF _HELP or _BACK THEN REPEAT DO IF _EXIT THEN EXIT DO PRINT 'Hello '; name$ END DO 20 END RNH Please enter your name? help Please enter your name? \ Please enter your name? exit Type in your name
When in an INTOUCH program or routine, you can also press the Help key to get help and press Ctrl/Z to exit.
Summary
You can enter EXIT or press CTRL/Z from within a program to do one of the following: