Doric 9.65 INFO software, INFO-Text software Reference Manual
विज्ञापन
विज्ञापन
Reference Manual
Revision 3
April 2000
Doric
Computer
Systems
Head Office:
7 The Old Maltings
135 Ditton Walk Tel: +44 (0)1223 516521
Cambridge Fax: +44 (0)1223 516522
CB5 8PY E-mail: [email protected]
United Kingdom Web site: http://www.doric.com
USA Office:
16816 35th Ave. N.E. Tel: 206 367 7974
Seattle Fax: 206 368 2702
WA 98155 E-mail: [email protected]
Hot Line Support: 1 800 223 2942
INFO & INFO-Text Relational Databases
Copyright © 1997 by Doric Computer Systems Ltd.
Printed in the United Kingdom 2nd Revision July 1998 3rd Revision April 2000
All Rights Reserved. No part of this work may be reproduced or transmitted in any form or by any means , electronic or manual, including photocopying and recording, or by any information storage or retrieval system, except as may be expressly permitted by the 1976
Copyright Act or in writing by the publisher
.
The information contained in this document is the exclusive property of Doric Computer Systems Ltd. except as otherwise indicated, and shall not be disclosed or reproduced in whole or in part, without prior written consent from Doric Computer Systems Ltd.
Because we are continually upgrading our products, the information contained in this document is subject to change without notice.
Whilst every effort has been taken to ensure that the information contained in this document is correct at the time of printing Doric
Computer Systems Ltd. cannot be held liable for any errors or omissions.
This manual was designed to bring together into one reference manual the additions, changes upgrades and utilities for both INFO and INFO-
Text on all platforms to cover the versions of INFO created by Doric
Computer Systems Ltd. and released generally as “revision 9.6” during the period 1992 to 1996. The latest version of INFO at any one time may vary slightly on different platforms. It is our policy to release new versions as soon as possible rather than hold back versions while all platforms are upgraded.
Please note some options are NOT available on every platform or may work in a different manner. Where possible major differences have been highlighted in this manual.
Contents page
Introduction
Starting INFO
Syntax Conventions
Building Expressions
INFO commands and brief description
. (dot command)
ACCEPT
ADD
ADDRECS
ADIR
ALTER
ARET
ASELECT
ATOE
BOTM
BOX
BROFF
BRON
CALCULATE
CATALOG
CCASE
CCCT
CCHR
CHANGE
CHECK
CLAC
CLEAR
CNAME
COMINPUT
COMOUTPUT
Perform operating system command
Accept a value
Add records
Add records to a selected or related file
Alternate directory setting
Alter item characteristics
Automatic return setting
Additionally select
ASCII to EBCDIC
Position to last record in set
Paint a box on the screen
Disable the break keys
Enable the break keys
Calculate and assign a value
*List files in operating system directory :
Prime INFO-Text only
Change case to upper or lower
*Change Concordance Character Table : INFO-Text only
Control character setting
Change a Program, IPF, Report or Special Form
Check whether the spool file is in use
Classify a character item by its contents
Clear all internal variables
Change a file name at operating system level
Command input
Command output xi xvii xix
49
51
55
41
43
45
47
19
21
37
39
11
17
1
7
85
87
89
91
57
59
61
65
93
97
INFO Reference Manual Contents i
ii
Contents
DICTIONARY
DIF
DINT
DIRECTORY
DISPLAY
DO DOEND
DOCDF
DOCIF
DOCRP
DOCSF
DONE
DPG
DRP
DSEL
DSF
EDIT
ELAPSED
COMPILE
CONCATENATE
CONCORD
CONTEXT
COPY
CPL
CREATE
CURSOR
CWID
DAY
DECODE
DEFINE
DELETE
DELIMITER
DEXT
DFMT
DICE
Compile a Program
Concatenate and assign a value
*Build a concordance table of text words : INFO-Text only
*Display text surrounding “search” word : INFO-Text only
Copy a Report, Program, or Form
*Invoke Prime “CPL” command : Prime only
Create a sub-directory
Position the terminal cursor
Change item width
Get the day of the week for a given date
Unset compiled marker
Create a Datafile
Delete a file at operating system level
Delimiter character setting
Display all external file names
Date format setting
Doric Input Command Editor
*Display entries in dictionary file : INFO-Text only
Dump Input Form to command file
Display format and contents of internal variable
Display directory entries
Display record content
Do repetitive processing
Document a Datafile
Document an INFO Input Form
Document an INFO Report
Document an INFO Special Form
End even-numbered Program section
Dump Program to command file
Dump Report to command file
Deselect current record from working set
Dump Special Form to command file
Edit Program, IPF, SF or Report using chosen external editor
Return elapsed CPU time into a variable
Contents
199
201
203
205
207
191
193
195
197
177
185
187
189
165
169
171
173
151
153
155
157
161
125
129
131
133
117
119
121
123
99
105
109
113
INFO Reference Manual
GOTO
GTIM
GVGET
GVSET
HALF
HELP
IF ENDIF
IMPORT
INKEY
INPUT FORM
INTERNAL
ITEMS
JUSTIFY
LABEL
LCHAR
LIMIT
LIST
ENCODE
END
ERASE
EXECUTE
EXPAND
EXPORT
EXST
EXTERNAL
FILES
FILL
FIRST
FORMAT
FORMS CONTROL
FULL
GET
GETLOG
GNAME
INFO Reference Manual
Contents
Convert character data to numeric or date format
End an INFO Program
Delete an INFO File
Execute a stored command
Translate a numeric value into words
Export data to a non INFO package
Test if a named file exists at operating system level
Associate an INFO file or object with data held elsewhere
Display current files and relationships
Relate option switch
Position to first matching related record
Format a system variable
Customize output forms in a program
Switch terminal to full duplex
Access data from an operating system file
Get login name and system user number
Get the operating system name of an INFO file
Branch to an INFO command at label
Get the machine time
Get contents of a logical, environment or global variable
Set an environment, logical or global variable
Switch terminal to half duplex
Display a help file
Process conditionally
Import data from a non INFO package
Check TTY buffer and optionally clear it
Format a screen
Display item characteristics
Display Datafile structure
Justify left, right or center
Identify a location in a Program or IPF
Leading character setting
Establish search criteria on selected Isam file
List contents of records
321
323
325
327
331
285
287
315
317
2361
263
265
267
269
271
273
277
245
251
253
257
259
233
235
237
241
217
219
225
227
209
211
213
215
Contents iii
Contents
LOG
MERGE
MIDAS
MODE
MODE SET COND
MODIFY
MOVE
MRED
NAME
NEWMAP
NEXT
NMVE
NSELECT
OPCLOSE
OUTPUT
PASSWORD
PHANTOM
POS
POSTINGS
PREVIOUS
PRIF
PRIM
PROGRAM
PROTECT
PURGE
QUIT
RECASE
REDEFINE
REFORMAT
RELATE
Log user activity
Merge selected records to another or same file
Create ISAM file : Prime only
Show or set status settings
Action to take on “interupt”
Change a Datafile structure
Take the content of a character item and move to target area
Realign redefined items
User naming of internal variable
Deselect selected and related files and delete bitmaps and sets
Position to next record in related Datafile
Move numeric item to a character field
Select non-selected records and deselect selected records
*Close the current open INFO spool file : INFO-Text only
Close the current open INFO spool file and open another
Password setting
*Initiate a phantom : Prime only
Position to absolute record number on selected file
*Assign or display postings settings : INFO-Text only
Read previous related file record
Print image of a Input Form
*Put the user into ‘pseudo’ PRIMOS command mode :
Prime only
Send item to spool file
Create an INFO Program or start a program section
Limit access to a Datafile
Delete record
End a user session
Change capitalization
Redefine an item definition
Reset internal variables back to default format
Join Datafiles iv Contents
381
383
385
387
389
391
393
365
373
375
377
379
409
411
413
417
419
395
401
405
407
339
341
345
347
351
353
357
359
361
363
INFO Reference Manual
SORT
SOUNDEX
SPAWN
SPECIAL FORM
SPOOL
SRCH
STAT UN
STOP
STOPWORD
STRIP
SUFFIX
SYNFILE
SYNONYM
SYSTEM
TAKE
TERMINAL
TIME
SAVE
SCI
SCPY
SELECT
SET
SETUP
SHIFT
SKIP
SLEEP
REMARK
RENAME
REPLACE
REPORT
RESELECT
RGET
RUN
RWLK
INFO Reference Manual
Contents
Mark as a comment line in Program or IPF
Change name of an INFO file
Replace part of data
Create or execute a Report
Reduce the set of selected records
Perform a GET on a related file
Execute an INFO Program
*Set read-write locks on a PRIMOS file : Prime only
Save selected records to a file
Convert numeric data to scientific notation
Copy a sub-string
Select a Datafile
Access Selected Datafiles
Select and relate files needed for a report or form
Shift an INFO item by a specified number of bits
Reposition on the working set
Pause in processing
Sort the selected records
Soundex code a character item
Issue an operating system command from within INFO
Create or execute a Special Form
Send to printer contents of spool file
Search a character string for a sub-string
Display INFO logical file units
End an INFO session
*Set as a non concordance word : INFO-Text only
Remove value from data
Return one by one operating system files using wildcards
*Create a synonym file : INFO-Text only
*Display/print synonym file : INFO-Text only
Perform operating system command
Copy INFO Files and data from another user
Terminal characteristics setting
Display time-of-day
523
525
531
533
537
513
515
517
519
497
507
509
51
487
489
491
493
477
479
481
483
485
467
469
471
473
451
459
461
465
429
431
433
435
Contents v
Contents
TOP
TXCLOSE
TXGET
TXLINES
TYPE
UBOX
UPDATE
UPF
USER
WHO
XDIC
XGET
XRELATE
XRES
XRGET
XSELECT
Position to first record in working set
*Close a text item file. (For use with TXGET) :
INFO-Text only
*Retrieve text : INFO-Text only
*Determine number of text lines : INFO-Text only
Display a non-Datafile
Remove a previously drawn box from the screen
Update item values
Update using an Input Form
Return PRIMOS user number into an internal variable
Display process id, login name & location
*Execute a Dictionary command : INFO-Text only
Execute a GET using parameters
Execute a RELATE using parameters
Execute a RESELECT using parameters
Execute an RGET using parameters
Execute a RESELECT using parameters
* indicates supplementary or platform specific command e.g. INFO-Text or Prime only
539
541
565
567
569
571
573
575
551
559
561
563
543
545
547
549 vi Contents INFO Reference Manual
Appendices
Appendix A
Appendix B
Appendix C
Appendix D
Appendix E
Appendix F
Appendix G
Appendix H
Appendix I
Appendix J
Appendix K
Appendix L
Appendix M
Appendix N
Appendix O
Appendix P
Appendix Q
Appendix R
Appendix S
Appendix T
Appendix U
Appendix V
INFO Item Types
Command execution modes
System Variables
System Items
Screen Attribute Settings
INFO Internal Files
Controlling Default Assignments
INFO Commands By Function
INFO Reserved Words
ISAM Considerations
Record Matching
Functions
Using The Help Facility
Application Mode
External Variables
IMPORT/EXPORT File Formats
Configuration Files
Dossier Utility
Data Entry
Dates
Printing
Terminal Drivers
Contents page
A-3
A-79
A-81
A-91
A-97
A-109
A-113
A-121
A-125
A-5
A-11
A-15
A-49
A-67
A-73
A-75
A-135
A-137
A-157
A-161
A-163
A-165
Glossary
INFO Reference Manual Contents vii
Introduction
This manual serves as a reference tool for users of INFO, a rapid application development (RAD) language, and INFO-Text, a document and text retrieval extension to INFO.
Information presented in this manual assumes a general knowledge of INFO.
Due to the diverse operating systems INFO and INFO-Text run on, some commands or references are specific to certain environments. These differences are described separately in this manual. In most of the examples in this manual, pathnames and filenames are specified in a Unix format; VMS and
PC users should note that in most cases, the last 3 characters of filenames would be the file extension. Throughout this manual VMS is synonymous with
Open VMS.
This manual is divided into five major sections: contents; introduction; command descriptions, including syntax and sample usage; appendices, which include such information as a description of INFO item types and a list of INFO system items; and a glossary containing terms used frequently throughout the manual.
In the examples throughout the manual, the bold portions represent what you would type.
INFO Reference Manual Introduction ix
Starting INFO
O v e r v i e w
E v e r y t t i i m e y o u s t t a r r t t a n d s t t o p a n I I N F O s e s s i i o n , , y o u : : n
Start INFO.
n
Identify a new or existing user area.
n
Close the user area.
n
Stop INFO.
In between identifying and closing a user area, you use the rest of INFO’s commands to do the work you want to do.
Before you begin, keep in mind the following:
For INFO to recognize your response to a prompt, you type your response and then press the <RETURN> key.
note
Starting INFO
If you make a mistake before pressing the <RETURN> key, simply back up and retype the character or characters.
As part of the installation procedure on your computer, you are prompted to supply a command name for invoking
INFO; often, a name such as INFO965 may be chosen to indicate which version of INFO is being run. For the purpose of this manual, the command INFO is the designated term to invoke INFO.
After you see the operating system prompt, you start INFO by typing the word INFO and pressing the <RETURN> key.
INFO responds by displaying its banner screen.
INFO
1
INFO Exchange Call Utilities
FRI, MAY 08 1998
2
INFO 9.65g 01-MAY-98 52.74.63* Customer name
3
Copyright (C) 1997 Doric Computer Systems International Ltd.
All Rights Reserved
ENTER USER NAME>
4
1
Starts INFO. The command and the banner screen might vary, depending on the installation.
2
Displays the current date.
3
Displays the INFO software revision number and product release date.
4
Prompts for a user name to identify user area.
INFO Reference Manual Introduction xi
Starting INFO
Identifying a User Area
As soon as you start INFO, INFO prompts you for a user name. A user name identifies a user area for you to work in. When you type an INFO user name, this tells INFO that you want to work with information that is or soon will be stored in the user area of that name. You can identify a new user area or one that already exists. Each INFO user name is associated with only one INFO user area.
Although you work in only one user area at a time, you can have many user areas, each identified by a different user name. You might want to keep entirely different types of information in different areas.
New User Name
To enter a new user name, type an asterisk (*) before the name, to tell INFO to set up a new user area. For example
ENTER USER NAME>*LANDMARK
ENTER COMMAND >
Existing User Name
When you enter an existing user name, INFO prepares the user area associated with that name. For example
ENTER USER NAME>LANDMARK
ENTER COMMAND >
Abbreviated User Name
INFO recognizes user names on the basis of three characters in your user name: all three characters of a three-character name; or the first, second, and fourth characters of a longer user name. You can used these unique characters as an abbreviated user name.
An example of entering an abbreviated form for the user name LANDMARK follows:
ENTER USER NAME>LAD
ENTER COMMAND > xii Introduction INFO Reference Manual
User Name
Closing a
User Area
Starting INFO
Rules and Features
A user name can be 3 to 8 characters long.
INFO recognizes each user name on the basis of three characters: 1,2,3 or 1,2,4. They must be different from all your other INFO user names. These three characters form an abbreviated user name.
Establish a new user name by typing an asterisk (*) before the name.
Enter an existing user name without an asterisk.
N.B. INFO user names may be set up as external variables: see Appendix N, Application Mode.
To close a user area, use the QUIT command. You can then either identify another user area or stop INFO. An example of closing one user area and identifying another follows:
ENTER COMMAND >QUIT
1
ENTER USER NAME>*CITYSITE
2
ENTER COMMAND >QUIT
3
ENTER USER NAME>
4
1
Closes the current user area.
2
Identifies another user area, in this case, a new one.
3
Closes the second user area.
N.B. Steps 1 and 2 may be combined on the same command line, eg.
ENTER COMMAND >QUIT *CITYSITE
Stopping INFO After you close a user area, you can stop an INFO session by entering the STOP command at the ENTER USER
NAME> prompt.
ENTER USER NAME>STOP
You are now back at the operating system level of your computer.
INFO Reference Manual Introduction xiii
Starting INFO
Shortcut
To close the user area and stop INFO in one step, enter the QUIT & STOP command at the ENTER COMMAND > prompt. The ENTER USER NAME > prompt does not appear in this case.
ENTER COMMAND >Q STOP
Summary
To summarize the commands introduced so far, here is the full dialog that starts and stops an INFO session.
INFO
1
INFO Exchange Call Utilities
FRI, MAY 08 1998
INFO 9.65g 01-MAY-98 52.74.63* Customer name
Copyright (C) 1997 Doric Computer Systems International Ltd.
All Rights Reserved
ENTER USER NAME>*LANDMARK
2
ENTER COMMAND >QUIT
3
ENTER USER NAME>STOP
4
1
Starts INFO from your operating system.
2
Identifies a new user area. Omit the asterisk in subsequent sessions under the same user name.
3
Closes the user area.
4
Stops the INFO session.
xiv Introduction INFO Reference Manual
Starting INFO
INFO invoking options
Unix info -n
If you invoke INFO without the –n option, INFO will use the
UNIX curses terminal handler; it will take the value of the
UNIX environment variable TERM.
If you invoke INFO with the –n option, INFO will use its own terminal drivers for terminal handling. The default terminal type shipped is ANSI but this may be changed, either for an INFO session or system-wide.
info -u username
If you are running INFO on a workstation X11 terminal, you would probably wish to use the curses library for terminal handling. If you are running INFO from an ANSI or VT100 compatible terminal, you may prefer to use the INFO terminal handling mode.
Will invoke INFO and enter a specified user area via username; username could be either a local INFO directory or an environment variable that points to another user area. (See Appendix N “Application Mode”.)
info -e
Operate INFO in Arc/Info 7 mode. INFO will use the same naming conventions as Arc/Info 7: the INFO directory will have a .dir extension, such as abc.dir, datafiles will be of the form abcnnnn.nit and abcnnn.dat and programs, reports and forms abcnnnn.src and abcnnnn.obj.
info -f
Force output to the screen even though output may have been re-directed to a file : e.g. info -f -u dor > doric.como
INFO will be invoked and will enter the dor directory : output will be to both the screen and to the unix file dor.como.
These run-time options may be set in the environment variable _INFOARG: see Appendix O, External Variables.
INFO Reference Manual Introduction xv
Starting INFO
VMS
If INFO or INFO-Text is set up so that the symbol which invokes it incorporates a logical : e.g. INFO :== $INFOSYS:INFO965.EXE where $INFOSYS is a logical whose value is the directory containing the INFO executable INFO965.EXE:
INFO may then be invoked with the following options :
INFO/SUPPRESS
suppress the INFO banner and prompt for the username.
INFO username
invoke INFO with the specified username; username could be either a local INFO directory or a logical that points to another area. (See Appendix N “Application Mode”).
INFO/SUPPRESS username
suppress the banner and invoke INFO with the specified username.
xvi Introduction INFO Reference Manual
INFO
command usages
Notation
Uppercase letters
Red letters
Lowercase letters
Brackets
Syntax Conventions
Most INFO commands are given with one or more arguments. These commands have a command usage which describes the correct way to give the arguments.
Here are some examples of command usages:
Example
PURGE
ACC EPT print-file
[print-file]
Explanation
Reserved word: represents a built-in
INFO function or feature
All INFO commands and command options are reserved.
Abbreviation: shortest allowable abbreviation for a command or argument.
User-defined word: a word that represents information specified by the user; for example, the name of a file, a password, a number, etc.
Optional word(s): a word or group of words in a command line that is not required.
INFO Reference Manual Introduction xvii
Syntax Conventions
Vertical lines IF-name | RP-name | PG-name Required alternative: one of a set of words or groups of words must be used.
Brackets and vertical lines [LIST |
PRINT |]
Optional alternative: one of a set of words or groups of words can be used, but none is required.
Parentheses
Ellipsis points
INPUT FORM (IPF) Equivalent reserved word: a reserved word that is identical in meaning or usage to the preceding reserved word.
DF-item-1, ...
Serial words: ellipsis points mean that the preceding information can be repeated.
Blank space between words DEFINE action Word separator: at least one blank space must be entered.
AT An argument shown in uppercase is a keyword (reserved word). Keyword arguments are typed in as they are shown in the usage.
Keyboard functions <SPACE>
<RETURN>
<ENTER>
<TAB>
<ESC> xviii Introduction INFO Reference Manual
Building Expressions
Arithmetic
expressions
You use arithmetic expressions in INFO commands to represent values that cannot be known until some set of data is actually processed. You can also use arithmetic expressions to perform calculations using known data. An arithmetic expression represents a particular value only when INFO is executing the command in which it is found.
Arithmetic expressions can contain up to 30 operands, limited by INFO's 200-character maximum command width, separated from one another by arithmetic operators. To override the default precedence of the operators, or for ease of understanding, an arithmetic expression can contain parentheses.
Each element within the arithmetic expression must be surrounded by blanks. This applies equally to the operands, operators, and parentheses.
An arithmetic expression takes the following form:
[operand-1] operator operand-2
Each operand is one of the following types of data, all of which can be used together in the same expression: n
A numeric- or data-type item name n
A system item or system variable n
A numeric or character literal
An operator is a 1 or 2 character reserved word that defines the arithmetic operation performed using the operand(s). Each operator has a precedence level which determines in what order the operator is applied as INFO evaluates the expression.
When evaluating an arithmetic expression, INFO applies operators with higher precedence before those with lower precedence. Table BE-1 below lists some arithmetic operators and their precedence level: see Appendix L
Functions for the complete list. When INFO evaluates an arithmetic expression, it processes as follows:
INFO Reference Manual Introduction xix
Building Expressions
_
**
Table BE-1
Operator
LN
WD n
Following the order of precedence shown below for each of the operators, INFO performs the computations defined by the operands having higher precedence before those defined by the operands having lower precedence.
n
When more than one instance of a precedence level is present, INFO moves from left to right through the expression to process the multiple instances.
n
When it encounters parentheses, INFO performs the computations within parentheses, following rules 1 and 2 above, before evaluating the expressions outside of the parentheses.
1
1
1
2
Precedence level* Description
Natural logarithm. Use with right hand side operand only. Calculates the natural logarithm of the operand.
The operand must be defined as numeric and must be positive.
Width computation. Use with right hand side operand only. Calculates the width of the operand, excluding trawiling (padded) blanks. The operand must be defined as character (Type C).
Unary minus. Negates the following operand.
Exponentiation. Left operand is calculated to the power of the right operand. Because exponentiation is performed using logarithms, the left operand must be positive..
xx Introduction INFO Reference Manual
Building Expressions
Table BE-1 (cont’d)
-
/
Operator
** 0.5
*
+
2
3
3
4
4
Precedence level* Description
Square root. See exponentiation for description.
Multiplication. Left and right operands are multiplied. Equal in precedence to division.
Division. Left operand is divided by thevalue of the right operand. Equal in precedence to multiplication.
Addition. Left and right operands are added together. Equal in precedence to subtraction.
Subtraction. Right operand is subtracted from left operand. Equal in precedence to addition.
*1 is the highest level of precedence; 4 is the lowest.
INFO Reference Manual Introduction xxi
Building Expressions
Operator
EQ (=)
NE (<>)
GE
LE
GT (>)
LT (<)
CN
NC
BW
NB
Logical expressions
Logical expressions specify a relation between values that is tested for truth or falsity. Logical expressions can only
evaluate to "true" or "false." You use logical expressions in
INFO commands to represent criteria for performing certain operations.
General
INFO evaluates all logical expressions from left to right.
considerations You can use parentheses to override this default order of evaluation.
Simple logical expressions
The length of any logical expression is limited only by
INFO's 200-character command buffer.
Logical expressions can be simple or compound. A simple logical expression takes the form:
operand-1 operator operand-2
where each operand is an item name, a system item or system variable, or a numeric, character, or date literal.
Each operator is a 2-character reserved word that specifies the logical relation tested using the two operands. A few logical operators have alternative forms: algebraic symbols (in parentheses following each operator reserved word in the following table) that are interchangeable with their 2-character forms.
Meaning
Operand-1 equal to operand-2
Operand-1 not equal to operand-2
Operand-1 greater than or equal to operand-2
Operand-1 less than or equal to operand-2
Operand-1 greater than operand-2
Operand-1 less than operand-2
Operand-1 contains the value of operand-2
Operand-1 does not contain the value of operand-2
Operand-1 begins with operand-2
Operand-1 does not begin with operand-2 xxii Introduction INFO Reference Manual
Building Expressions
Compound logical expressions
Each operator in a logical expression must have a blank space on either side of it. You can specify any type of data item on either side of a logical operator, just so the operands are of a compatible data type (for example, you cannot compare a numeric item with a literal string).
If you attempt to compare character data with numeric data in a logical expression, INFO accepts the expression syntactically, but the result of such a comparison is almost always incorrect.
You build compound logical expressions using simple ones joined by logical connectors. Any number of simple logical expressions can be joined to form one compound logical expression.
Logical connectors are themselves logical operators. As
INFO evaluates a compound logical expression, a logical connector performs a standard Boolean logical operation using the truth values from the (simple or compound) logical expressions that you specify to its left and right.
A compound logical expression takes the form:
logical-expression connector logical-expression
where logical-expression is a valid simple or compound
INFO logical expression, and connector is one of the
INFO reserved words AND, OR, or XOR.
To evaluate a logical expression as true: n
The connector AND requires that all logical expressions be true.
n
The connector OR requires thatat least one of the logical expressions be true.
n
The connector XOR (exclusive OR) requires that one and only one of the logical expressions be true.
INFO Reference Manual Introduction xxiii
Building Expressions
Word
Expressions
Word expressions specify character strings that are searched for in the concordable items of the selected
(INFO-Text only)
extended datafile. Word expressions represent string literals, words, or phrases that INFO attempts to locate in the specified concordable items when you reselect extended datafile records, or list or print extended datafile records.
Word expressions must conform to the following syntax: word [W [.]#-of-words word [@DF-item-1[,DF-item-2[...]]]] string
*synonym-list
[words-before,words-after
[SENTENCE synonym-member* [PARAGRAPH string
*synonym-list synonym-member* match-word match-word
word can include any characters except blanks, the current DELIMITER character, punctuation characters, and the special characters \ (backslash) and % (percent sign).
string represents any string literal enclosed in single quotes.
synonym-list represents the name of a synonym list.
synonym-member represents the name of a member of a synonym list.
match-word represents a combination of characters valid for a word and including the special characters
\(backslash) or % (percent sign). The backslash, also called the truncation character, indicates any prefix, suffix, or infix string in a word, as illustrated in the following
examples
ALPHA\
\ALPHA
Matches all words that begin with the string 'ALPHA'.
Matches all words that end with the string
'ALPHA'.
xxiv Introduction INFO Reference Manual
Building Expressions
\ALPHA\ Matches all words that contain the string 'ALPHA'.
ALP\\A Matches all words that begin with the string 'ALP' and end with the string 'A'.
The percent sign represents a character position in a word which can take any value, as illustrated below:
%%A
A%%%%
Matches any 3-character word that ends with the character 'A'.
Matches any 5-character word that begins with the character 'A'.
You can combine the backslash and percent sign in the same match word.
A list of alternate prefix, suffix, or infix strings enclosed in square brackets ([ and ]) can also represent the literal string or character portion of a match word. For example:
[A,B,D]!
[A,B]%%%%
Matches any word that begins with the characters 'A', 'B', or 'D'.
Matches any 5-character word that begins with the characters 'A' or 'B'.
W means "within" and is required for word expressions that have a textual context for the specified word term.
#-of-words directs INFO to search for a word that matches the word term preceding WITHIN and appears within the specified number of words of the word-term that follows.
For example, 'APPLES W 2 PEARS' requests INFO to find occurrences of the word 'APPLES' that appear within 2 words of the word 'PEARS'. When #-of-words immediately follows a period, INFO searches for occurrences of the word that match the preceding word term and that appear exactly within the specified number of words
For example, 'APPLES W .2 PEARS' tells INFO to find occurrences of the word 'APPLES' that occur exactly 2 words away from the word 'PEARS'.
INFO Reference Manual Introduction xxv
Building Expressions connectors in word expressions
words-before,words-after directs INFO to search for a word that matches the preceding word term and appears either the specified number of words before or the specified number of words after the word term that follows. For example, 'APPLES W 2,3 PEARS' tells INFO to find occurrences of the word 'APPLES' that appear within 2 words before or within 3 words after the word 'PEARS'.
SENTENCE directs INFO to search for a word that matches the preceding word term and that appears in the same sentence as the word term that follows. For example,
'APPLES W S PEARS' requests INFO to find occurrences of the word 'APPLES' that appear in the same sentence as the word 'PEARS'.
PARAGRAPH directs INFO to search for occurrences of a word that match the preceding word term and that appear within the same paragraph as the word term that follows.
For example, 'APPLES W P PEARS' tells INFO to find occurrences of the word 'APPLES' that appear in the same paragraph as the word 'PEARS'.
@ directs INFO to limit its search to only the item or items specified. You can specify a list of any subset of the A-, or concordable C-type items in the selected extended datafile, limited only by the 200-character length of the
INFO command buffer. If you do not include the @ option,
INFO searches all concordable items in the selected extended data file for occurrences of text that match the specified word term.
You can form compound word expressions by using the INFO logical connector keywords AND, OR, and XOR (described above in the Logical
Expressions section). You can use these words in word expressions only if you specify them as surrounded by single quotes and if they are not found in the applicable extended datafile's stopword file.
xxvi Introduction INFO Reference Manual
UNIX
••
••
operating_system_command
The dot command allows the user to execute an operating system command and to return to the INFO environment without losing the current INFO settings or altering the current INFO select/relate states.
arguments
operating_system_command is a complete command in native syntax. For operating systems which let commands execute without disrupting the user environment, the operating_system_command is optional. For INFO programs, the operating_system_command is required.
An unqualified command will create a sub-process at unix level. Entering exit or CTRL-D will return to the INFO session.
examples
ENTER COMMAND >.ls *dr9
The above will list all files on the current unix directory ending in dr9
ENTER COMMAND >
.
===== Sub-process created. Type exit to return to INFO ====
<unix prompt>ls *dr9
The above will list all files on the current unix directory ending in dr9
see also
SPAWN and SYSTEM
INFO Reference Manual Commands 1
VMS
••
••
operating_system_command
The dot command allows the user to execute an operating system command and to return to the INFO environment without losing the current INFO settings or altering the current INFO select/relate states.
arguments
operating_system_command is a complete command in native syntax. For operating systems which let commands execute without disrupting the user environment, the operating_system_command is optional. For INFO programs, the operating_system_command is required.
An unqualified command will create a sub-process at VMS level. Entering LO will return to the INFO session.
examples
ENTER COMMAND >.DIR *.DR9
The above will list all files on the current VMS directory ending in .DR9
ENTER COMMAND >
.
===== Sub-process created. Type LO to return to INFO ====
<VMS prompt>
see also
SPAWN and SYSTEM
INFO Reference Manual Commands 3
PRIME
••
••
operating_system_command
The dot command allows the user to execute an operating system command and to return to the INFO environment without losing the current INFO settings or altering the current INFO select/relate states.
arguments
operating_system_command is a complete command in native syntax. For operating systems which let commands execute without disrupting the user environment, the operating_system_command is optional. For INFO programs, the operating_system_command is required.
An unqualified command will create a sub-process at
PRIMOS level. Entering X will return to the INFO session.
examples
ENTER COMMAND >.LD @@DR9
The above will list all files on the current Primos directory ending in DR9
ENTER COMMAND >
.
*** ENTERING PSEUDO PRIMOS - TYPE “X” TO EXIT ***
OK>
see also
SPAWN and SYSTEM
INFO Reference Manual Commands 5
ACCEPT
ACC
EPT
AT
row column DF_item system_item system_variable
ACC
EPT DF_item system_item system_variable
[error_row error_column]
allows you to enter a value that is assigned to the specified data file item, system item or system variable.
arguments notes
AT row column specifies a row and column position on the terminal screen where the value you enter appears.
Row and column may be separated by a comma.
DF_item | system_item | system_variable the name of the item or variable whose value will be entered.
[error_row error_column] specifies the position on the terminal screen where the cursor is to be positioned if
INFO detects an error with the value you enter. Row and column may be separated by a comma. For the cursoraddressed ACCEPT command error messages are displayed at $ERROR-POSITION, 1. This system item can be modified.
n
ACCEPT is used in one of two ways. Either a row and column position is specified at which the data entered will appear, or the data entered will appear at the cursor's current row and column position as the command is processed.
n
ACCEPT can be used in INFO programs or interactively.
(see also ARET)
INFO Reference Manual Commands 7
ACCEPT
n
In odd-numbered program sections, ACCEPT should be used to receive values only for system items or system variables. If you try to use ACCEPT to enter or receive a value into a data file item, INFO ignores the value entered, leaving the specified data file item unchanged.
For interactive use, ACCEPT can receive data only for system items and system variables.
n
In even-numbered program sections, ACCEPT allows you to enter data for data file items as well as system items and system variables.
n
With error_row and error_column, ACCEPT allows special handling when you enter a value in an incorrect format.
When INFO detects an error in the format of the value entered, INFO displays an error message at a row on the terminal screen determined by the value of the system item $ERROR-POSITION; the cursor is then positioned to the error_row and error_column position. INFO pauses again so you can enter the correct value.
n
If ACCEPT is used without error-row and error-column, a data format error causes an error message to be displayed on the next line, and INFO positions the cursor at column
1 of the line following the message so that you can enter the correct value.
n
If ACCEPT is used with AT, a data format error causes an error message to be displayed according to the value of the system item $ERROR-POSITION, and INFO repositions the cursor at the value specified by AT. You can then re-enter the data.
n
If you specify cursor positioning and the row you specify is more than the length of the screen or if the column you specify is more than the width of the screen, INFO ignores your cursor positioning specifications.
8 Commands INFO Reference Manual
ACCEPT
INFO-Text only
When you use the ACCEPT command to assign values to
A-type items, INFO enters the editor or wordprocessor so that you can create the text file. By pressing
<SPACE><RETURN> INFO retains the text file name currently assigned to the A-type item and enters the editor or wordprocessor so that you can edit that text file. The editor defaults to the default operating system editor, but any editor or word-processor can be invoked by setting the environment variables _TEXTEDIT and _TEXTEXT.
n
<RETURN> in the first position of an accept field blanks that field. <TAB> or =<RETURN> in the first position will leave its contents unchanged.
n
Input form style accept statements may be used in programs where appropriate as an alternative to accept statements. See example.
n
Accept Attribute Settings can be set for cursor-addressed
ACCEPT statements. The system item $DISPLAY-MODE should first be set to 1, then the following system items can be used:
$ACC-ATTRIBUTE Any string used to set attibutes, such as reverse video, on ACCEPT. INFO has its own set of system items containing the ANSI escape sequences for such attributes, eg. $REVERSE.
$ACCEPT-FILL Set to 1, will cause INFO to display
ACCEPT-FILL-CHAR across the accept field rather than the field contents.
$ACCEPT-FILL-CHAR Any character to be displayed across the accept field width.
$LEFT-DELIMITER Any character used as a left delimiter for an accept field. Displayed at row,col - 1.
$RIGHT-DELIMITER Any character used as a right delimiter for an accept field. Displayed at row,col + 1.
$DELIM-ATTRIBUTE Any attribute to be associated with the delimiter characters.
INFO Reference Manual Commands 9
ACCEPT examples
FORMAT $NUM1,6,I
$DISPLAY-MODE = 1
$ACC-ATTRIBUTE = $REVERSE
$ACCEPT-FILL = 1
$ACCEPT-FILL-CHAR = '.'
$LEFT-DELIMITER = ='['
$RIGHT-DELIMITER = =']'
$DELIM-ATTRIBUTE = $BOLD
ACCEPT AT 10,24 $NUM1
Data entry with ACCEPT AT
10000 PROGRAM SECTION ONE
10001 FORMAT $CHR20,20,C
10002 DISPLAY =
10003 ACCEPT AT 10,20,$CHR20
10004 SLEEP 4
10005 DISPLAY =
Data entry with ACCEPT
10007 CURSOR 10,20
10008 ACCEPT $CHR20
10009 SLEEP 4
10010 DISPLAY =
Data entry with IPF style accept
10008 10,20,$CHR20,L,’Yes’,’No’
10 Commands INFO Reference Manual
ADD
ADD
syntax cont’d
DF_item_1,...DF_item_#
F
ROM file_path
[reject_file_path] [
N
OTEXT]
appends new records to the selected data file. The new records become part of the selected set of records.
arguments notes
DF_item_1,...DF_item_# you can specify one or many items in the INFO data file to which you are adding records. INFO will prompt you for the values of only these items. If no items are specified then INFO will prompt for all items defined, in the order they are defined.
FROM file_path allows you to specify an existing operating system file from which values will be read to make up the added records in the selected file. If no
FROM file path is specified then the input is taken from the keyboard with prompts going to the screen
[reject_file_path] specifies a system file to which records are written if they are rejected when added from the
FROM file.
NOTEXT Instructs INFO-Text to add records to the datafile without invoking the editor for A-type items.
n
An unqualified ADD command directs INFO to prompt you to enter a value for each data file item, in the order in which the items were defined, for as many new records as you want to add.
n
You can respond to ADD command prompts with more than one item value (corresponding to successive data file items) per entry by entering a series of values separated by the current delimiter character, usually a comma. See the DELIMITER command for more information. If you enter more values before a <RETURN> than there are items specified to receive values, INFO ignores the extra values entered. Thus, you can enter values for, at most, one new record before each <RETURN>.
n
It is not possible to ADD records to an ISAM SET
INFO Reference Manual Commands 11
ADD
Table ADD-1 data value
<BACKTAB> (\) equal sign (=)
<RETURN>
SYSTEM file-path
(A-type only) n
You can issue the ADD command with a list of data file items specified. When used this way, ADD prompts you to enter information at the terminal for the first item in the item list, then for the second item in the list, and so on, for as many new records as you want to add. You can specify alternate item names or names of redefined items in the item list.
n
Entering <RETURN> on the first prompt of an unqualified
ADD session terminates the ADD.
<SPACE><RETURN>
(A-type items only)
Responses to prompts when using ADD
checks for type, width and, if necessary, number of decimal places before it is accepted as part of a record.
redisplays the prompt for the previous item and allows you to change that value. You cannot backtab further than the beginning of the current record copies the value of the item in the preceding data file record to the current one. The '=' can be specified only for the second or following data record added.
assigns a null value to the item. The null value for C- and A-type items is a blank. The null value for numeric and date items is 0. If you enter <RETURN> as the first value in a new record, or as the first response when using an item list, the ADD command ends.
creates a text file under a unique name formed by INFO-Text, and enters the editor to allow entry of text. Required for non-user namable text files: optional for user-namable text files.
creates a text file of the specified name and items the item’s specified root characteristic, and enters the editor to allow entry of text. The item must be defined as user-namable, and you must specify a valid SYSTEM file name
12 Commands INFO Reference Manual
ADD with
FROM option
ADD
When the ADD command is issued with the FROM option, records can be added using values from a file that was not necessarily created by INFO. This FROM file must be an existing operating system file.
n
In the FROM file's records, as in an ADD command dialog, one or more values can be provided. If more than one value is read from a FROM file record, the values must be separated by the current delimiter character, usually a comma. See the DELIMITER command for more information. INFO ignores values read from a FROM file record that do not correspond to an item in the data file record being added The FROM file record size can be up to 1000 characters, including delimiters, before it is truncated.
n
If you use the FROM option, you can specify a system file to receive FROM file records whose values are not successfully added to the selected data file. The values in a record from a FROM file might not be successfully added to the selected data file because one of the values is numerically too large or too small, or is in an illegal format. If any value is not accepted into a record read from a FROM file, then all values taken from that record are rejected.
n
If a reject_file_path specified does not already exist, INFO creates the reject_file and writes rejected FROM file records into it as they are encountered. The reject_file must have a logical record length equal to that of the
FROM file. If the reject_file already exists, INFO appends to the existing reject_file any rejected FROM file records as they are encountered.
n
When you use the FROM option with no reject_file specified, INFO sends any error messages generated during the ADD operation to your current INFO spool or output file. These error messages do not include the erroneous input records from the FROM file.
INFO Reference Manual Commands 13
ADD
n
If you use the FROM option to add non-user-namable item values to an extended datafile and the NOTEXT option is not specified, INFO-Text displays the error message NOT
A USER NAMABLE TEXT ITEM for each item and creates the file-name. INFO-Text creates file-names if you use the
NOTEXT option alone.
Adding data and text to concordable items
When you add data to A-type items, and you do not specify the NOTEXT option, INFO-Text creates a file to hold text information, enters the editor, and allows you to enter text to the new file. When you have finished adding text to the file, store it and INFO-Text returns to the next item in the ADD dialog.
Several possible operations can occur when you use the
ADD command to add data and text to A-type items: n
If the item is defined as user-namable and you specify a file-name to add text to, and the file exists, you enter the editor with that file loaded for editing. If the specified file does not exist, INFO-Text creates the file using the name and root you specified, enters the editor, and allows you to enter text to the new file.
n
If the item is defined as user-namable and you do not specify a file name, you can press <SPACE><RETURN> to enter the editor. INFO-Text creates a unique name for the text file. When you finish adding text, INFO-Text stores the file under the SYSTEM file name it created. If you enter only a <RETURN>, INFO-Text does not create a file-name n
If the item is defined as user-namable, you include the
NOTEXT option, and you specify a name, INFO-Text assigns the name to the item but does not create a filename.
n
If the item is defined as user-namable, you include the
NOTEXT option, and you press <SPACE><RETURN>,
INFO-Text creates a unique SYSTEM file-name if you have a default document format. Otherwise, the item is left without a value.
14 Commands INFO Reference Manual
ADD
n
If the item is not defined as user-namable, and you do not include the NOTEXT option, press <SPACE><RETURN> to enter the editor. When you file the text you add, INFO-
Text names the file for you and saves the text in that file.
n
If the item is not defined as user-namable and you specify a file-path, INFO-Text displays an error message and then enters the editor. When you are ready to save the text you add, INFO-Text names the file for you and saves the text in that file.
example 1
The following sample ADD command dialog shows values entered for data file record 8 as INFO prompts one item at a time, and several data values entered for data file record
9 on one line:
ENTER COMMAND >SELECT ADDRESSES
7 RECORDS SELECTED
ENTER COMMAND >ADD
8
L.NAME>DARCY
Record number being added.
F.NAME>JOAN
ADDRESS1>456 PINE AVE
ADDRESS2><RETURN>
No data is entered.
CITY>CORVALLIS
STATE>OR
ZIP>97401
9
L.NAME>WALL,HADRIAN,124 CENTER ST,SALEM,MA,03402
10
L.NAME><RETURN>
2 RECORD(S) ADDED
Ends ADD processing.
example 2
ENTER COMMAND >SELECT FILE
9 RECORDS SELECTED
ENTER COMMAND >ADD FROM OPERATING-SYSTEM FILE
15 RECORDS SELECTED
ENTER COMMAND >
INFO Reference Manual Commands 15
ADD example 3
The following example shows the addition of both a user- namable and a non-user-namable text file
ENTER COMMAND >SELECT AND UPDATE EXAMPLE
ENTER SYNONYM FILE NAME><RETURN>
0 RECORD(S) SELECTED
ENTER COMMAND >ITEMS LONG
DATAFILE NAME: ADD-UPDATE-EXAMPLE
2 ITEMS: STARTING IN POSITION 1
4/2/1996
COL ITEM NAME WDTH OPUT TYP N.DEC PROT KEY OCCRS INDX CNLV CC CN UN
1
NAMABLE-A
FRMT REPORT
20 20
21 NOT-NAMABLE-A 20 20
FRMT REPORT
A -
A -
4
4
-
-
-
-
-
-
W
W
Y Y Y
Y Y N
ENTER COMMAND >ADD
1
NAMABLE-A>A.FIL<RETURN>
NOT-NAMABLE-A><SPACE> <RETURN>
2
NAMABLE-A>B.FIL<RETURN>
NOT-NAMABLE-A><SPACE> <RETURN>
3
NAMABLE-A><RETURN>
2 RECORD(S) ADDED
On each <RETURN> you will enter the editor specified by the
environment/logical/global variable .INFOEDIT (or the system editor if not set).
ENTER COMMAND >LIST TEXT
1
NAMABLE-A =A.FIL
This is the content of the file called A.FIL
NAMABLE-A =X00000302
This is the contents of a system-named text file.
NAMABLE-A =B.FIL
This is the contents of the second text file named by the user.
NAMABLE-A =X00000402
This is the second text file named by INFO-Text.
16 Commands INFO Reference Manual
ADDRECS
ADDR
ECS relate_# # [system_variable] [
D
UPS]
adds records to a selected or related file.
argument notes
relate_# related file number or 0 for selected file.
# number of records to be added.
system_variable this will be set to the record number of the last record added.
DUPS Option to create records containing whatever data is in the internal buffer at the time. If DUPS is not specified then all the fields are either set to blank or zero as appropriate to their data type.
n
(INFO-Text) ADDRECS to an extended file will update the
LRN file.
examples
ENTER COMMAND >SELECT FILE -A
0 RECORD(S) SELECTED
ENTER COMMAND >ADDRECS 0 3
3 BLANK RECORDS WILL BE ADDED TO FILE -A
ENTER COMMAND >ADDRECS 0 2 $NUM1
2 MORE BLANK RECORDS WILL BE ADDED TO FILE-A AND $NUM1 WILL BE
SET TO 5
ENTER COMMAND >REL FILE-B BY ITEM
ENTER COMMAND >ADDRECS 1 1
1 BLANK RECORD WILL BE ADDED TO FILE-B
INFO Reference Manual Commands 17
ADIR
ADIR
directory_path
assigns or displays the current alternate directory setting.
argument
directory_path an operating system directory name. The directory path may include external variables enclosed in
‘%’ characters
notes discussion
n
An unqualified ADIR command displays the current alternate directory setting.
n
The initial ADIR value is INFOSYS n
INFO does not validate the legality of the system directory name when you change the ADIR setting.
n
Once the ADIR setting is changed from its default value, you must use the ADIR command to set INFOSYS as the alternate directory for INFO's HELP command to operate.
n
If you quit an INFO session and enter another user name in response to the ENTER USER NAME> prompt instead of STOP, ADIR is not reset to INFOSYS.
n
Be aware that shared use of an ADIR setting among simultaneous INFO users can cause file access problems in some situations.
With the ADIR command, you can specify an alternate system directory in which INFO files can be found during an INFO session. If properly prepared, INFO automatically searches for files in the alternate system directory when it cannot find the file in your user area.
You can also use the ADIR command to name a system directory for a subsequent TAKE command to search for a user area and file. See the TAKE command for more information.
INFO Reference Manual Commands 19
ADIR example
ENTER COMMAND >ADIR home/prospects
ENTER COMMAND >ADIR
THE CURRENT ALTERNATE DIRECTORY IS home/prospects
20 Commands INFO Reference Manual
ALTER
ALT
ER DF_item [,item_characteristics]
allows you to change any item characteristic, except internal width, of any existing item in the selected data file, whether or not the datafile contains records.
arguments
DF_item the item in the selected INFO data file that you want to change.
item_characteristics the new values for one or several item characteristics. Separate the new values from each other and from the DF_item with a comma.
notes discussion
n
If you issue an unqualified ALTER command, INFO prompts you for the name of the item whose characteristics you want to change.
n
You can enter one or a series of item characteristics when you issue the ALTER command.
n
If you want to use the ALTER command to change an item in a data file defined with protection passwords, you must select the data file with the control-level password. See the
PASSWORD and SELECT commands for information about providing protection passwords for access to protected data files.
n
Part or all of an arrayed item can be redefined over the internal width of another item.
n
To change a non-redefined item to an arrayed item, follow the second sample dialog below, but note that the item being changed is previously defined, not redefined.
With the ALTER command, you can change any item characteristic, except internal width, of any existing item in the selected data file.
You cannot use the ALTER command to define new items for the data file.
INFO Reference Manual Commands 21
ALTER
ALTER operates on data files that contain data records. In contrast, the MODIFY command allows you to change any item characteristic, including internal width, of any existing item in the selected data file; however, you cannot use
MODIFY with a data file that contains records, except on
Redefined Items.
Entering item characteristics
After you issue the ALTER command, follow the prompts displayed on the screen, changing the applicable item characteristics. The tables at the end of this discussion, list, in order of occurrence, the prompts and responses for item characteristics.
n
To leave an item characteristic unchanged once you are in the ALTER dialog, enter <RETURN> in response to the prompt for that characteristic. To terminate the ALTER dialog and return to ENTER COMMAND > level, enter the current CCHR setting for <KEEP> and <RETURN>. This leaves unchanged the remaining item characteristics of the item being altered, and also leaves unchanged the characteristics of all other items in the data file.
n
You can supply information for more than one item characteristic in response to an ALTER prompt. Separate multiple characteristics in one entry with commas. To skip an item characteristic — that is, to leave it unchanged — enter two commas together.
n
If after entering multiple responses to an ALTER prompt, applicable item characteristics remain for which you have not provided a response, INFO prompts you for the remaining information.
n
Should you include an incorrect response in an entry containing multiple responses, INFO displays an error message and prompts you for a corrected item characteristic entry. INFO ignores any information in an entry of multiple responses that follows an incorrect item characteristic response. You must re-enter any response(s) that followed the incorrect one.
22 Commands INFO Reference Manual
ALTER
Defining arrayed items
Altering concordable items
(INFO-Text)
Special considerations
To define an arrayed item, first define an area that encompasses the multiple occurrences of the arrayed item, and then redefine the area as an arrayed item. The length of the defined area should be an even multiple of the length of the arrayed item.
Once the length of the array has been defined, use ALTER for the appropriate OCCURS count and INDEX characteristics. The OCCURS count defines the number of times the array element repeats in each record; the INDEX identifies which $IDX# system item controls access to individual elements in the array.
You can use ALTER to change an arrayed item to a nonarrayed item. Simply repeat the ALTER operation, responding N to the ENTER INDEX NUMBER prompt.
You can change any characteristic of concordable items with the ALTER command. You cannot change the name of a synonym file associated with an extended datafile with with the ALTER command; you must use the MODIFY command instead.
If you use the ALTER command to change any item characteristic that pertains to concording an A- or concordable C-type item, the entire extended datafile is made "concord inconsistent" – that is, the concordance does not reflect the concord attributes of the concordable items in the datafile. Use the CONCORD ALL command to concord the datafile again before using the RESELECT command with word expressions or the CONTEXT command.
If you want to use the ALTER command to change a protected item, you must select the datafile with the control-level (level-0) password
See the PASSWORD command for information about entering passwords to provide access to protected datafiles.
Part or all of an arrayed item can be redefined over the internal width of another item.
To change a datafile item to an arrayed item, follow the example dialog above, but note that the item being changed is previously defined, not redefined.
INFO Reference Manual Commands 23
ALTER examples
The first example contains two sample ALTER dialogs that request the same ALTER operation for an I-type item. In the first example, all applicable ALTER prompts appear because only a single response is given for each prompt. In the second, all responses are entered with the ALTER command.
Full ALTER dialog:
ENTER COMMAND >ALTER PART.NO
1 PART.NO
6 6 I 0 -
ITEM NAME><RETURN>
ITEM OUTPUT WIDTH><RETURN>
Leave as is.
Leave as is.
ITEM TYPE><RETURN>
Leave as is.
ITEM PROT. LEVEL>3
Change to increase protection.
ALTERNATE ITEM NAME><RETURN>
ENTER KEY LEVEL><RETURN>
Leave as is.
Leave as is.
ENTER INDEX NUMBER><RETURN>
If not an arrayed item.
1 PART.NO
6 6 I 3 -
All responses entered with the ALTER command:
ENTER COMMAND >ALTER PART.NO,,,,3,,,,
1 PART.NO
6 6 I 3 -
24 Commands INFO Reference Manual
ALTER
The ITEMS listing below shows the redefined item
PRICE.ARRAY in the PRICE-SCHEDULE data file. The
ALTER dialog changes the output width of PRICE.ARRAY, defines an alternate item name, and provides index and occurrence information.
ENTER COMMAND >ITEMS LONG
DATAFILE NAME: PRICE-SCHEDULE
2 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC PROT KEY OCCRS INDX CNLV CC CN UN
1 PART.NO
6 6 I 4 -
7 PRICES 80
** REDEFINED ITEMS **
80 C 4 -
7 PRICE.ARRAY
10 10 N 2 0 -
ENTER COMMAND >ALTER PRICE.ARRAY
7 PRICE.ARRAY
10 10 N 2 0 -
ITEM NAME><RETURN>
Leave as is.
ITEM STARTING COLUMN><RETURN>
Leave as is.
ITEM WIDTH><RETURN>
ITEM OUTPUT WIDTH>12
Leave as is.
Change output width to 12.
ITEM TYPE><RETURN>
Leave as is.
ITEM DECIMAL PLACES><RETURN>
Leave as is.
ITEM PROT.LEVEL><RETURN>
ALTERNATE ITEM NAME>PRICE
Leave as is.
Assign alternate name
PRICE
ENTER KEY LEVEL><RETURN>
ENTER INDEX NUMBER>1
Control counter is $IDX1.
ENTER NUMBER OF OCCURRENCES>8
Array element repeats 8
7 PRICE.ARRAY
10
times.
12 N 2 0 8 1 - -
The next example shows altering a concordable C-type item. When you do not enter an index, the occurrences prompt does not appear. When you next select the file, you receive a warning that the concordance is not consistent until you concord the data file again.
INFO Reference Manual Commands 25
ALTER
ENTER COMMAND >SELECT TRIP.DATA
ENTER SYNONYM FILE NAME ><RETURN>
30 RECORD(S) SELECTED
ENTER COMMAND >ITEMS LONG
DATAFILE NAME: TRIP.DATA
12/ 1/93
7 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC PROT KEY OCCRS INDX CNLV CC CN UN
1 DATE 8 8 D — 4 — — — — — — —
9
2
TRIPNUM
TRUCK
3
3
3
3
I
I
—
—
4
4
—
—
—
—
—
—
—
—
—
—
—
—
—
—
15
25
29
DRIVER
MILES
LOAD
10
4
20
10
4
10
C
I
X
—
—
—
4
4
4
—
—
—
—
—
—
—
—
—
—
—
W
—
—
N
—
—
Y
—
—
N
ROOT
49 CUSTOMER
ALTCUST
KET000
10 10 C — 4 — — — W N N —
ENTER COMMAND >ALTER CUSTOMER
49 CUSTOMER
ALTCUST
ITEM NAME><RETURN>
10 10 C — 4 — — —
ALTERNATE ITEM NAME><RETURN>
ITEM OUTPUT WIDTH><RETURN>
W N N —
ITEM WIDTH><RETURN>
ENTER CONCORDANCE LEVEL><RETURN>
Change concordance level.
CONCORD UPPER AND LOWER CASE LETTERS SEPARATE?><RETURN>
CONCORD NUMBERS IN TEXT ITEMS?><RETURN>
ITEM PROT. LEVEL><RETURN>
ENTER KEY LEVEL><RETURN>
ENTER INDEX NUMBER><RETURN>
CUSTOMER 10 10 C — 4
ALT CUST
ENTER COMMAND >SELECT TRIP.DATA
— — — R N N —
WARNING, DATAFILE IS CONCORD FORMAT INCONSISTENT
ENTER SYNONYM FILE NAME ><RETURN>
30 RECORD(S) SELECTED
ENTER COMMAND >CONCORD
279 WORDS
DONE SORT
ENTER COMMAND >
26 Commands INFO Reference Manual
INFO ALTER
Dialog
ITEM NAME
ITEM STARTING COLUMN
ITEM WIDTH
ITEM OUTPUT WIDTH
ITEM TYPE
(Redefined items only)
(Redefined items only)
ITEM DECIMAL PLACES
(N, V, F, L, O & T-types only, plus B-types on VMS)
ITEM PROT. LEVEL
ALTERNATE ITEM NAME
ENTER KEY LEVEL
IS KEY IN BITS?
IS KEY IN BYTES?
(PRIME only)
(PRIME only, if N answered to
IS KEY IN BYTES?
above prompt)
(PRIME only, if N answered to above 2 prompts)
ARE DUPLICATE KEYS ALLOWED?
(on UNIX and PRIME, key level > 0 only)
ENTER INDEX NUMBER
ENTER NUMBER OF OCCURRENCES
(for INDEX NUMBER 1-9 only)
INFO Reference Manual Commands 27
ALTER INFO
Table ALTER-1 ALTER dialog prompts and responses for INFO-Text
Prompt Possible responses
ITEM NAME If you did not specify an item in the ALTER command line, enter the name of the item whose characteristics you want to change
A second ITEM NAME > prompt then appears.
Here you can specify a new-item-name, or enter <RETURN> to leave the item name unchanged.
ITEM STARTING COLUMN Enter the new start column, if the item is
(for redefined items only) redefined.
ITEM WIDTH
(for redefined items only)
ITEM OUTPUT WIDTH
Enter a new item width for the redefined item.
Enter the item width for output. This replaces the item's defined output width.
ITEM TYPE Enter the 1-character item type.
ITEM DECIMAL PLACES Enter the number of places to the right of the
(for numeric items that have decimal point.
decimal positions only)
ITEM PROT. LEVEL Enter the protection level for the item. Enter R following the protection level (with no preceding comma) to restrict the protection to read-only.
(See the PASSWORD and PROTECT commands for more information.)
ALTERNATE ITEM NAME Enter a name to be used as an alternate name for the item.
ENTER KEY LEVEL For ISAM files only. The key level of the field that the item represents in the file, specified by key level. Enter -1 or N to cancel a key level.
IS KEY IN BITS? (Y OR N)> Indicates whether the key field is a bit string.
(PRIME)
IS KEY IN BYTES? (Y OR N)> Indicates whether the key field is a byte string.
(PRIME)
IS KEY IN WORDS? (Y OR N)>Indicates whether the key field is a word.
(PRIME)
28 Commands INFO Reference Manual
INFO ALTER
Table ALTER-1
ALTER dialog prompts and responses for INFO (cont'd
)
Prompt Possible responses
IS KEY STORED IN DATA?> Indicates the primary key is a data segment in
(PRIME) the record.
(for key level 0 only)
ARE DUPLICATE KEYS
ALLOWED?>
ENTER INDEX NUMBER
ENTER NUMBER OF
OCCURRENCES
Indicates whether duplicate keys values are accepted for a secondary key
For an arrayed item, enter a number that represents which $IDX# system item acts as subscript for the item.
Enter the number of array elements in the arrayed item.
note see also
On Prime, it is essential that the answer to the ‘IS KEY IN
BITS?’ prompt is consistent with the MIDAS CREATK template.
CWID
INFO Reference Manual Commands 29
ALTER INFO-Text
Table ALTER-2
ALTER Dialog Prompts and Responses for INFO-Text
Prompt Possible Responses
ITEM NAME If you did not specify an item in the ALTER command line, enter the name of the item whose characteristics you want to change.
A second ITEM NAME > prompt then appears.
Here you can specify a new-item-name, or enter <RETURN> to leave the item name unchanged.
Enter a name to be used as an alternate name ALTERNATE ITEM NAME for the item.
ITEM STARTING COLUMN Enter the new start-column, if the item is
(for redefined items only) redefined.
ITEM WIDTH
(for redefined items only)
Enter a new item width for the redefined item.
ITEM OUTPUT WIDTH Enter the item width for output. This replaces the item's defined output-width.
ITEM TYPE Enter the 1-character item-type.
ITEM DECIMAL PLACES Enter the number of places to the right of the
(for numeric items that have decimal point.
decimal positions only)
USER-NAMABLE
TEXT FILES?
(default is N)
For A-type items only. Enter Y (yes) if you want to have the option of naming your text files when you add records to the file; otherwise, enter N (no) or <RETURN>. If you enter N, INFO names your text files automatically during an ADD command.
30 Commands INFO Reference Manual
INFO-Text ALTER
Table ALTER-2
ALTER Dialog Prompts and Responses for INFO-Text (cont’d)
Prompt Possible Responses
USER-NAMABLE
TEXT ROOT?
(default is N)
ENTER ROOT NAME>
(no default)
ENTER
CONCORDANCE LEVEL>
(no default).
For A-type items only. Enter Y (yes) if you want to define a root name. The root name can include a directory name. If you enter N, INFO creates new text files in your current operating system directory.
If you want a null root name, enter Y (yes) here and <RETURN> for the next prompt. This option is easy to use because the file name is created as entered with no prefix.
For A-type items only. Applies if you entered
Y above. Enter the 1- to 8-character name to use as prefix root of text datafile names. It can be an environment variable containing the prefix root name enclosed in '%' characters (eg. %DOCS%). INFO stores and accesses the free-text files beginning with this standard name. Enter <RETURN> for a null root name.
For A- and concordable C-type items only
Enter one of the values described below to define the level to which INFO indexes the text when this file is concorded. The index levels are listed in order from least to most comprehensive. Concordable C-type items must specify R (record), I (item), or W
(word) level.
N — No indexing. Item is not available for freetext query. The next two prompts do not appear if you set concordance level to N.
R — Record-level indexing.
I — Item-level indexing. This is the minimum level required for queries using word expressions that include the "@ DF-item" specification.
INFO Reference Manual Commands 31
ALTER INFO-Text
Table ALTER-2
ALTER Dialog Prompts and Responses for INFO-Text (cont’d)
Prompt Possible Responses
CONCORD
UPPER AND LOWER
CASE LETTERS
SEPARATE?>
P — Paragraph-level indexing. This is the minimum level required for queries using word expressions that include "W PARAGRAPH".
S — Sentence-level indexing. This is the minimum level required for queries using word expressions that include "W SENTENCE".
W — Word-level indexing. This is the most common level of indexing. It is required for queries using phrases or proximity searching.
(When you specify any concordance level except N.) For A- and concordable C-type items only. Enter Y (yes) to distinguish between uppercase and lowercase during concordance and free-text queries; otherwise, enter N (no) or <RETURN>.
CONCORD NUMBERS IN
TEXT ITEMS?
(default is N)
ITEM PROT. LEVEL
(When you specify any concordance level except N.) For A- and concordable C-type items only. Enter Y (yes) to index numbers during concording; otherwise, enter N
(no) or <RETURN>.
Enter the protection level for the item. Enter R following the protection level (with no preceding comma), to restrict the protection to read-only.
(See the PASSWORD and PROTECT commands for more information.)
ENTER KEY LEVEL For ISAM files only. The key level of the field that the item represents in the file, specified by key-level. Enter -1 or N to cancel a key level.
IS KEY IN BITS? (Y OR N)> Indicates whether the key field is a bit string.
(PRIME)
IS KEY IN BYTES? (Y OR N)> Indicates whether the key field is a byte string.
(PRIME)
32 Commands INFO Reference Manual
INFO-Text ALTER
Table ALTER-2
ALTER Dialog Prompts and Responses for INFO-Text (cont’d)
Prompt Possible Responses
IS KEY IN WORDS? (Y OR N)>Indicates whether the key field is a word.
(PRIME)
IS KEY STORED IN DATA?> Indicates the primary key is a data segment in
(PRIME) the record.
(for key level 0 only)
ARE DUPLICATE KEYS
ALLOWED?>
Indicates whether duplicate keys values are accepted for a secondary key
ENTER INDEX NUMBER For an arrayed item, enter a number that represents which $IDX# system item acts as subscript for the item.
Enter the number of array elements in the arrayed item
ENTER NUMBER OF
OCCURRENCES
ENTER
CONCORDANCE
LEVEL>
(no default)
For A- and concordable C-type items only.
Enter one of the values described below to define the level to which INFO indexes the text when this file is concorded. The index levels are listed in order from least to most comprehensive. Concordable C-type items must specify R (record), I (item), or W
(word) level.
N — No indexing. Item is not available for freetext query. The next two prompts do not appear if you set concordance level to N.
R — Record-level indexing.
I — Item-level indexing. This is the minimum level required for queries using word expressions that include the "@ DF-item" specification.
P — Paragraph-level indexing. This is the minimum level required for queries using word expressions that include "W PARAGRAPH".
INFO Reference Manual Commands 33
ALTER INFO-Text
Table ALTER-2
ALTER Dialog Prompts and Responses for INFO-Text (cont’d)
Prompt Possible Responses
CONCORD
UPPER AND LOWER
CASE LETTERS
SEPARATE?>
CONCORD NUMBERS IN
TEXT ITEMS?
(default is N)
S — Sentence-level indexing. This is the minimum level required for queries using word expressions that include "W SENTENCE".
W — Word-level indexing. This is the most common level of indexing. It is required for queries using phrases or proximity searching.
(When you specify any concordance level except for A- and concordable C-type items
N.) (default is N) only. Enter Y (yes) to distinguish between uppercase and lowercase during concordance and free-text queries; otherwise, enter N (no) or <RETURN>.
(When you specify any concordance level except N.) For A- and concordable C-type items only. Enter Y (yes) to index numbers during concording; otherwise, enter N (no) or
<RETURN>.
34 Commands INFO Reference Manual
INFO-Text ALTER
Dialog
ITEM NAME
ITEM STARTING COLUMN
ALTERNATE ITEM NAME
(Redefined items only)
ITEM WIDTH
ITEM OUTPUT WIDTH
ITEM TYPE
(Redefined items only)
ITEM DECIMAL PLACES
(N, V, F, L, O & T-types only, plus B-types on VMS)
USER NAMABLE TEXT FILES?
A-types only
USER NAMABLE TEXT ROOT?
A-types only
ENTER ROOT NAME
A-types only (if Y replied to
ENTER CONCORDANCE LEVEL
previous prompt)
A- and C-types only
CONCORD UPPER AND LOWER CASE LETTERS SEPARATE?
CONCORD NUMBERS IN TEXT?
ITEM PROT. LEVEL
defined items only
defined items only
ALTERNATE ITEM NAME
ENTER KEY LEVEL
IS KEY IN BITS?
IS KEY IN BYTES?
(PRIME only)
(PRIME only, if N answered
IS KEY IN BYTES?
to above prompt)
(PRIME only, if N answered to above 2 prompts)
ARE DUPLICATE KEYS ALLOWED?
(on UNIX and PRIME, key level > 0 only)
ENTER INDEX NUMBER
ENTER NUMBER OF OCCURRENCES
(for INDEX NUMBER 1-9 only
see also
CWID to alter item widths.
INFO Reference Manual Commands 35
ARET
ARE
T
N
Y
changes or displays INFO's automatic return setting.
arguments note discussion
N turns the automatic return setting off (is off by default).
Y turns the automatic return setting on.
n
An unqualified ARET command displays the current automatic return setting.
The ARET command is used during operation of the
ACCEPT and INPUT FORM commands to determine whether INFO should skip automatically to another input field if the length of a data entry matches the length of the corresponding input field.
If the setting is on, INFO continues to the next specified input field when the maximum input width of the current item has been reached.
If the setting is off, INFO does not skip to another input field, but rather allows you to complete the entry with a
<RETURN>. If the width of the value entered is greater than the width of the input field, or if some other error in the data entered is detected, INFO issues an error message and allows you to re-enter a value for that input field.
With the ARET setting on, you can save keystrokes during data entry where potential truncation of the entered data does not cause problems in an application. However, in many data entry applications, when data is entered that is wider than a predefined input width, you may wish re-entry of that data or some other special handling to occur. For such cases, it is preferable for the ARET setting to be off
(N).
By default the ARET setting is off (N). If you have your own copy of the INFO message file, you can change the
ARET setting so that it retains its setting from session to session. See the chapter ‘Controlling default assignments’ for more information.
INFO Reference Manual Commands 37
ASELECT
AS
ELECT [FOR] logical_expression word_expression
allows you to add records to the currently selected records. An unqualified ASELECT command selects all records in the selected data file.
arguments notes discussion
n
Up to 8 logical or word expressions may be combined using Boolean operators.
n
An unqualified ASELECT command causes every record in the selected data file to become part of the selected set.
Use ASELECT when you want to add some or all unselected records in the selected data file to the selected set. You specify the ASELECT criteria by including a logical expression in the command line. When you use the ASELECT command to add records to the selected set, INFO searches through the previously unselected records and adds to the selected set those records which meet the criteria of the logical expression.
example
FOR is used only for documentation or ease of understanding.
logical_expression the statement that INFO evaluates before adding records to the selected set of records. See
‘Building Expressions’.
word_expression (INFO-Text only) See ‘Building
Expressions’
ENTER COMMAND >SELECT EMP.INFO
220 RECORD(S) SELECTED
ENTER COMMAND >RESELECT FOR SEX EQ 'M'
Narrows
120 RECORD(S) SELECTED
selected set.
INFO Reference Manual Commands 39
ASELECT
ENTER COMMAND >ASELECT FOR SEX EQ 'F' OR DEPS GT 3
145 RECORD(S) SELECTED
Additionally select all
employees who are women
or who have more than 3 dependents.
ENTER COMMAND >ASELECT
Unqualified ASELECT
220 RECORD(S) SELECTED
additionally selects all unselected records
see also
DSEL
LIMIT
NSELECT
POSTINGS
RESELECT
SET
XRES
40 Commands INFO Reference Manual
ATOE
ATOE
item-1 [TO] item-2
ASCII To EBCDIC Conversion allows the user to perform a pseudo ASCII to EBCDIC conversion on a character field. A
SORT on the output field will sort letters before numbers.
argument discussion item-1
Source item to be moved.
item-2 Destination item: may be the same as item-1.
ATOE performs a character-by-character move to the destination field. The characters 0—9 inclusive are moved unmodified. All other characters have the parity bit switched off, thus causing these characters to sort before numbers. The destination field will appear to be unchanged on output.
error responses
INVALID DESTINATION
INVALID SOURCE
INFO Reference Manual Commands 41
BOTM
Will reposition to the last record in the working set
note
n
Even numbered program sections only.
BOTM
INFO Reference Manual Commands 43
BOX
BOX
Syntax cont’d
Syntax cont’d
Syntax cont’d from co-ordinates
[
F
ILL (variable)]
(constant)
[
A
TTR (variable)]
(constant)
[
B
ORDER (variable)]
(constant) to co-ordinates
paints a box on the terminal screen to emphasize or isolate displayed data or to give the screen a ‘window' effect.
arguments notes
FILL Sets up the box fill characters; the default fill character is a space. A string may be specified, although it will be truncated if longer than the width of the box.
ATTR Sets up the attributes for the inside of the box, i.e.
an ANSI character such as reverse video or screen blink.
Used in conjunction with FILL
BORDER Specifies the character to be used when outlining the box. The default is a straight line.
n
THIS COMMAND IS FOR ANSI TERMINALS ONLY.
n
The co-ordinates may be numeric items or constants in the format row,column.
n
If all the options are to be used, they must be specified in the order as above.
n
In Input Forms all BOX commands are run only once and before any other commands.
n
If the row co-ordinates are equal (e.g. BOX 10,5 10,20), a straight horizontal line will be drawn. If the column coordinates are equal (e.g. BOX 10,5 20,5), a straight vertical line will be drawn.
INFO Reference Manual Commands 45
BOTM discussion examples
A box will be painted on the screen.
BOX 10,20 15,65
BOX 10,20 15,65 FILL '*'
BOX 10,20 15,65 FILL '*' ATTR $REVERSE
BOX 10,20 15,65 BORDER '+'
BOX $NUM1, $NUM2, $NUM3, $NUM4 FILL $CHR5
ATTR $CHR6 BORDER $CHR7
error responses
INVALID STARTING ROW
INVALID ENDING ROW
INVALID STARTING COLUMN
INVALID ENDING COLUMN
ATTRIBUTE STRING IS NOT REALLY AN ATTRIBUTE
46 Commands INFO Reference Manual
BROFF
BROF
F
The break off command disables a user interrupt to an INFO program using the appropriate break key(s)
discussion see also
This command is particularly useful in applications where there is a lot of data entry via the screen, so that if the break key is inadvertently hit, it is ignored.
The MODE SET COND command provides a more complete way of trapping such interrupts
INFO Reference Manual Commands 47
BRON
BRON
A break on command enables the user to interrupt an INFO program using the relevant break key(s)
discussion note see also
If the Break key was used while BROFF was in effect,
BRON will cause the break to be activated.
Upon such an interrupt the INFO break handler prompts the user before returning to ENTER COMMAND >
The MODE SET COND command provides a more complete way of trapping such interrupts.
INFO Reference Manual Commands 49
CALCULATE
CA
LCULATE DF_item system_item system_variable
or
DF_item system_item system_variable
=
arithmetic_expression
=
arithmetic_expression
computes and assigns a numeric value to numeric data file items, numeric system items and date variables.
arguments
The specified datafile item, system item or system variable must be numeric.
= the operator 'equals'.
arithmetic_expression the expression that INFO computes before assigning the new value. You may also specify a single numeric value.
commandless syntax it is not necessary to include the command name CALCULATE in the statement.
CA $NUM1 = 99
$NUM1 = 99
can be coded as
notes
n
CALCULATE computes and assigns the value of an INFO arithmetic expression into the named numeric data file item, system item, or system variable. For more information on arithmetic expressions, see the chapter
'Building Expressions' in the beginning of this guide.
n
Once INFO computes the value of the arithmetic expression, at the time that it stores that value, INFO tailors the result to the target item or variable, as follows:
If the receiving data file item, system item, or system rounding variable is other than an I (integer) or (not VMS)
B (binary) type, INFO rounds the value to the nearest value that fits within the allowed precision for that item or variable.
INFO Reference Manual Commands 51
CALCULATE
If the receiving data file item, system item, or system truncating variable is an I or (not VMS) B type, INFO truncates the result to fit the input width of the item or variable.
n
The operation of the CALCULATE command varies, depending on whether you use it interactively or in an
INFO program.
In interactive mode, the CALCULATE command operates on every selected record. If no records are selected, you can use the CALCULATE command to perform calculations on system items or system variables, but not on data file items.
In program processing, the results of a CALCULATE depend on whether the command is issued from within an odd-numbered or even-numbered section. Each
CALCULATE command in an odd-numbered section is executed repeatedly, once for each selected record, before processing passes to the next INFO command. On the other hand, each CALCULATE command in an evennumbered section operates only on the currently positioned selected record.
n
If you attempt to assign a numeric value too large or too small for the receiving item or system variable, INFO displays an error message. INFO then checks the value of the $ARITH-QUESTION system item to determine whether to prompt you with the message DO YOU WANT
TO TRY AGAIN?>. Respond to this prompt as follows:
Y instructs INFO to repeat the calculation that caused the error message and assign the overflow/underflow value
(which is truncated to fit) in the item, system item, or system variable.
N instructs INFO not to repeat the calculation that caused the error message. The item value, system item, or system variable involved is not changed.
52 Commands INFO Reference Manual
CALCULATE notes for using $DAT and $NUM
n
INFO maintains accuracy of up to 12 significant positions.
n
Remember to include a space between each term and operator in an arithmetic expression.
n
When a CALC is performed from an item on a related file where there is a ‘NO-MATCH’, by default the target item is zero-filled. This can be avoided by setting the system variable $MOVFLG to 1. If this is done the target item will be left intact if the source item has not been matched.
Special considerations apply when a CALCULATE command references the $DAT# and $NUM# system variables, either interactively or within an odd-numbered program section.
n
If you set the value $DAT# or $NUM# without looping — that is, without using the same variable on both sides of the CALCULATE equation — then the CALCULATE operation occurs once, regardless of the number of records selected.
CALCULATE $DAT3 = 5/7/1983 n
If you assign the value of a $DAT# or $NUM# variable in loop processing — that is, while using the same variable on both sides of the equation — then the CALCULATE operation occurs repeatedly, once for each selected record.
CALCULATE $NUM1 = $NUM1 + PRICE n
At the end of the looping process, the value of the variable
($NUM1 above) equals the total of all the calculated values (in the above example, the total of the PRICE field in all selected records). If no records are selected, the calculation does not occur.
n
If you include more than one $DAT# or $NUM# variable in the arithmetic expression, then the CALCULATE operation occurs once, regardless of the number of selected records.
CALCULATE $NUM1 = $NUM1 + $NUM2
INFO Reference Manual Commands 53
CALCULATE example
ENTER COMMAND >CALCULATE GROSS = HRS_WORKED * HRLY_WAGE
ENTER COMMAND >CALCULATE $REPDAT = $TODAY - 3
When performing complex calculations, INFO processes expressions inside parentheses first.
ENTER COMMAND >CALC WAGE = RATE / ( HRS_WRKD * WKS_MO )
Note that there is a space on either side of each operator and each parenthesis.
see also
Appendix L, Functions.
54 Commands INFO Reference Manual
INFO-Text PRIME
CAT
ALOG [directory_path] [
L
IKE identifier]
lists the files in an operating system directory.
CATALOG arguments note
directory-path — a valid operating system directory name. The default is the current directory.
LIKE identifer — requests a display of only those files within the default or specified directory whose names resemble that of the specified identifier, ( that is , either contain the characters in the name or that resemble the identifier closely).
n
An unqualified CATALOG command requests a display of all files in the default directory.
This would be equivalent to LD on Prime, DIR on VAX or
ls on UNIX n
It is possible to use wildcards in the identifier.
example
ENTER COMMAND >CATALOG LIKE *.DR9
All files ending in .DR9 will be displayed.
INFO Reference Manual Commands 55
CCASE
CCAS
E
U
PPER
L
OWER item-1 [TO] item-2
moves character strings, forcing alpha characters to upper or lower case.
arguments
item-1 INFO character item (not literal).
item-2 INFO character item (not literal).
note discussion
n
Item-1 and item-2 can be the same, e.g.
CCASE UPPER SURNAME TO SURNAME
In effect CCASE is MOVE with forcing of alphabetic characters to upper or lower case. It therefore mimics
MOVE used interactively and in odd/even program sections.
INFO Reference Manual Commands 57
INFO-Text CCCT
CCCT
keyword [item-1]
Change Concordance Character Table applies temporary changes to the concordance character table.
arguments notes discussion
n
Changes to the INFO-Text concordance character table
(CHATAB) last only for the duration of a session. So put your CCCT statements into PROFILE to customize
CHATAB each time you use it.
n
Remember that CHATAB is only used by the CONCORD command.
Allows you either to PRINT / DISPLAY concordance character table or to change it by specifying that a given character is to be treated as UPPER = upper case letter,
LOWER = lower case letter, DIGIT = digit, SPECIAL = special character, DELIMITER = word delimiter, NULL = null (i.e. ignored by concorder).
examples
keyword UPPER, LOWER, DIGIT, SPECIAL,
DELIMITER, NULL, PRINT or DISPLAY.
item-1 is the character to be changed in concordance table (must be character item or literal).
CCCT UPPER ‘a’
Treat ‘a’ as ‘A’ when concording
CCCT UPPER ‘I’
No longer treat ‘l’ as a word delimiter, rather as an uppercase character
CCCT DISPLAY
Display the current concordance character table settings to the screen.
INFO Reference Manual Commands 59
CCHR
CCH
R syntax cont’d
[character_1[,character_2[,character_3
[,character_4[,character_5]]]]]
changes or displays the INFO control character settings <KEEP>,
<CLEAR>, <TAB> and <BACKTAB>.
Also TRUNCATION (INFO-Text only )
arguments notes
character_1 refers to the setting for <KEEP>
character_2 refers to the setting for <CLEAR>
character_3 refers to the setting for <TAB>
character_4 refers to the setting for <BACKTAB>
character_5 refers to the setting for TRUNCATION
(INFO-Text only) n
An unqualified CCHR command displays each CCHR setting. INFO prompts you for a response after each
CCHR setting is displayed.
n
INFO displays the CCHR settings in decimal form (octal on Prime), which represents the ASCII code values for the settings.
UNIX only
When INFO is installed, the default character settings are :
KEEP
CLEAR
TAB
= Dec 01
= Dec 02
= Dec 09
BACKTAB = \ 92
TRUNCATION = ! 33
(Ctrl-A)
(Ctrl-B)
(TAB key)
(\ key)
(! key)
INFO Reference Manual Commands 61
CCHR
VMS only
When INFO is installed, the default character settings are :
KEEP = Dec 12 (Ctrl-L)
CLEAR
TAB
= Dec 16
= Dec 09
BACKTAB = \ 92
TRUNCATION = ! 33
(Ctrl-P)
(TAB key)
(\ key)
(! key)
PRIME only note discussion
When INFO is installed, the default settings are :
KEEP = 129 (Ctrl-A)
CLEAR
TAB
= 130
= 137
BACKTAB = \ 220
TRUNCATION = ! 161
(Ctrl-B)
(TAB key)
(\ key)
(! key)
The above characters are the decimal equivalent of the octal values of the numbers
The CCHR settings are named for their default ASCII control character values. These settings are used during
INPUT FORM, ALTER, ADD and UPDATE processing as described below.
n
<KEEP>, or setting, is used during execution of INPUT
FORM and ALTER.
For INPUT FORM, it is used to skip (to move the terminal screen cursor) to the end of the form without changing any remaining field values.
For ALTER, it is used to accept the current values for all remaining record item characteristics and return to ENTER
COMMAND > level.
n
<CLEAR>, or setting, is used with the INPUT FORM command to skip to the end of the form while filling all remaining fields with appropriate null values (blanks or zeros).
62 Commands INFO Reference Manual
CCHR
n
<TAB> is used with the INPUT FORM command to skip ahead one field without changing the value of the current input field.
n
<BACKTAB>, or backslash character (\), is used with the
INPUT FORM, ADD and UPDATE commands.
For INPUT FORM, it is used to skip back one field without changing the value of the current field.
For ADD and UPDATE, it is used when INFO prompts for individual items to display the value of the previous item, with a prompt for you to re-enter a value. This allows you to change the last value entered. Once you re-enter the changed value, INFO again prompts for the next item.
n
<TRUNCATION> is used in specifying “wild-carded” word items in word expressions. (INFO-Text only).
You can process the CCHR command in one of three ways: n
Enter only the command CCHR with no control characters.
INFO displays the current <KEEP> setting and waits for you to respond. If you press <RETURN>, INFO leaves the current setting unchanged; if you enter any other character, INFO changes the current setting to the specified character. INFO then displays the current setting of the <CLEAR> control character and again waits for a
<RETURN> or replacement character. INFO proceeds in this way for the <TAB> , <BACKTAB> and
<TRUNCATION> control settings, and then returns you to
ENTER COMMAND > level.
n
Enter the command CCHR followed by the character values which correspond to the settings you wish to change. Separate setting characters with commas. To skip over one of the character values — that is, to leave it unchanged — enter an extra comma to correspond to the position of the character. For example, to leave only the
TAB character unchanged, you might enter CCHR X,Y,,Z.
After you enter the CCHR command, INFO displays the new settings.
INFO Reference Manual Commands 63
CCHR example
n
Enter the command CCHR followed by four commas.
INFO displays the current values of all four settings.
Note: When changing the CCHR settings, under Unix and
VMS you may enter either the character itself or its decimal value. On PRIME, you must enter the character itself.
A CCHR command dialog in which you change CCHR settings might look like this:
ENTER COMMAND >CCHR
THE CURRENT CONTROL CHARACTERS ARE:
KEEP = Dec 01 ><CONTROL><X>
Changes <KEEP>
CLEAR = Dec 02 ><CONTROL><Y>
Changes <CLEAR>
TAB
BACKTAB
= Dec 09 ><RETURN>
= \ 92 >
<
TAB> unchanged
Changes<BACKTAB>
TRUNCATION = ! 33 ><RETURN>
TRUNCATION unchanged (INFO-Text only)
ENTER COMMAND>CCHR
THE CURRENT CONTROL CHARACTERS ARE:
KEEP = Dec 24 >
CLEAR
TAB
BACKTAB
= Dec 25 >
= Dec 09 >
= \ 92 >
64 Commands INFO Reference Manual
CHANGE
CH
ANGE IF_name
PG_name
RP_name
SF_name
[
[
S
D
MART]
UMB] file_path
S
YSTEM [
P
RINT]
[
P
RINT]
CH
ANGE
changes the content of any ASCII text file or INFO source file, that is, a program, report, special form, or input form. CHANGE is synonymous with ED and is a line editor
arguments
IF_name | PG_name | RP_name | SF_name the INFO file to be changed.
[SMART | DUMB] you can tell INFO to verify or not to verify changes to the file.
SMART directs INFO to verify that inserted lines and changed text are valid for the current report, program, input form, or special form. SMART is the default mode for the CHANGE command, except when you also specify the SYSTEM option.
If you try to insert an invalid new line, INFO rejects the line and issues an error message. If you change text on an existing line so that the command is invalid, INFO aborts the change process and issues an error message.
In addition, INFO ensures that changes to a program do not violate program section boundaries, and that changes to a report do not violate column content and heading correspondence.
DUMB directs INFO not to verify any modified or inserted text during CHANGE execution. DUMB is the default mode when you use CHANGE to edit system files.
[PRINT] sends a copy of the source file to your spool file
before you make any changes to it. If you include the
PRINT option for an ASCII file, INFO assumes that all data in the file is printable; it does not perform any data conversion before printing.
INFO Reference Manual Commands 65
CHANGE
file_path the full system pathname of an ASCII file.
SYSTEM indicates that the specified file is an ASCII text file.
notes discussion
n
Before you use the INSERT or REPLACE requests on a source file, be sure to take the following steps:
1) Format any of the system variables, $CHR#, $DAT#, and
$NUM#, that are referenced in the source file (see the
FORMAT command for instructions to do this).
2) Relate all data files to be used when the source file is executed, in the order in which they were related when the source file was defined.
n
Note that if you save the move or copy range of a program file to an INFO file, INFO creates a directory entry for the saved file and generates a PROGRAM SECTION ONE statement at the beginning of the saved file. If the first saved statement is an even-numbered program statement,
INFO generates a PROGRAM SECTION TWO statement immediately following the PROGRAM SECTION ONE statement. If you save to an ASCII file, INFO does not perform any validity checking on the saved file.
n
Be careful if you change an ASCII text file that contains
INFO program or report text that you want INFO to use subsequently. If you use the CHANGE command to edit the file, INFO does not perform any validity checking on lines in the file. You must ensure that the format and syntax of the program/report lines are correct.
In the following discussion, the term source file means an
INFO program, report, special form, or input form. Unless otherwise specified, all CHANGE options apply to each of the four INFO source files.
When you enter a CHANGE command, INFO starts a dialog with the prompt ENTER OPTIONS>. You can then make changes to the file using one of the CHANGE options. See 'Table CHANGE-1, Change options'.
66 Commands INFO Reference Manual
CHANGE
Many of the CHANGE options reference the current line of the source file. When INFO first begins the CHANGE dialog, it considers the current line to be the top of the file, just before the first line, and displays BEGINNING OF
FILE. Subsequent options cause INFO to point to other lines as current. REPLACE, CHANGE, COPY, DELETE and MOVE first affect the current line. The options that involve putting lines between existing lines, like INSERT,
LOAD and the second phase of COPY or MOVE, insert immediately after the current line.
To stop the CHANGE processing, use the Q (quit) option to save all the changes you requested and return you to
ENTER COMMAND >. You can also use the K (kill) option to stop editing without saving any of the changes.
SPECIAL CONSIDERATIONS when changing
INFO source files when replacing or inserting lines
When changing any INFO source file, use any of the options described in Change-1 to change the contents of the source file. You can request that the CHANGE session operate in SMART or DUMB mode.
When you issue an unqualified REPLACE for any source file, or you request an unqualified INSERT for a program, input form, or special form, INFO prompts with ENTER
TEXT:
When you issue an unqualified INSERT for a report, INFO issues a prompt appropriate to the current line for the file:
ENTER COLUMN CONTENT>, if the current line is a heading line, or ENTER COLUMN HEADING>, if the current line is a report item definition.
In any of the above cases, enter your changes or a
<RETURN> to abort the request and return to the ENTER
OPTIONS> prompt.
INFO Reference Manual Commands 67
CHANGE when revising programs when revising reports
When you change a program, INFO automatically renumbers the lines in the program on leaving the
CHANGE editor. These numbers do not affect program execution. They are strictly for reference. After inserting lines in a program and when the mode setting is SMART,
INFO ensures that the odd/even program section sequence is still correct. If necessary, INFO inserts a
PROGRAM SECTION statement to maintain the odd/even program section sequence.
If you want to insert lines before the first existing program line, specify TOP, then INSERT. INFO generates a
PROGRAM SECTION ONE statement before the inserted lines and deletes the original PROGRAM SECTION ONE statement.
If you repeatedly try to point beyond the last line, INFO might alter the number of the last line. However, this cannot affect how the program works, and INFO renumbers the program the next time you issue a
CHANGE command.
INFO saves each column definition on two lines in the report file. The first line includes spacing instructions, column content, and any specified options. The second line includes all the elements of the column heading.
INFO preserves this separation when you use the
CHANGE editor.
When you enter a new report line using the INSERT or
REPLACE option, INFO takes you through a dialog parallel to column definition. The prompts you receive depend on your location in the report. Remember that
INSERT starts inserting after the current line.
If the current line is a column heading, or a column definition that appears in the second or subsequent line of the report, INFO first prompts with ENTER COLUMN
CONTENT>. Respond by entering an item name, text string, arithmetic expression, space saver, tab indicator, or equal sign (=), as described in the REPORT command.
68 Commands INFO Reference Manual
CHANGE
Because only the first line of a multi-line report can have column heading information defined for each report item,
INFO ensures that any changes you make do not affect this sequence, as follows:
1) If you replace an existing column definition line with an equal sign to begin a new report line, INFO deletes all column-heading lines that follow the replaced line.
2) If you replace the first existing equal sign with a report item definition to lengthen the first line of the report, INFO inserts blank column-heading lines for each column definition line that follows the replacement line until it encounters a line break (an equal sign).
To avoid getting the next ENTER REPORT OPTIONS> prompt, place a comma at the end of your column content response.
If you do not terminate the previous entry with a comma,
INFO prompts with ENTER REPORT OPTIONS>. Follow the REPORT command instructions for entering options.
If the current line is on the first line of the report, you get the ENTER COLUMN HEADINGS> prompt.
If the current line is a column definition on the first line of the report, INFO first prompts ENTER COLUMN
HEADINGS>. Enter a new heading for the column, following the rules or the REPORT command.
You can enter <RETURN> to request that INFO not change the headings. If you do this, INFO tries to fit the headings to the column width if that has been changed. If the headings are wider than the new column width, INFO truncates the right-hand characters from the headings.
If your report width changes, INFO recentres the title to fit the report. If you want to change the title, position the cursor to the title line and use the CHANGE or REPLACE options to make the desired changes. You cannot change the number of lines in a report title by deleting or inserting lines, or by inserting an equal sign specification within the existing title.
INFO Reference Manual Commands 69
CHANGE when moving or copying lines
When you request a MOVE or COPY option during a
CHANGE command, you must first indicate the range of lines to be moved or copied Use the positioning options to locate the first line you want to move or copy. Then follow either of these two procedures to indicate the last line to be moved or copied:
1) Issue the MOVE or COPY option and specify the number of lines or a search string to delineate the end of the range. INFO marks the current line as the starting line of the move/copy range and locates the ending line using the specified number or search string.
or
2) Issue an unqualified MOVE or COPY option. INFO marks the current line as the starting line and prompts you to indicate the ending line, as follows: MOVE WHAT> for a move request, or COPY WHAT> for a copy request. Use the positioning options to locate the last line to be moved or copied, and then enter another unqualified MOVE or
COPY option. INFO marks the located line as the ending line. If you try to mark a line that precedes the starting line as an ending line, INFO issues an error message and returns you to the ENTER OPTIONS> prompt. You cannot move or copy title lines in a report; if you try to do so, INFO issues an error message and aborts the request.
After you indicate the range of lines, INFO prompts MOVE
TO WHERE> for a move request, or COPY TO WHERE> for a copy request. Again use the positioning options to locate the target line for the move or copy operation. The target line can be anywhere in the file, except within the range of lines to be moved or copied. When you locate the target line, enter another unqualified MOVE or COPY, and INFO completes the operation.
In response to the prompt for the target location, or at any time after INFO issues the prompt but before you mark the target line, you can enter the SAVE option to save the range of lines marked for the MOVE or COPY option. Use the SAVE option as described in Table CHANGE-1, except that you must specify an INFO or an ASCII text file name; you cannot enter an unqualified SAVE command in this instance.
70 Commands INFO Reference Manual
CHANGE
If you save the move/copy range of a report to an INFO file, INFO creates a directory entry for the saved file that has the same attributes and contains the same report definition information as the report file from which you issue the SAVE option. If you send the saved information to an ASCII text file, INFO cannot create a directory entry for the file that contains the report attributes. See
'Considerations when using ASCII text files' in this command reference for information about using reports from system text files.
After moving or copying program lines, INFO determines whether or not to generate or delete PROGRAM SECTION statements to preserve the odd/even program section sequence as follows:
1) Following a move, INFO checks the statements at the beginning and end of the moved text at the target location, and the statements remaining at the source location. If necessary, INFO generates or deletes a PROGRAM
SECTION statement at these locations.
2) Following a copy, INFO checks the statements at the beginning and end of the copied text. If necessary, INFO generates or deletes a PROGRAM SECTION statement at the two locations.
1) Following a move or copy operation within a program file, the program line numbers may be out of sequence. INFO renumbers the program when you end the CHANGE session. Alternatively, you can issue the SAVE option;
INFO renumbers the program lines when it processes the
SAVE.
After moving or copying report lines, INFO checks to ensure that report item definitions and column headings are sequenced properly. If necessary, INFO generates or deletes column heading lines, as follows:
1) If INFO finds a report item definition line without a column heading in the first line of the report, INFO adds a blank column heading line for that report item line.
INFO Reference Manual Commands 71
CHANGE
2) If INFO finds a report item definition line with a matching column heading line following a line break, INFO deletes the column- heading line.
3) If INFO finds a column heading line without a matching report, item definition line, INFO deletes the column heading.
When INFO generates or deletes lines, it issues an error message warning you to examine the file to see if further editing is necessary.
You can terminate the move/copy request at any time with the KILL option.
when loading from a file
When processing the LOAD option in DUMB mode, INFO does not verify the lines loaded. When loading a file in
SMART mode, INFO verifies each line of the file. If
INFO finds an invalid line, it aborts the load request and issues an error message, leaving the file you wanted to change in the condition it was before you issued the LOAD option.
When loading a program, INFO examines the first and last of the loaded lines to ensure correctness of the odd/even section sequence. If necessary, INFO generates or deletes a PROGRAM SECTION statement at the two locations.
When loading a report, INFO loads only report itemdefinition and column heading lines; it ignores title lines.
INFO checks that report item definitions and column headings are in proper order, as described under
'Considerations when revising reports'. If necessary, INFO generates or deletes column heading lines, as follows:
1) If the target location for the load is in the first line of the report, that is, before an equal sign (=), INFO adds a blank column heading line for any loaded report item definition line that does not have a column heading line.
2) If the target location for the load is in the second or subsequent line of the report, that is, after an equal sign
(=), INFO does not load any column heading lines into the file you are changing.
72 Commands INFO Reference Manual
CHANGE when using
ASCII text files
When using the CHANGE command with an ASCII text file, INFO operates in the DUMB mode. You cannot specify the SMART mode in this situation. Use any of the options in Table CHANGE-1 to change lines in the text file. Text file names cannot be longer than 32 characters.
If you want INFO to use a program or report that exists in a text file, you must take the following steps to load the text file into an existing INFO file:
1) Create an INFO source file of the same type (such as program or report) as the ASCII text file. The source file can contain commands. Use the PROGRAM command to create a program file or the REPORT command to create a report file, following the instructions for those commands. If you use an INFO report file that contains an existing report definition, it must reference the same data file items as the report to be loaded from the text file.
2) Enter the CHANGE command and the INFO program or report file.
3) Use the LOAD option to load the text file into the
CHANGE file.
4) Perform any necessary edits.
5) Use the QUIT option to exit the CHANGE session.
You can now request that INFO execute the program or report.
INFO Reference Manual Commands 73
CHANGE example
In the example below, the program called PB.RUN.REP, which now produces the report RP.STATUS, is changed to produce the report RP.YTD.SALES.
ENTER COMMAND CHANGE PB.RUN.REP
ENTER OPTIONS>P 25
BEGINNING OF FILE
10000 PROGRAM SECTION ONE
10001 SELECT DF.SALES RO
Display 25 lines.
.
.
.
10010 REPORT RP.STATUS Y 60
10011 DISPLAY =
10012 DISPLAY AT 10,20 ‘READY TO SPOOL’
10013 ELSE
10014 IF $CHR1 = 'N'
10015 REPORT RP.STATUS N/W 23
10016 ELSE
10017 GOTO RETRY
10018 ENDIF
10019 ENDIF
END OF FILE
ENTER OPTIONS>T
BEGINNING OF FILE
ENTER OPTIONS>F 10010
Position to top of file
Find line 10010
10010 REPORT RP.STATUS Y 60
ENTER OPTIONS>C /STATUS/YTD.SALES/6
10010 REPORT RP.YTD.SALES Y 60
Search the next 6
lines
for the
10015 REPORT RP.YTD.SALES N/W 23
value STATUS and
ENTER OPTIONS>Q
change it to
YTD.SALES
74 Commands INFO Reference Manual
CHANGE
Table CHANGE-1 Change options
Option syntax
A
B
PPEND [string]
OTTOM
C HANGE [options]
Unless noted otherwise, source file, as used below, refers to an INFO program, report, special form, or input form.
Description of function performed
Append text. Requests that INFO append text to the end of the current line.
If you include the string specification, INFO appends the string contents to the end of the current line. String can be any combination of characters, separated from the APPEND option by one space; if you enter two spaces following the APPEND, INFO assumes that the second space is the first character of the string.
If you do not include the string specification,
INFO prompts you to ENTER TEXT>.
Respond by entering the string contents you want appended to the current line. The length of a source file line following the append operation cannot exceed the maximum command length for your operating system.
Locate Bottom. Points to below the last line in the file and displays the END OF FILE message.
Change text. Changes the value of a text string in the current line. If the
C
request is entered alone, INFO prompts
FROM>
and waits for you to enter the string you want to change.
Once you enter the string, INFO prompts
TO> and waits for you to enter the new string. The following dialog changes $NUMS:
ENTER OPTIONS>C
FROM>$NUMS
TO>$NUM1
INFO Reference Manual Commands 75
CHANGE
Table CHANGE-1
Option syntax
Change options (cont'd)
Description of function performed
You can also enter all of the command specifications on a single line. When you use this option, you can also specify:
1) the number of lines INFO should search for the FROM text
2) whether to change only the first instance of the string in the searched lines or to change all instances of that string
To enter the command in this way, follow the syntax below:
C/old-text/new-text[/[line-count] [G]] where: n old-text and new-text are the string to be replaced and the replacement string, respectively.
n
Line-count is an integer that tells INFO how many lines to search for the old-text. If a linecount is not entered, the other specifications apply only to the current line.
n requests that INFO globally change all old-text strings in the file. If
G
is not entered, INFO only changes the first occurrence of the old-text in each line.
To separate the old and new text, instead of the slash (/), you can use any character (except a blank space) that does not appear within either string.
76 Commands INFO Reference Manual
Table CHANGE-1
Option syntax
CO PY [# | string]
DE LETE[#]
F IND # the
(programs only)
CHANGE
Change options (cont'd)
Description of function performed
Copy line(s). Requests that INFO copy the number of lines indicated to another location in the file, leaving the source lines intact in their current location. If you specify #, where # is a positive integer, INFO copies the number of lines indicated, beginning with the current line.
If you specify string, where string is any combination of characters separated from the
COPY request by one space, INFO copies text from the current line to the first line containing the string value. If INFO cannot locate a line containing the specified string, it issues an error message and aborts the COPY request.
If you do not include the # or string specification, INFO prompts you to mark the lines to be copied, as discussed in
'Considerations when moving or copying lines'.
Delete line(s). Deletes the current line in the file or, if the # specification is provided, where
# is a positive integer, deletes # lines from the file, starting with the current line. Moves to the next available line and displays that line at the terminal. If the value of # exceeds the number of lines left in the file, INFO deletes all remaining lines and displays the message END
OF FILE. The # specifier must be a positive integer.
Find program line. Locates the line that has line specified by #, where # is within 100000 of the current line. Moves to the new line and displays that line at the terminal. To find a line more than 100000 lines away, use repeated F requests.
INFO Reference Manual Commands 77
CHANGE
Table CHANGE-1
Option syntax
I NSERT[string]
K ILL
Change options (cont'd)
Description of function performed
Insert line(s). Requests that INFO insert one or more lines following the current line. If you include the string specification, INFO inserts the specified line of text following the current line and moves to the newly inserted line.
String can be any combination of characters, separated from the INSERT request by one space. If you enter two spaces following
INSERT, INFO assumes that the second space is the first character of the string. If you do not include the string specification, INFO prompts you to ENTER TEXT:.
You can enter any number of new lines after the ENTER TEXT
:
prompt. If you are changing a program or text file, enter the lines together following the initial prompt; for the other types of files, INFO prompts separately for each line.
When you are finished, enter <RETURN>.
Make sure that the new lines are consistent with the type of source file being processed, and that they follow all rules regarding that source file. At the end of an INSERT, INFO moves to the last line entered.
Kill the CHANGE session. Ends the CHANGE session without updating the file; any changes made since you issued the CHANGE command will be lost. If you changed the file, INFO prompts: DO YOU WISH TO CONTINUE (Y
OR N)>. Respond Y (yes) to abort the session and return to the ENTER COMMAND > prompt. Any other response aborts the KILL request and returns you to the ENTER
OPTIONS> prompt.
78 Commands INFO Reference Manual
Table CHANGE-1
Option syntax
Change options (cont'd)
CHANGE
Description of function performed
L OCATE string
LO AD file-name
Locate string value. Searches forward in the file, starting with the next line, until it finds a line that contains the value of the string argument. Moves to the located line and displays that line. String is separated from the
LOCATE request by a space.
Load from specified file. Requests that INFO insert records from the specified file immediately following the current line. Records in this case refer to lines from the specified file.
If positioned at the top of the file, INFO loads the requested file before the first line of the
CHANGE file; if positioned at the bottom of the file, INFO loads the requested file after the last line of the CHANGE file. Alternatively, you can specify loading from an ASCII text file, limit the number of records loaded, or request that INFO load a specified INFO file from another INFO user area using the following syntax:
LOAD <file_name> [beg_rec_#[
, end_rec_#]] [FROM user_name] or
LOAD <file_path SYSTEM>[beg_rec_#[
, end_ rec_#]] where: n file_name is the name of the INFO file you want loaded into the CHANGE file. Note that the file must exist in your INFO user area and must be the same file type as the CHANGE file.
n file_path SYSTEM is the name of the ASCII text file from which you want to load records.
You must include the word SYSTEM to indicate that the file is a system file rather than an INFO file.
INFO Reference Manual Commands 79
CHANGE
Table CHANGE-1
Option syntax
Change options (cont'd)
Description of function performed n beg_rec_# and end_rec_# are optional specifications that identify the numbers of the first and last records to be loaded from the file.
If you include a beg_rec_# without an end_rec_#, INFO loads records from the starting record to the end of the file. If you do not include beginning or ending record numbers, INFO loads the entire contents of the specified file.
MOD E[SMART | DUMB]
MO VE[# | string] n
FROM user_name is an optional specification that applies only to INFO files and directs INFO to search the specified INFO user area for the file.
See 'Considerations when loading a file' for more information about the LOAD request.
Switch mode setting. Requests that INFO change or display the mode in which the
CHANGE command is operating. If you include a SMART or DUMB request, INFO establishes that mode immediately. If you issue an unqualified MODE request, INFO displays the current mode setting.
Move line(s). Requests that INFO move the number of lines indicated to another location in the file and delete the source lines from their original location following the move. If you specify #, where # is a positive integer, INFO moves the number of lines indicated, beginning with the current line. If you specify string, where string is any combination of characters separated from the word MOVE by one space,
INFO moves the lines beginning with the current line and ending with the first line containing the string value. If INFO cannot locate a line containing the specified string, it
80 Commands INFO Reference Manual
Table CHANGE-1
Option syntax
N EXT [#]
P RINT [#]
PO INT #
INFO Reference Manual
CHANGE
Change options (cont'd)
Description of function performed issues an error message and aborts the MOVE request. If you do not include the n or string specification, INFO prompts you to mark the lines to be moved, as discussed in
'Considerations when moving or copying lines'.
Point to Next line. Points to the next line, or, if the # specification is provided as a positive or negative integer, to the line that is +# or -# lines from the current line. Displays the new line at the terminal. The value of # defaults to
1.
If a NEXT -# request would point above the top of the file, INFO moves to the line before the first line and displays the message
BEGINNING OF FILE.
If a NEXT # request would point below the last line of the file, INFO moves to the last line and displays the message END OF FILE.
Print line(s). Displays the number of lines specified by # at your terminal, beginning with the current line. Specify # as a positive integer. If you do not include the # specification, INFO displays the current line.
After printing, the last line printed is the current line. If the number of lines specified by # is greater than the number of lines in the file,
INFO moves to the last line in the file and displays the message END OF FILE.
Point to specified line. Points to the line specified by # where # is a positive integer
(including 0). INFO moves to the requested line and displays that line. If you specify # as
0, INFO moves in front of the first line and displays the message BEGINNING OF FILE.
Commands 81
CHANGE
Table CHANGE-1
Option syntax
Q UIT
R EPLACE [string]
S AVE
Change options (cont'd)
Description of function performed
If you specify # as greater than the number of lines in the file, INFO moves beyond the last line in the file and displays the message END
OF FILE.
Quit the change dialog. Saves all of your changes, exits from the CHANGE processing and returns you to ENTER COMMAND >.
Replace line. Requests that INFO replace the current line. If you include the string specification, INFO replaces the current line with the string contents.
string can be any combination of characters, separated from the keyword REPLACE by one space. If you enter two spaces following the
REPLACE request, INFO assumes the second space to be the first character of the string. If you do not include the string specification,
INFO issues a prompt for a new line that replaces the current line.
In this case, enter the new line. Unlike the
INSERT request, you can enter only one line here. If you are changing a form, make sure that the new line is consistent with the type of form being processed and that it follows all rules regarding that form. To abort the replace request, enter a <RETURN>. At the end of a
REPLACE, INFO points to the new line.
Save file. Directs INFO to save the current contents of the CHANGE file, except as discussed below for a MOVE/COPY request, using the following syntax:
SAVE [file_name | file_path SYSTEM]
82 Commands INFO Reference Manual
Table CHANGE-1
Option syntax
CHANGE
Change options (cont'd)
Description of function performed where file_name is the name of an INFO or
ASCII text file. If you do not include the file_name specification, INFO saves the current CHANGE file contents into the original file. If file name or file path is a text file, you must include SYSTEM; otherwise, INFO assumes the requested file is an INFO file. If the requested file name does not exist, INFO creates and opens a new file by that name. If the requested file name exists but is not the same type of file, INFO displays an error message and aborts the SAVE request. If the requested file name does exist and is the same type of file, INFO prompts you:
OK TO OVERWRITE OLD COPY>.
Respond Y (yes) to request that INFO overwrite the specified file with the current CHANGE file contents; otherwise, enter N (no) or
<RETURN> to abort the SAVE request.
Following successful completion of the SAVE operation, INFO ends the CHANGE session and returns to the ENTER COMMAND > prompt. If the CHANGE file is a program,
INFO renumbers the program lines.
During a MOVE or COPY request, after you have marked a range of lines to be moved or copied, but before marking the target location, you can enter a SAVE request to save the range of lines marked for the MOVE/COPY request. Use the SAVE option as described above, except you must specify an INFO or text file name; you cannot enter an unqualified
SAVE request in this instance.
INFO Reference Manual Commands 83
X
CHANGE
Table CHANGE-1
Option syntax
T OP
<RETURN>
see also
Change options (cont'd)
Description of function performed
Locate Top. Points to the line before the first line in the file. INFO displays the message
BEGINNING OF FILE.
Re-executes the previous CHANGE command.
e.g.
P 23 display 23 lines
X display next 23 lines
N -5 re-position 5 lines back
X re-position a further 5 lines back
Point to next line or return to the ENTER
OPTIONS> prompt. When entered in response to the ENTER OPTIONS> prompt, directs
INFO to point to the next line in the file. During
CHANGE option processing, such as an
INSERT or SAVE request, exits the current option and returns to the ENTER OPTIONS> prompt.
EDIT
84 Commands INFO Reference Manual
CHECK
CHEC
K [item-name]
allows a user to see if the spool file is in use upon entry into INFO
arguments discussion
item-name is the optional numeric internal variable to receive the return code. If omitted, $NUM40 will be used.
This command is useful for verifying that a user has access to a spool (XXXNSP) file when in INFO. The named item is set to 1 if a spool file is not open on logical unit 8 where it should normally be. This may happen upon entry into INFO if another user has the spool file open because of his/her prior entry into the same INFO directory.
example
10000 PROG PROFILE
10001 CHECK
10002 IF $NUM40 NE 0
10003 Q STOP
10004 ENDIF
10005 .....
INFO Reference Manual Commands 85
CLAC
CLAC
item-1 item-2
Classify Character Variable classifies a given character string by its contents
arguments note discussion
n
Use ENCODE to classify a character field as numeric or date.
This command examines contents of item-1 and returns classifications in item-2. The contents of item-2 are not changed.
item-1 contains
“ ” (space)
item-2
0
A-Z
A-Z, “ ”(space)
A-Z,0-9
A-Z,0-9,“ ”(space) other
1
2
3
4
5
examples
item-1 a character system-variable, system-item or string literal.
item-2 a numeric system-variable or system-item.
CLAC ‘ABCD’ $NUM40
DISPLAY $NUM40
1
FO $CHR1,8
$CHR1 = ‘AB 89’ $NUM40
DISPLAY $NUM40
4
$IDX2 = 1
$WORK-BUFF = ‘AB12 !’
CLAC $WORK-BUFF $WORK-INT
DISPLAY $WORK-INT
5
INFO Reference Manual Commands 87
CLAC error message see also
INVALID SYNTAX will occur if file items are used.
ENCODE
88 Commands INFO Reference Manual
CLEAR
CLEA
R
clears all internal variables ($CHR#, $NUM# and $DAT#, where # is 1-40) to nulls
INFO Reference Manual Commands 89
CNAME
CNAM
E from_filename to_filename [pathname]
allows the user to change the name of a SYSTEM file to which he/she has access
arguments
from_filename is the name of the operating system level file you wish to change.
to_filename is the name you wish to change the operating system level file to.
pathname is the directory the file is on - the default is the current directory.
notes discussion
n from_filename and to_filename are entered as literals without quotes n
(VMS only) it is possible to specify a version number against the filenames, if none is specified, all versions will be processed.
n
If the pathname is omitted then the from-file is assumed to be in the current directory
INFO Reference Manual Commands 91
COMINPUT
CO
MINPUT path_name
CONT
INUE
PAUSE
TTY
used to direct, redirect and otherwise control the flow of INFO command input.
arguments notes
path_name must refer to an ASCII text file in the INFO directory of your current workspace. path_name can include global variables.
CONTINUE resumes reading command input from a previously suspended COMINPUT file (see the description of the PAUSE option just below). The command stream resumes with the command following the COMINPUT
PAUSE command in the suspended COMINPUT file.
PAUSE suspends processing of the COMINPUT file and redirects the command input to come from your terminal.
A subsequent COMINPUT CONTINUE command resumes reading the command input from the suspended
COMINPUT file.
TTY closes the COMINPUT file and redirects command input to come from your terminal. A COMINPUT TTY command can occur anywhere in a COMINPUT file; however, you can only issue the COMINPUT TTY command from your terminal after the file has ended and the host system has passed control back to the terminal.
n
The COMINPUT command may function differently on different computer systems. For this reason, be careful when using it in applications that might be moved to different types of hardware.
n
The file the commands are taken from must exist in your current operating system directory.
INFO Reference Manual Commands 93
COMINPUT discussion
n
If the CO command is used in a program, it is not executed until the program has finished, regardless of where it is in the program.
n
INFO also accepts a dash (-) in front of CONTINUE,
PAUSE and TTY.
The COMINPUT command, when used interactively, directs INFO to begin accepting commands from a file
(called a COMINPUT file) instead of from your terminal.
You specify an existing ASCII text file in the COMINPUT command line, and INFO begins to read INFO commands from that file. This COMINPUT file should contain a series of INFO commands, one command per line in the file. INFO reads commands from this file until it reaches the end of the file or a COMINPUT TTY command.
You can include COMINPUT commands within a
COMINPUT file to redirect command input to come from the terminal temporarily (with the PAUSE option) or permanently (with the TTY option).
examples
On the following page is a listing of an ASCII text file called example.cmi, which contains INFO commands, and an example of how this file can be executed from within INFO using the COMI command.
94 Commands INFO Reference Manual
COMINPUT example.cmi
SELECT DF.SALES
DISPLAY SALES.REP
RUN PG.STATUS.REP Y 60
COMI TTY
ENTER COMMAND >COMI EXAMPLE.CMI
ENTER COMMAND >SELECT DF.SALES
25 RECORD(S) SELECTED
ENTER COMMAND >DISPLAY SALES-REP
HARVEY
JACK
JILL
TODD
ROD
COMI file execution begins here
ENTER COMMAND >RUN PG.STATUS.REP Y 60
ENTER COMMAND >COMI TTY
ENTER COMMAND >
Last command in the COMI file.
You can now enter an INFO command at your terminal.
INFO Reference Manual Commands 95
COMOUTPUT
COMO
UTPUT path_name
-E
ND
creates an ASCII text file in which INFO records everything that is displayed at your terminal during your INFO session.
arguments
path_name is the name of a file that will be created in the directory of your current workspace. It can include global variables.
-END closes the current COMO file.
notes discussion
n
The COMOUTPUT command may function differently on different computer systems. For this reason, be careful when using it in applications that might be moved to another manufacturer's computer. For instance, on the
Prime, the response to any system command issued from within INFO (with SPAWN or
•
) is written to the como file, but not on UNIX or VMS. Also, the dash (-) in front of
END is obligatory on Prime, but optional on UNIX or VMS.
n
Make sure you close your COMOUTPUT file; otherwise, the file becomes large very quickly. The file remains open until you issue a COMOUTPUT -END command, you issue a COMOUTPUT command specifying another file, or you exit INFO (except on Prime).
You can use the COMOUTPUT command to open, and at some later time to close, an ASCII text file in which INFO records everything that is displayed at your terminal during your INFO session. This COMOUTPUT file receives a copy of all prompts, responses and other messages that are displayed at your terminal, whether they originate from interactive usage of INFO or from execution of INFO programs.
Note that all INFO prompts and all your responses processed while using a COMINPUT file are displayed at the terminal and, therefore, recorded in the COMOUTPUT file.
INFO Reference Manual Commands 97
COMOUTPUT
COMOUTPUT operates independently of the commands
COMINPUT, OUTPUT, LOG and SPOOL. While the displays associated with these commands are logged to the COMOUTPUT file, the data these commands generate is routed as usual.
If you issue a second COMOUTPUT command specifying a second COMOUTPUT file, INFO terminates logging to the first COMOUTPUT file before logging to the second
COMOUTPUT file. If the first and second COMOUTPUT files are the same file, or if a second COMOUTPUT file specified already exists, INFO overwrites the existing file.
INFO never appends information to a COMOUTPUT file.
example see also
ENTER COMMAND >COMO TEST.COMO
ENTER COMMAND >DISPLAY 'WELCOME TO INFO!'
WELCOME TO INFO!
ENTER COMMAND >COMO —END
If you send TEST.COMO to your printer, the output looks like this:
ENTER COMMAND >DISPLAY 'WELCOME TO INFO!'
WELCOME TO INFO!
ENTER COMMAND >COMO —END
LOG
98 Commands INFO Reference Manual
COMPILE
COMP
ILE PG_name
IF-name
RP_name
SF_name
[
[
L
P
IST]
RINT] [
[
S
INGLE]
LOCAL
]
prepares an INFO source file for execution. All source files must be compiled before they can execute.
arguments notes
PG_name an INFO program.
IF_name input form name.
RP_name report name.
SF_name special form name.
LIST displays each line of your source file on the terminal screen as it is compiled. This can also be achieved by setting the INFO system variable $LISTON to 1.
PRINT sends the compiled program with any accompanying messages from the COMPILE command to your spool file.
SINGLE compiles the specified program and programs that are RUN LINK within it.
LOCAL compiles the specified program and input forms, special forms, reports and programs that are RUN LINK within it.
An unqualified COMPILE on a program compiles all programs, input forms, special forms and reports called within it.
n
Before you compile a program, you must take the following steps:
1) If your program assumes a specific format for one or more
INFO system variables, you must format them, before you compile the program, to correspond to their first use in the program. Don't do this if the program itself formats the system variables.
INFO Reference Manual Commands 99
COMPILE discussion
Input forms, special forms
and reports
2) Select and relate all data files in the order in which they will be selected and related when the program begins execution. Don't do this if the program itself performs these steps.
If you do not take these steps, INFO misinterprets the program and displays error messages.
n
With INFO's RUN command, you specify an INFO program to execute. If you issue a RUN command for a program that has not been compiled, INFO compiles the program before executing it. However, using the RUN command to compile a program is an inefficient use of resources and is not recommended. If, in response to a
RUN command for a program needing compiling, INFO finds errors in a program during compilation, INFO does not allow the program to begin execution.
n
If $DECODE-EXT-PG is set to 1 (default = 0) COMPILE will ignore decoded external programs, forms and reports.
The COMPILE command prepares an INFO program for subsequent execution. When using the COMPILE command, INFO checks the program for errors and displays appropriate error messages or displays an
ERRORS = 0 message.
If you write an INFO program that RUNS other INFO programs within it, the COMPILE command compiles and checks those programs as well. You can compile up to
1000 nested programs with one COMPILE command.
Input Forms, Special Forms and Reports can be compiled interactively, but all referenced files must be selected and related and all referenced variables formatted correctly.
When a program is compiled, it will also compile all forms and reports referenced in it, except when the SINGLE option is specified, rather like RUN prog LINK programs.
In addition to this program and form execution statements can be traced, and the tracing is set on either by RUN ...
LIST or COMP ... LIST or by using the systems item
$LISTON.
100 Commands INFO Reference Manual
example
COMPILE
$LISTON = 0 trace off.
$LISTON = 1 trace to screen — in input forms will trace the statements to the $ERROR-POSITION.
$LISTON = -1 trace statements to the print file (as RUN
PRINT does).
$LISTON can be set anywhere and so turned off or on at will.
If you issue a COMPILE command without options, your screen displays the name and current status of the program(s) being compiled. In the example below, programs PG.UPD.TIMESHEET and PG.MENU are compiled, as are any special forms, input forms and reports called by the programs.
ENTER COMMAND >COMPILE PG—UPD—TIMESHEET
COMPILING PG: PG—UPD—TIMESHEET
COMPILING SF: SF—UPD—TIMESHEET
END SF: SF—UPD—TIMESHEET
Level 0
Level 1
Errors = 0
Level 1 COMPILING IF: IPF—UPD—TIMESHEET
END IF: IPF—UPD—TIMESHEET
COMPILING RP: RP—UPD—TIMESHEET
END RP: RP—UPD—TIMESHEET
COMPILING PG: PG—LINK
END PG: PG—LINK
Errors = 0
Level 1
Errors = 0
Level 1 Link
Errors = 0
COMPILING PG: PG—MENU
END PG: PG—MENU
END PG: PG—UPD—TIMESHEET
Level 1
Errors = 0
END OF COMPILATION. 4 OF 4 PROGRAMS COMPILED TOTAL ERRORS =0
END OF COMPILATION. 1 OF 1 REPORTS COMPILED TOTAL ERRORS =0
END OF COMPILATION. 1 OF 1 SPECIAL FORMS COMPILED
TOTAL ERRORS =0
END OF COMPILATION 1 OF 1 INPUT FORMS COMPILED
TOTAL ERRORS= 0
END OF COMPILATION 7 OF 7 TOTAL ENTRIES COMPILED
TOTAL ERRORS =0
INFO Reference Manual Commands 101
COMPILE
If you specify the SINGLE option, COMPILE ignores the nested program. The nested program must exist in your current user area when you compile the outer program.
ENTER COMMAND >COMPILE PG.UPD.TIMESHEET SINGLE
COMPILING PG: PG—UPD—TIMESHEET LEVEL 0
SF: SF—UPD—TIMESHEET IGNORED — CONTINUING
IF: IPF—UPD—TIMESHEET IGNORED — CONTINUING
RP: RP—UPD—TIMESHEET IGNORED — CONTINUING
COMPILING PG: PG—LINK LEVEL 1 LINK
END PG: PG—LINK
PG: PG—MENU IGNORED — CONTINUING
ERRORS = 0
END PG: PG—UPD—TIMESHEET ERRORS = 0
END OF COMPILATION 2 OF 2 PROGRAMS COMPILED
TOTAL ERRORS = 0
If you use the LIST option, your program is displayed line by line on your terminal screen. If you use the PRINT option, the same information is sent to your spool file. In the following example, both the PRINT and SINGLE options are used.
ENTER COMMAND >COMPILE PG.UPD.TIMESHEET PRINT SINGLE
102 Commands INFO Reference Manual
COMPILE
If you issue a SPOOL command after compiling the program, this is what your printout would look like:
PROGRAM NAME: PG—UPD—TIMESHEET
1000 PROGRAM SECTION ONE
10001 SELECT MASTER—FILE
10002 RELATE PROJ 1 BY PROJ-NO RO
12/1/96
.
.
10008 SF SF—UPD—TIMESHEET N
SF: SF—UPD—TIMESHEET IGNORED — CONTINUING
10009 IPF IPF—UPD—TIMESHEET
IF IPF—UPD—TIMESHEET IGNORED — CONTINUING
.
.
10014 REPORT RP—UPD—TIMESHEET
RP: RP—UPD—TIMESHEET IGNORED — CONTINUING
10018 RUN PG—LINK LINK
10000 PROGRAM SECTION DNE
10001 DIS 'This line comes from PG-LINK'
END PG: PG—LINK ERRORS = 0
10019 RUN PG—MENU
PG: PG—MENU IGNORED — CONTINUING
END PG: PG—UPD—TIMESHEET ERRORS = 0
INFO Reference Manual Commands 103
COMPILE
$COMP-LINK-ONCE
COMPILE may also be used in conjunction with the INFO system variable $COMP-LINK-ONCE
.
If this variable is set to 0 (the default), any programs that are RUN with the
LINK option will be compiled each time they are encountered. If $COMP-LINK-ONCE is set to 1, each LINK program will be compiled once only, at the first time it is encountered.
Table COMPILE-1 Compile options for programs
$COMP-LINK-ONCE
0 1
COMPILE Every occurrence of all forms, reports and RUN LINK programs.
First occurrence of each non-LINK program.
First occurrence of all forms, reports and programs.
COMPILE SINGLE Every occurrence of all RUN LINK, First occurrence of all programs.
RUN LINK programs.
COMPILE LOCAL Every occurrence of all forms, reports and RUN LINK programs.
First occurrence of all forms, reports and RUN
LINK programs.
104 Commands INFO Reference Manual
CONCATENATE
CON
CATENATE DF_item [FROM] DF_item_1 system_item system_item_1 system_variable system_variable_1 string syntax cont’d
[+] [,source_item2,...,source_item15]
or
DF_item system_item system_variable
=
DF_item_1 system_item_1 system_variable_1 string
assigns a value to a data file item, system item, or system variable
(target items) by combining the values of from 1 to 15 data file items, system items, system variables, or strings (source items).
arguments
DF_item | system_item | system_variable the target item. A value can be assigned to any of these items or variables.
[FROM] is used only for documentation or ease of understanding.
DF_item_1 | system_item_1 | system_variable_1 |
string the source item.
DF_item is an INFO data file item.
system_item_1 is an INFO system item.
system_variable_1 is an INFO system variable.
string is a character string enclosed within single quotes.
INFO Reference Manual Commands 105
CONCATENATE commandless syntax
[+] directs INFO to place a space before the next source item. INFO does not leave the space if the previous source item has a value of all blanks.
[,source_item2,...,source_item15] when you give more than one source item, you must separate them with commas (or current delimiter). Valid items are the same as for the source item.
It is not necessary to include the command name
CONCATENATE in the statement.
CONCAT $CHRIO FROM ‘INFO9.6’ ‘IS’, ‘AVAILABLE’, ‘NOW’ can be coded as
$CHRIO=‘INFO9.6’, ‘IS’, ‘AVAILABLE’, ‘NOW’
notes
n
The results of concatenating into a B-, F-, or P-type data file item, system item, or system variable are unpredictable.
n
If you wish to produce a space in the resulting target item in the position after a string source item, and if the string is followed by a data file item, you must include the space as the last character of the string value. To produce a space in the resulting target item in the position between two concatenated strings, you must include the space as either the last character of the first string or the first character of the second string.
n
When a CONCATENATE is performed from an item on a related file where there is a ‘no-match’, by default the target item is blank-filled. This can be avoided by setting the system variable $MOVFLG to 1. If this is done, the target item will be left intact if the source item has not been matched; a ‘no-match’ condition for any of the source items with $MOVFLG set to 1 will suffice to activate this option.
106 Commands INFO Reference Manual
CONCATENATE discussion
The CONCATENATE command operates according to the following rules:
1) CONCATENATE ignores trailing blanks in source items.
2) Source items that are strings are used exactly as specified.
3) If the target item is a C-type item and is not wide enough to hold the resulting concatenated value, the result is truncated on the right.
4) If the target item is wider than the resulting string, the target item is blank padded on the right.
5) INFO allows you to use the CONCATENATE command to build ASCII numeric string values (INFO numeric item types other than B, F, or P). If the target item is an ASCII numeric string value, the following considerations apply: a) The length of the target item must equal the sum of the lengths of all source items specified.
b) The source item(s) must be formatted appropriately for the target item. For example, if the target item is an I-type item, source items cannot contain embedded blanks; if the target item is an N-type item, the concatenation of the source items must result in a decimal point that is properly located in the target item.
You can control the concatenation process for C-type items using the WD (width) unary arithmetic operator (see
'Building expressions’). Using the WD operator, you can determine the width of a C-type item, excluding trailing blanks, and perform subsequent operations based on whether that length is appropriate for the target item.
INFO Reference Manual Commands 107
CONCATENATE example
In this example, the item FIRST-NAME is not included if it causes the target item ($CHR2) to exceed its maximum length. The plus sign (+) is used to leave a space between the concatenated source items, if the preceding source item is not blank.
10000 PROGRAM SECTION ONE
10001 FORMAT $CHR2,20,C
.
.
.
20000 PROGRAM SECTION TWO
.
.
.
20004 CALC $NUM1 = WD FIRST-NAME + WD LAST-NAME + WD TITLE
20005 IF $NUM1 LE 20
20006 CONCATENATE $CHR2 FROM TITLE +,FIRST-NAME +,LAST-NAME
20007 ELSE
20008 CONCATENATE $CHR2 FROM TITLE +,LAST-NAME
20009 ENDIF
.
.
.
108 Commands INFO Reference Manual
INFO-Text CONCORD
CONCORD
[
A
LL] [[DF_name
[
N
EW] [system_item]
[system_variable]
[numeric_literal]
[
R
EPEAT]]
builds a concordance of words and phrases found in the text files referenced in the A- or concordable C-type items in the selected extended datafile.
arguments
ALL indexes text in concordable items in all selected records whether or not they are currently concorded. ALL deletes the old index information in the associated dictionary file and replaces it.
NEW indexes text in concordable items in the selected records that need to be concorded. It flags unselected records that need to be concorded for concording at a later time. These unselected records are not available for text query until they have been concorded. The dictionary file is deleted and rebuilt, saving none of the old entries.
An unqualified CONCORD command indexes only the concordable items in those selected records that have been added or changed since you last issued the
CONCORD command for the selected extended datafile.
The selected set may contain both concorded and unconcorded datafile records.
DF_item | system_item | system_variable |
numeric_literal this argument refers to batch size in terms of the number of input records needing concording that INFO-Text will use. By default, CONCORD will concord all records needing concordance. Sometimes, due to disc file quotas and other system constraints, the user may prefer to release a limited number of records for concordance. When used on its own, without the REPEAT qualifier, CONCORD will concord only as many records as are specified in the batch.
REPEAT a qualifier of batch (argument 2). When used in conjunction with batch, CONCORD will run repeatedly in sizes of batch until all records have been concorded.
INFO Reference Manual Commands 109
CONCORD notes
INFO-Text
n
You cannot include more than 30 concordable items per extended datafile. The maximum length in characters of a concordable word (or number) is 40 characters.
n
For protected datafiles, you can use the CONCORD command only if you used the SELECT command with the control-level protection key. (See the PROTECT and
PASSWORD commands for more information about protected datafiles.) n
INFO-Text treats concorded dates as three groups of numbers. Concorded numbers containing colons are treated similarly (for example 9:28 is concorded as 9 and
28).
n
The dictionary associated with a concorded datafile is available for processing word expressions only when that datafile is selected. The dictionaries of related extended datafiles are not available for querying.
n
If you issue the CONCORD NEW command from an oddnumbered program section, INFO-Text keeps the current stopword list and does not ask you if you want to retain it.
discussion
The CONCORD command builds a concordance, an index of all occurrences of terms in the concordable items in the selected extended datafile. Building the concordance is based on the concord-level defined for each concordable item in an extended datafile. The concordance information is used by INFO-Text in subsequent ASELECT and
RESELECT commands to allow queries based on word expressions. (See the Building Expressions chapter for more information about word expressions.)
The CONCORD command indexes each record in the selected set that is marked for concording, or all records whether or not they have been marked for concording.
INFO-Text marks a record in an extended datafile for concording whenever it is added, updated, or modified in any way using INFO-Text.
110 Commands INFO Reference Manual
INFO-Text CONCORD
There are several concord levels, listed below in order from least to most comprehensive concordance. Though concordable C-type items must be concorded to the record, item, or word level, A-type items can be concorded to any of the following levels: n
Record level INFO-Text can tell you the record that contains the word expression.
n
Paragraph level INFO-Text can tell you the record, item, and paragraph that contains the word expression. Use only with X-type items.
n
Sentence level INFO-Text can tell you the record, item, paragraph, and sentence that contains the word expression.
n
Word level INFO-Text can tell you the record, item, paragraph, sentence, and word that contains the word expression.
As INFO-Text concords a file, it issues messages as follows: n
nnnWORDS tells the total number of indexed words. If an item is defined for upper- and lower-case concording, the number of words will be at least double the number of items. (For example, if a word appears twice in an item that is defined for upper- and lower-case concording, the number of words displayed reflects four occurrences of that word for the item.) n
SORT COMPLETE indicates that processing is complete and the new dictionary entries are sorted.
If the datafile is marked concord inconsistent (that is, the concordance option for an item definition has been altered or modified), you must use the NEW option. If all datafile records are selected, the ALL option should be used. It is more efficient in that case.
When performing a CONCORD NEW command, INFO-
Text displays the prompt:
DO YOU WISH TO RETAIN EXISTING STOPWORDS (Y OR N)?
INFO Reference Manual Commands 111
CONCORD INFO-Text
Respond with Y (yes) to retain the set of stopwords currently associated with the selected extended datafile. If you respond with N (no), INFO-Text uses either your own default stopword file or the INFO-Text default stopword file for the new concord operation. See the STOPWORD command for more information regarding stopwords.
112 Commands INFO Reference Manual
INFO-Text CONTEXT
CONT
EXT [string]
displays the text immediately surrounding the most recently specified word expression/search term for all selected records in an extended datafile.
argument
An unqualified CONTEXT command displays lines in text files (referenced by A-type items in the selected records) that contain any of the words fitting the word expression specified in the most recently issued ASELECT or
RESELECT command.
notes discussion
n
Using strings longer than 75 characters can result in incorrect highlighting of the context string on the screen.
The CONTEXT command searches the text files referenced in concordable items of all selected records, looking for lines of text that contain words fitting the word expression specified in the most recent ASELECT or
RESELECT command. If you specify a string in the
CONTEXT command, INFO-Text searches the text files referenced in concordable items of all selected records for lines of text that contain the specified string value.
For A-type items, when INFO-Text finds a line of text fitting the word expression, it displays the located text plus the two lines before it and the two lines after it.
The displayed values of all concordable items in the selected records are highlighted. INFO-Text does not display any text for text files that do not have word expressions that match the word expression or search term.
INFO Reference Manual Commands 113
CONTEXT INFO-Text example
ENTER COMMAND >LIST
$RECNO UNO DOS
1 FILE.1 FILE.A
2 FILE.2 FILE.B
3 FILE.3 FILE.C
ENTER COMMAND >LIST TEXT
1
UNO =FILE.1
The cat sat on the mat.
DOS =FILE.A
This is a file called FILE.A. It exists only to help show the context feature of INFO-Text.
2
UNO =FILE.2
The rat ate the hat.
This is another file devised to help explain the context feature. This file is named FILE.B
3
UNO =FILE.3
The bat saw the rat eat the hat worn by the cat that lived in the house that Jack built.
DOS =FILE.C
This is the last file created just to explain the context feature. It should come as no surprise that it is called
FILE.C
114 Commands INFO Reference Manual
INFO-Text CONTEXT
The following example reselects all documents where the word explain is within 3 words of feature.
ENTER COMMAND >RESELECT EXPLAIN W 3 FEATURE
RESELECT EXPLAIN W 3 FEATURE
2 RECORD(S) SELECTED
OCCURRENCES TERM
2 explain
2 feature
ENTER COMMAND >CONTEXT
2
UNO =FILE.2
DOS =FILE.B
This is another file devised to help [explain] the context [feature], named FILE.B
3
UNO =FILE.3
DOS =FILE.B
This is the last file created just to [explain] the context [feature]. It comes as no surprise that it is called FILE.C
ENTER COMMAND >
INFO Reference Manual Commands 115
COPY
COPY
IF_name
PG_name
RP_name
SF_name
[INTO] identifier
duplicates an existing report, input form, special form, or program and saves it in your INFO directory under a new name.
arguments notes
IF_name | PG_name | RP_name | SF_name the nondata file that you want to copy.
[INTO] is used only for documentation or ease of understanding.
identifier the name of the new INFO non-data file.
n
The COPY command creates a new file in your INFO directory that is a duplicate of the file you specify. INFO assigns a unique internal name to the new file and marks it for compiling or decoding.
n
You cannot use the COPY command to duplicate an INFO data file.
n
You cannot use the COPY command to overwrite an existing file.
n
The name of the new file must be unique in your INFO directory.
example
Assume that there is a program called PB.SALES which produces a quarterly sales report. You would like a similar program, with minor modifications, for your monthly sales figures. To create a duplicate copy of PG.SALES, called
PG.SALES.INT, that you can modify, enter:
ENTER COMMAND >COPY PG.SALES INTO PG.SALES.INT
INFO Reference Manual Commands 117
PRIME
CPL
‘cplname arguments'
a PRIME CPL routine can now be invoked from within INFO.
CPL note
n
If an error occurs during execution of the CPL command, the PRIME error value is placed in the system item
$ERROR-CPL. This system item is initialized to zero each time the CPL command is executed.
INFO Reference Manual Commands 119
CREATE
CREA
TE sub-directory-name [directory-path]
allows users to create an operating system sub-directory in any directory to which they have access
argument sub-directory-name [directory-path]
If directory-path is omitted, then the sub-directory is created in the current directory.
INFO Reference Manual Commands 121
CURSOR
CUR
SOR row column
allows you to position the cursor to a specified position on your terminal screen.
argument
row column defines the line on your screen where you wish the cursor to be positioned. Row and column may be separated by a comma.
Row the row number can be a data file item, system item, system variable, or literal integer value between 0 and 24.
Column the column number defines the position of the cursor on a given line. The column number can be any number from 1 to the maximum width of your terminal screen.
notes
n
A row number of 0 clears the screen and positions the cursor at row 1, column 1. If you specify row number as 0, you must specify a column number, even though INFO ignores the specified column. A row number between 1 and 24 positions the cursor to that row. Note: Some screens scroll if you move the cursor to row 24.
n
The CURSOR command does not operate correctly if your
INFO TERMINAL setting is incorrect. See the TERMINAL command for more information.
n
When using the CURSOR command interactively or in an odd-numbered section of an INFO program, if you specify the row or column as a data file item, INFO uses that item's value in only the first selected record as the row or column number.
INFO Reference Manual Commands 123
CURSOR discussion example
The CURSOR command is often used with the ACCEPT command in programs to allow you to enter information to be used in the program. You can use the CURSOR command to place the terminal cursor anywhere on the terminal screen, then use the DISPLAY command to display information at that screen location.
The following program clears the screen, allows you to enter a message starting at screen position row 10 and column 20, displays a message on the screen for four seconds and clears the screen again:
PROGRAM NAME: CURSOR.TEST
10000 PROGRAM SECTION ONE
10001 FORMAT $CHR1,30,C
10002 CURSOR 0,1
10003 CURSOR 10,20
10004 ACCEPT $CHR1
10005 DISPLAY 'VALUE RECEIVED: ',$CHR1
10006 DISPLAY ' PREPARING TO RUN UPDATES...'
10007 DISPLAY ' '
10008 SLEEP 4
10009 CURSOR 0,1
124 Commands INFO Reference Manual
CWID
CWID
datafile_name
Change Width Command expands or reduces the internal and output widths of a data item in a datafile. Some redefined items are appropriately amended. The data file is reformatted to correspond to the new definition.
argument datafile_name discussion
This command allows the user to alter the widths of data items or delete data items completely. The data file is automatically reformatted to the new layout. When increasing the width of an item, the field is padded with blanks on the right for character items and on the left for numeric items. When decreasing the widths, character items are truncated on the right and numeric items on the left. No check is carried out for loss of data. No check is performed on the validity of the new item width.
The command cannot be used directly to insert a new item. However the effect can be achieved as follows:
1) Increase the size of an existing item by the width of the item you want to insert.
2) SAVE TEMP INIT
3) PURGE
4) Use MOD to insert the new item and return the widened item to its original width. Don't forget that the inserted item must come after a widened character item or before a widened numeric item.
5) GET TEMP COPY
An item may be removed completely by reducing by an amount equal to the item width.
INFO Reference Manual Commands 125
CWID example
ENTER COMMAND >SEL PERSONNEL
4 RECORD(S) SELECTED
ENTER COMMAND >IT
DATAFILE NAME: PERSONNEL 1/2/1993
4 ITEMS: STARTING IN POSITION 1
COL ITEM NAME
1 NAME
WDTH OPUT TYP N.DEC PROT
20 20 C — 4
KEY
—
21
31
39
SALARY 10
BIRTH-DATE 8
PHONE-NO 12
10
10
12
N 2
D —
C —
4
4
4
—
—
—
21
31
39
**
DOLLARS
YEAR
AREA-CODE
REDEFINED ITEMS **
7 7 I —
4
3
4
3
I
C
—
—
0
0
0
—
—
—
ENTER COMMAND >CWID PERSONNEL
Enter Name of Item to be Expanded or Reduced >NAME
Enter No. of Columns to Expand or Reduce >10
NOW REFORMATTING DATA IN DATAFILE ***
ENTER COMMAND >IT
DATAFILE NAME: PERSONNEL 1/2/1993
4 ITEMS: STARTING IN POSITION 1
COL ITEM NAME
1 NAME
31 SALARY
41
49
WDTH OPUT TYP DEC PROT KEY OCCRS INDX
30
10
BIRTH-DATE 8
PHONE-NO 12
30
10
10
12
C
N
D
C
—
2
—
—
4
4
4
4
— —
— —
—
—
—
—
—
—
—
—
31
41
49
REDEFINED ITEMS **
DOLLARS 7 7
YEAR 4 4
AREA-CODE 3 3
I
I
C
—
—
—
0
0
0
—
—
—
—
—
—
—
—
—
OCCRS INDX
— —
—
—
—
—
—
—
—
—
—
—
—
—
126 Commands INFO Reference Manual
restrictions see also
CWID
REDEFINED data items that begin or end in the middle of an expanded or reduced data item will not have their starting columns or their internal and output widths changed. REDEFINED data items that completely encompass an expanded or reduced data item will be handled completely.
Cannot be used on gotten or ISAM files.
MODIFY
MRED
INFO Reference Manual Commands 127
DAY
DAY
[item-1] [item-2]
Will return the day of week for a given date.
argument discussion
An unqualified DAY command will display the current day.
item-1 date-item (DF-item in even program sections only).
item-2 character-item to receive day of week.
(DF-item in even program sections only)
NB: Wednesday is 9 characters!.
This command will return the day-of-week into an internal character variable. If item-2 is omitted and no date is given, then today's day is displayed on the user's terminal.
If a date is given, then the day-of-week for that date is either displayed or received by item-2.
INFO Reference Manual Commands 129
DECODE
DEC
ODE IF_name
PG_name
RP_name
SF_name
*
marks a report, program, input form, or special form so that INFO compiles it before it is next executed.
argument discussion
IF_name | PG_name | RP_name | SF_name the nondata file in your INFO directory that is marked for decoding or compiling.
*
marks all the non-data files in your INFO directory for compiling.
DECODE marks one or more of your INFO report, program, or form files for decoding or compiling. Use the
DECODE command to notify INFO that a report, program, or form must be decoded or compiled before it is next executed. Once a non-data file has been decoded, INFO automatically compiles the non-data file just before next executing it.
For your reports, programs, or forms to execute correctly, you must use the DECODE command in the following situations:
When you use an editor or other tool outside of INFO to change a report, program, or form, use the DECODE command to notify INFO that the report, program, or form should be decoded or compiled again before it is next executed.
When you change the characteristics of any item in a data file that is used or referenced by a previously decoded or compiled report, program, or form, you must use the
DECODE command to mark for recompiling each report, program, or form that references the changed data file in any way. Otherwise, any previously compiled report, program, or form cannot use the changed data file correctly.
INFO Reference Manual Commands 131
DECODE
When you use the EDIT or CHANGE command to edit an
INFO report, program or form, INFO automatically marks the edited file for redecoding or recompiling. No use of the DECODE command is necessary in these situations.
If the system variable $DECODE_EXT_PG is set to 1, when the DECODE * command is issued, no external programs, forms or reports will be marked for decoding or compiling.
examples
ENTER COMMAND >DECODE PAYCHECKS
If you want to ensure that all of your non-data files are properly decoded, use the
*
option as follows:
ENTER COMMAND >DECODE *
132 Commands INFO Reference Manual
DEFINE
DEF
INE syntax cont’d identifier [ password_0 ] [ password_1 ]
[ password_2 ] [password_3 ]
initiates a dialog with INFO in which you create a new data file template.
arguments
identifier represents a legal INFO file name unique to your user area (maximum of 32 characters).
[password_#] is a 1- to 4-character string.
notes
n
If you enter key or array information for an item, it is best to enter the information together on one line, being careful to include all necessary specifications. See Table
DEFINE-2 for specifications. You can also use the ALTER or REDEFINE commands to enter key and array information separately.
n
When you define a data file, be sure that the file name consists of at least one non-numeric character; otherwise, you cannot use the RELATE command with the data file.
n
Defining Arrayed Items
An arrayed item is an item that has multiple values in one record that can be accessed individually using one of the
INFO system items $IDX# as a counter. To define an arrayed item, define an item whose width includes the total length of the multiple value item. The length of the defined area should be an even multiple of the length of the arrayed item.
Once the length of the array has been defined, include the
OCCURS count and INDEX characteristics. The
OCCURS count defines the number of times the array element repeats in each record; the INDEX identifies which $IDX# system item controls access to individual elements in the array.
INFO Reference Manual Commands 133
DEFINE
n
Defining an ISAM Key
An ISAM key item is a data file item that corresponds to an ISAM key field in an ISAM file. You can specify those items to be considered ISAM keys once the datafile has an
EXTERNAL association with an ISAM file. To notify INFO that an item is an ISAM key, respond to the ENTER KEY
LEVEL> prompt. INFO then provides the prompts to lead you through a complete key definition.
For more information about using ISAM key items in
INFO-Text datafiles, see Appendix J, ISAM
Considerations.
discussion
134
With the DEFINE command you create a data file template by specifying the characteristics (such as name, type, size, and so on) of the items that make up the data file.
In the DEFINE command, you can assign passwords that
INFO uses later to restrict access to the data file. If you include a password or passwords, anyone selecting the data file in the future must enter one of the passwords to gain access to those items defined with some level of protection. Each password controls a different level of access to the file. See the section on 'Item protection levels' in this command reference for a description of how you can use INFO to restrict access to specific items in a data file.
Once you initiate the DEFINE dialog, INFO begins a series of prompts for item characteristics, beginning with the first item in the file.
When you finish defining the data file template, enter a
<RETURN> in response to the ITEM NAME> prompt and
INFO returns you to the ENTER COMMAND > level.
You can enter the full definition for an item on one line, without waiting for the individual prompts from INFO for each item characteristic. Separate multiple responses using a comma. To skip an item value (for example, to accept the default number of decimal places), enter two commas together. To assist you, INFO lists the generalized syntax description before the first ITEM
NAME> prompt.
Commands INFO Reference Manual
DEFINE
ITEM NAME,WIDTH[,OUTPUT WIDTH],TYPE[DECIMAL PLACES][PROT.LEVEL]
1
ITEM NAME>
You can enter multiple characteristics on any subsequent line, following the rules above but entering only those characteristics remaining.
When you enter multiple values together, the total line length is restricted to 200 characters maximum, including the commas. If required items remain for which you have not entered a response, INFO prompts for the remaining information; otherwise, it goes on to prompt for the next item in the file.
Not all information is required for all types of items. In some cases, when it is likely that you want a value for an optional characteristic (such as output width), INFO prompts you for that value. In other cases, the only way you can define the characteristic is to enter it with a previous prompted item or to alter the item later with the
ALTER command. The prompts you receive depend on the type of item you are defining. Table DEFINE-1 shows the data types available, with size restrictions and a description for each.
If you enter an error among the multiple responses, INFO displays a message and prompts again for the corrected response. You must re-enter all subsequent responses, as
INFO ignores responses that follow an error.
Each time INFO begins to prompt for a new item definition, it displays a number. This number is the starting position of the next item in the file. For example, before the first item, INFO displays the number 1. If you then define a 20-character item, INFO displays the number 21 before the prompt for the next item.
When you see each prompt, enter a value appropriate to the prompt for the item being defined. If you do not want to enter a value and choose to accept the default instead, respond <RETURN>. You can only do this where a default is assigned; otherwise, INFO reprompts you to enter a value.
INFO Reference Manual Commands 135
DEFINE
ENTER COMMAND >DEFINE EMP-MASTER
ITEM NAME,WIDTH [,OUTPUT WIDTH] ,TYPE [,DECIMAL PLACES][,PROT. LEVEL]
1
ITEM NAME>EMP-NO
ITEM WIDTH>4
ITEM OUTPUT WIDTH><RETURN>
ITEM TYPE>N
DECIMAL PLACES>0
5
ITEM NAME>DEPT,3,I
8
ITEM NAME>DATE-HIRED,8,8,D
16
ITEM NAME>START-SALARY,9,N,2,0
25
ITEM NAME><RETURN>
Table DEFINE-1
Item type
A
B
(Binary)
C
(Character)
INFO item types
Internal width
9-32 bytes
(INFO-Text only)
1-4 bytes
1-8 bytes
(VMS only)
1-4,096 bytes
(1-4091 if concordable)
Description
Contains the name of a file which holds free text in ASCII format.
Number stored as binary integer. No decimal positions are allowed.
Number stored as binary integer. Can have implied decimal point.
Fixed-length character string. Can be concorded if extended datafile.
136 Commands INFO Reference Manual
Table DEFINE-1
Item type
D
(Date)
F
I*
(Integer)
L*
(Lead-fill)
N*
(Number)
O*
(Overpunch on Output)
P*
(Packed)
DEFINE
INFO item types (cont’d)
Internal width Description
8 bytes
4-8 bytes
(Floating)
1-16 bytes
(digits)
1-16 bytes
(digits plus
Number)
1-16 bytes
(digits plus decimal point)
1-16 bytes
(digits)
1-8 bytes
(packed digits)
Date item stored internally as YYYYMMDD. Input and output formats can be user defined. The default format is
MDY/. See the DFMT command for information about date formats.
Number stored in floatingpoint format.
Integer item. No decimal positions are allowed.
Number that will be left-padded on output with the current
LCHAR characters. Can have up to 15 decimal points with the decimal point implied.
Number with decimal places.
Can have up to 16 characters including the decimal point.
Number that will be overpunched over the last digit on output. Can have up to
16 decimal positions with a decimal point implied.
Number stored in packed decimal format with trailing sign
Byte 1 holds one digit. Each subsequent byte holds up to two additional digits. Can have up to 15 decimal positions with the decimal point implied.
INFO Reference Manual Commands 137
DEFINE
Table DEFINE-1
Item type
INFO item types (cont’d)
Internal width Description
T*
(Trailing sign, Zero fill)
V*
1-16 bytes
(digits plus
Zero sign) implied
1-16 bytes
Number stored in external decimal format with trailing sign. Zero- filled on output.
Can have up to 14 decimal positions with fill and an decimal point.
Unsigned number stored in external (Zero Fill) decimal format, zero-filled to the left.
Can have up to 14 decimal positions with an implied decimal point.
* INFO maintains precision to 12 significant positions.
138 Commands INFO Reference Manual
DEFINE
The define dialog
When you enter a DEFINE command, INFO initiates a dialog that includes a combination of the following prompts.You can respond by entering only the specific information described by the prompt, or you can enter further information about that data item.
Make sure that you leave a positional comma when you skip a characteristic of the data item being defined, and that you enter the information in the correct order. The DEFINE dialog prompts are described below.
INFO dialog
ITEM NAME
ITEM WIDTH
ITEM OUTPUT WIDTH
ITEM TYPE
ITEM DECIMAL PLACES
(N, V, F, L, O & T-types only, plus B-types on VMS)
ITEM NAME
ITEM WIDTH
In response to this prompt, enter the 1- to 16- character name for the item. The name can be any combination of characters, except blanks, commas and the current delimiter character. However, the first character of an item name cannot be a number (0-9), hyphen (-), asterisk (*), slash (/), plus sign (+), single quotation mark (‘), or left or right parenthesis.
Do not define an item name that includes a character used as an INFO control character (for instance, a backslash (\) when it is the CCHR setting BACKTAB character). Also, do not use an INFO reserved word as an item name; problems can occur when trying to reference the item name as an
INFO command.
This is also referred to as input width. In response to this prompt, enter the internal storage width in number of characters (bytes) that this item requires. See Table
DEFINE-1 for restrictions on item widths. This specification is required.
ITEM OUTPUT
Enter one of the following responses for this prompt.
WIDTH
The output character width for the items (see Table
DEFINE-1). If this width exceeds that possible for your terminal or printer, INFO wraps the item on output.
INFO Reference Manual Commands 139
DEFINE
<RETURN> to accept system default for output width.
Defaults are 10 to D (date) items; 5 for B (binary) items with input widths of 1 to 5 bytes; 12 for F (floating point) items; and input width for all other items.
ITEM TYPE
For C-type items defined with an ITEM WIDTH greater than
200 character, INFO defaults to 200 characters for the output width. Enter an output width if the item is displayed with commas or other formatting characters or is displayed using fewer characters than the stored width. See the discussion of $COMMA-SWITCH in Appendix D “System
Items” for information about controlling the display of commas for numeric items.
Always specify OUTPUT WIDTH for numeric item types that
INFO stores with an implied decimal. To include the decimal point when such item values are displayed or printed, specify OUTPUT WIDTH as 1 greater than the
INPUT WIDTH.
Enter the item type, as described in Table DEFINE-1. This specification is required.
ITEM DECIMAL
For numeric items with decimal positions only. In
PLACES
response to this prompt, enter the number of decimal positions in the item. For item types F, L, N, and O, (and B types under VMS) the number cannot exceed
OUTPUT WIDTH minus 1. For item types T and V, it cannot exceed OUTPUT WIDTH minus 2. If there are no decimal points, enter zero (0).
This specification is required for F, L, N, O, T and V types and for B types under VMS.
Following the last applicable prompt above (either ITEM
TYPE or ITEM DECIMAL PLACES), you can enter, on the same line as the prompt response, any of the information shown in Table DEFINE-2. You must enter all information that is relevant for the item being defined, in the order shown. INFO never prompts you for this information unless you terminate the previous line with a comma. For example, if you enter item type, protection and then terminate that line with a comma, INFO prompts you for the next characteristic, in this case, ALTERNATE ITEM
NAME>. If you enter the same item type and protection, but do not terminate the line with a comma, you do not receive any further prompts for the item being defined but return to the ITEM NAME> prompt for a new item.
140 Commands INFO Reference Manual
INFO
Table DEFINE-2
Information being entered
Protection level
Alternate item
Key level
Whether key is stored in bits (default is N)
Whether key is stored in bytes
Whether key is stored in words
Whether key is part of of the data (default is N)
Duplicate keys
(default is Y)
Index number
Occurrence count
DEFINE
Define dialog specifications after item type
Description
ITEM PROT. LEVEL. Protection level for
(default is 4) the field, using the syntax: protection-level[R] where protection-level is an integer from 0-4 and R requests read-only protection for the field. The R specification applies only if protection -level is 1-3. See the
PROTECT and PASSWORD command discussions for more information.
ALTERNATE ITEM NAME. Any name used as another name for the item name. Can be used interchangeably with the item name.
ENTER KEY LEVEL. For ISAM files only. The key level of the field that the item represents.
IS KEY IN BITS? (Y OR N)> (PRIME only)
IS KEY IN BYTES? (Y OR NO)> PRIME only)
IS KEY IN WORDS? (Y OR NO)> (PRIME only)
IS KEY STORED IN DATA?> (PRIME only)
ARE DUPLICATE KEYS ALLOWED?>
ENTER INDEX NUMBER. For arrayed items only, enter a number from 1 to 9 that corresponds to the index counter used to control processing of the array ($IDX1 through
$IDX9).
ENTER NUMBER OF OCCURRENCES. For an arrayed item only, enter the number of elements in the array.
INFO Reference Manual Commands 141
DEFINE
Item protection levels
INFO
Protection levels act as locked doors to restrict access to individual data file items. You define data file items to have one of five levels of protection, level 0 through level
4. Protection level 0 is the most restrictive, and level 3 is the least restrictive. Protection level 4 signifies no protection at all on an item. When defining an item, if you do not specify a protection level, INFO assigns protection level 4 to that item.
Once you have specified protection levels for items in a new data file, you use the PROTECT command to assign passwords for each protection level used by the protected items. You can also assign passwords in the DEFINE command line itself. See the DEFINE command's syntax description above.
To use a protected data file, you use the PASSWORD command with the password or passwords (you can use up to four passwords) that unlock access to the protected item or items wanted. You distinguish different levels of access offered to subsequent users of a data file by specifying different protection level numbers to various items when those items are defined.
Level-0 (control level) protection on an item allows you full access to that item's values, to change the passwords for other levels in the data file and to redefine the protected item.
Level-1 protection allows you access to items with level-1 and with level-4 protection.
Level-2 protection allows you access to items with level-2 and level-4 protection.
Level-3 protection allows you access to items with level-3 and level-4 protection.
Level-4 protection allows you access only to items with level-4 protection.
142 Commands INFO Reference Manual
INFO-Text DEFINE
INFO-Text dialog
EXTENDED DATAFILE?
EXTERNAL DATABASE?
ITEM NAME
ALTERNATE ITEM NAME
ITEM WIDTH
ITEM OUTPUT WIDTH
ITEM TYPE
only if Y replied to above prompt
ITEM DECIMAL PLACES
(N, V, F, L, O & T-types
USER NAMABLE TEXT FILES?
USER NAMABLE TEXT ROOT?
only, plus B-types on VMS)
A-types only
A-types only
A-types only (if Y replied
ENTER ROOT NAME
ENTER CONCORDANCE LEVEL
to previous prompt)
A- and C-types only
CONCORD UPPER AND LOWER CASE LETTERS SEPARATE?
CONCORD NUMBERS IN TEXT?
ENTER SYNONYM FILE NAME
EXTENDED
DATAFILE
EXTERNAL
DATABASE
Specify Y (yes) if the datafile you are defining is to be concorded. Only extended datafiles, those that contain Aor concordable C-type items, can be concorded.
Otherwise, specify N (no) or press <RETURN>. If you specify N or <RETURN> and later define a concordable item, INFO-Text creates the datafile as extended.
Specify Y or N (default N).
The following message appears if the answer to the
EXTERNAL DATABASE? prompt was Y:
USE EXTERNAL TO LINK TO A DATABASE OR CANCEL THE LINK
ITEM NAME
In response to this prompt, enter the 1- to 16-character name for the item. The name can be any combination of characters, except blanks, commas and the current delimiter character. However, the first character of an item name cannot be a number (0-9), hyphen (-), asterisk
(*), slash (/), plus sign (+), single quotation mark (‘), or left or right parenthesis.
INFO Reference Manual Commands 143
DEFINE INFO-Text
ALTERNATE
ITEM NAME
ITEM WIDTH
ITEM OUTPUT
WIDTH
ITEM TYPE
Do not define an item name that includes a character used as an INFO control character (for instance, a backslash (\) when it is the CCHR setting BACKTAB character). Also, do not use an INFO reserved word as an item name; problems can occur when trying to reference the item name in an INFO command.
Any name used as another name for the item name.
Can be used interchangeable with the item name.
This is also referred to as input width. In response to this prompt, enter the internal storage width in number of characters (bytes) that the item requires. See
Table DEFINE-1 for restrictions on item widths. This specification is required.
Enter one of the following responses for this prompt.
The output character width for the item (see Table
DEFINE-1). If this width exceeds that possible for your terminal or printer, INFO wraps the item on output.
<RETURN> to accept system default for output width.
Defaults are 10 to D (date) items, 5 for B (binary) items with input widths of 1 to 5 bytes, 12 for F (floating point) items; and input width for all other items.
For C-type items defined with and ITEM WIDTH greater than 200 characters, INFO defaults to 200 characters for the output width. Enter an output width if the item is displayed with commas or other formatting characters or is displayed using fewer characters than the stored width.
See the discussion of $COMMA-SWITCH in ‘System items’ for information about controlling the display of commas for numeric items.
Always specify OUTPUT WIDTH for numeric item types that INFO stores with an implied decimal. To include the decimal point when such item values are displayed or printed, specify OUTPUT WIDTH as 1 greater than the
INPUT
Enter the item type, as described in Table DEFINE-1.
This specification is required.
144 Commands INFO Reference Manual
INFO-Text DEFINE
ITEM DECIMAL
For numeric item with decimal positions only.
PLACES
In response to this prompt, enter the number of decimal positions in the item. For item types F, L, N, and
O, (and B types under VMS) the number cannot exceed
OUTPUT WIDTH minus 1. For item types T and V, it cannot exceed OUTPUT WIDTH minus 2. If there are no decimal positions, enter zero (0).
This specification is required for F, L, N, O, T and V types and for B types under VMS.
USER-NAMEABLE Applies if A was entered for ITEM TYPE.
TEXT FILES?Y Enter (yes) if you want the option of naming your text files when you add records to the file: otherwise, enter N (no) or <RETURN>, if you enter N the systemcreates the file name automatically during an ADD. If you enter Y, the system still created a file name if you do not enter a name during the ADD procedure. Filenames can be up to 32 characters long.
USER-
NAMEABLE
TEXT ROOT?
Applies if A was entered for ITEM TYPE. Enter Y (yes) if you want to specify a string used as a prefix to each text file name; otherwise, enter N (no) or <RETURN>
ENTER
ROOT NAME>
If you enter N, INFO-Text forms a text file root for the item based on the selected datafile’s internal name.
If you want a null root name, enter Y (yes) here and
<RETURN> at the next prompt. This maximizes the number of text file names available to be stored in the item.
Applies if you entered Y above. Enter the 1- to 32character (including the directory syntax) name to be used a prefix root of text file names. A prefix plus the item value cannot exceed 32 characters; however, by using external variables, the exported string may exceed this limit. A file name and the part of a text root that is a directory path cannot exceed 80 characters. INFO-Text stores the text files beginning with this standard name.
Enter <RETURN> for a null root name.
INFO Reference Manual Commands 145
DEFINE INFO-Text
ENTER
Applies if A or C was entered for ITEM
CONCORDANCE
TYPE. Enter one of the values described
LEVEL>
below to define the level of which INFO-Text indexes the data item when this file is concorded. Note that the index levels are listed in order from least to most comprehensive level. C-type items must specify R
(record), I (item), or W (word) level.
N or <RETURN> - No indexing. Item is not available for free-text query.
R Record-level indexing.
note
CONCORD
UPPER AND
LOWER CASE
LETTERS
SEPARATE?>
(default is N)
I Item-level indexing. This is the minimum level required for queries using word expressions that include ‘@ item’ syntax
P Paragraph-level indexing. This is the minimum level required for queries using word expressions that include
‘W PARAGRAPH’.
S Sentence-level indexing. This is the minimum level required for queries using word expressions that include
‘W SENTENCE’.
W Word-level indexing. This is the most common level of indexing. It is required for queries using phrases or proximity searching for A- and C-type items.
If you do not specify paragraph-, sentence- or word-level indexing for an item, INFO-Text is not able to perform phrase or proximity searching of the item. See the section
Word Expressions in “Building Expressions” for more information about searching text items.
Applies if you did not enter N above. Enter Y (yes) to distinguish between uppercase and lowercase during concording and free-text query processing; otherwise, enter N (no) or <RETURN>.
146 Commands INFO Reference Manual
INFO-Text DEFINE
CONCORD
NUMBERS IN
TEXT ITEMS?>
(default is N)
Applies if you did not enter N to the ENTER
CONCORDANCE LEVEL> prompt, described above.
Enter Y (yes) to index numbers during the concording process; otherwise, enter N (no) or <RETURN>.
Follow this entry with any of the information shown in
Table DEFINE-3, if applicable.
Following the last applicable prompt above, you can enter, on the same line with the prompt response, any of the information shown in Table Define-3. You must enter all information that is relevant for the item being defined, in the order shown. INFO never prompts you for this information unless you terminate the previous line with a comma. For example, if you enter item type, protection and then terminate that line with a comma, INFO prompts you for the next characteristic, in this case, KEY LEVEL.
If you enter the same item type and protection, but do not terminate the line with a comma, you do not receive any further prompts for the item being defined but return to the
ITEM NAME> prompt for a new item.
ENTER SYNONYM This is the last prompt displayed for datafiles defined as
FILE NAME>
extended. You can specify that a synonym file (which, if
(default is N) specified, must already exist) be associated with the datafile. If specified here, the synonym file becomes permanently associated with the datafile you are defining.
Subsequent SELECT commands using this datafile do not prompt for the synonym command for more information about synonym files.
Table DEFINE-3 Define dialog specifications after item type
Information being entered
Protection level
Description
ITEM PROT. LEVEL. Protection level for
(default is 4) the field, using the syntax: protection-level [R] where protection-level is an integer from 0-4 and R requests read-only protection for the field. The R specification applies only if protection-level if 1-3. See the PROTECT and
PASSWORD command discussions for more information.
INFO Reference Manual Commands 147
DEFINE INFO-Text
Table DEFINE-3
Information being entered
Key level
Whether key is stored in bits (default is N)
Whether key is stored in bytes
Whether key is stored in words
Whether key is part of of the data (default is N)
Duplicate keys
(default is Y)
Index number
Occurrence count
Define dialog specifications after item type (cont’d)
Description
ENTER KEY LEVEL. For ISAM files only. The key level of the field that the item represents.
IS KEY IN BITS? (Y OR N)> (PRIME only)
IS KEY IN BYTES? (Y OR N)> (PRIME only)
IS KEY IN WORDS? (Y OR N)> (PRIME only)
IS KEY STORED IN DATA?> (PRIME only)
ARE DUPLICATE KEYS ALLOWED?>
ENTER INDEX NUMBER. For arrayed items only, enter a number from 1 to 9 that corresponds to the index counter used to control processing of the array ($IDX1 through
$IDX9).
ENTER NUMBER OF OCCURRENCES. For an arrayed item only, enter the number of elements in the array.
Concordable items
Two item types refer to unstructured text information that can be concorded and used in INFO-Text's query and display commands.
A-type items contain names of files which contain unstructured text as item values. A-type items refer to text files stored as ASCII files which can be edited using any system editor.
The file names contained in A-type items have two components: the root and the file-name. The root is a string used as a prefix when INFO-Text forms names for text files stored as A-type item values. When INFO-Text creates, assigns, or deletes a text file associated with an
A-type item value, it first forms the text file's name by combining the root defined for the item with the file name found in the A-style item value itself.
148 Commands INFO Reference Manual
INFO-Text DEFINE
Both the root and the file names of A-type items can be defined as either user-namable or non-user-namable. A user-namable root or file name means that you specify the root value (when you define the item) or each file name (in each record in the datafile) for the applicable A-type item.
INFO-Text cannot validate a given root and file name combination until actually trying to create, assign, or delete the text file whose name is formed from the root and file name.
The maximum length of a text filename will depend on the operating system. The number of characters used as a text file name prefix in a user-namable text root plus the
A-type item value cannot exceed 32. External variables may be used in the root name.
If you specify the root for an A-type item as not usernamable, INFO-Text creates a prefix from the first six characters of the datafile's internal name. For example, if the datafile's internal name is XXX0001DAT, the non-usernamable text root is XXX001. This occurs whether or not you defined the file name portion as user-namable.
To have the greatest number of file names available in a given A-type item, define the root for that item usernamable and then specify the root as null (with a
<RETURN>). This allows complete flexibility in specifying the text file names stored in the A-type item value.
Remember that INFO-Text is limited to a 32-byte maximum file name length when forming a text file name, regardless of the defined INPUT WIDTH of an A-type item. Included in the 32-byte length is the root prefix if one exists. INFO-Text creates text root prefixes six bytes long for non-user-namable text roots.
The second type of concordable item is the concordable
C-type item. Concordable C-type items contain text whose length is some fixed number of characters. Concordable
C-type items are concorded and queried against in the same way as A-type items. See the CONCORD (Text) command for more information about concording C-type items.
INFO Reference Manual Commands 149
DEFINE see also
INFO-Text
You can define a maximum of 30 concordable items in an extended datafile.
ALTER
CWID
EXTERNAL
MODIFY
REDEFINE
SYNFILE
SYNONYM
150 Commands INFO Reference Manual
DELETE
DELE
TE file_spec
deletes an operating system file.
argument note file_spec
DELETE will give an error message and continue if the delete fails, except no error message is given for FILE
NOT FOUND. A DELETE failure will not cause a program execution error.
INFO Reference Manual Commands 151
DELIMITER
DELI
MITER delimiter_character
changes or displays the current delimiter character setting.
argument note
delimiter_character changes the current delimiter character setting to delimiter_character.
n
An unqualified DELIMITER command displays the current delimiter character.
n
Never use a blank space as the delimiter character.
discussion
The DELIMITER command assigns or displays the character used to separate individual values when multiple values occur in one entry during certain data input situations.
By default, the delimiter character is a comma (,).
In situations when a comma is significant to a value you enter to a data file, you must change the DELIMITER setting to some other character that does not occur as part of any value. An example is the interactive use of the
ADD command or the ADD command with a FROM file.
Another example is the character string 'Doric Computer
Systems International Ltd, Watford.' or the numeric value
1,000.00.
example
ENTER COMMAND >DELIMITER
THE CURRENT DELIMITER IS ,
ENTER COMMAND >DELIMITER #
ENTER COMMAND >DELIMITER
THE CURRENT DELIMITER IS #
Displays delimiter.
Changes delimiter.
Displays delimiter.
INFO Reference Manual Commands 153
DEXT
DEXT
[
PR
INT]
displays all externals in the INFO directory.
argument [PRINT] discussion
The Display Externals command displays all external data files, programs, reports, input forms and special forms in a user's directory, along with their external treenames. The
PRINT option directs the output to the SPOOL file.
example
ENTER COMMAND >DEXT
TYPE FILENAME EXTERNAL TREENAME
XX DF INVOICE ARREC\ARE001DAT
XI DF CASH-RECEIPTS ARREC\CASH-RECEIPTS
XX PG PRINT-STATEMENTS
INFOSYS\PRINT-UFD\SAI023DAT
XX IF CHECK-ENTRY
INFOSYS\ENTRY-ROUTINES\SAI123DAT
XI DF GENERAL-LEDGER LEDGER\GENERAL-LEDGER
see also
The DIRECTORY command provides a more comprehensive means of listing such entries.
INFO Reference Manual Commands 155
DFMT (
DATE FORMAT)
DFMT DMY
[separator-1 [separator-2]] [
M
] [
C
[####]] [
A
[##
][
+
]
DYM
B -
MDY
MYD
YDM
YMD
changes or displays the date format setting.
arguments
An unqualified DFMT command displays the current
DFMT setting
[DMY | DYM | MDY | MYD | YDM | YMD] alternative formats for the order in which the day, month and year of the applicable date value are displayed. If Y is the third component of the format, the ADD, UPDATE, INPUT
FORM and ACCEPT commands allow the omission of the year portion of the applicable date value, and instead may use the value of the system item $YEAR. This short form is not accepted in arithmetic or logical expressions if the month and day components are separated by a period (.) or a hyphen (-).
[separator-1 [separator-2]] Any character, except a blank, can be a separator character. Note that a separator of a period (.) allows entry from a numeric keypad. To leave an existing separator character unchanged, specify that character as a blank. For example, DFMT MDY / leaves the existing first separator character unchanged and sets the second separator character to a slash. The first character is the one used for display; both can be used for input.
[M] requests a military format for output; that is, the month is expressed as a 3-character abbreviation such as
JAN, FEB, or MAR. While M-type dates are in effect,
INFO accepts either full numeric or military-type dates, but displays military format only. Suggested output widths, if you use the M option, are 6 (JAN-30), 9 (JAN-30-96), or 11
(JAN-30-1996).
INFO Reference Manual Commands 157
DFMT
(DATE FORMAT) discussion
[C[####]] — sets default year for date entry. An unqualified C argument cancels the existing value and resets to $YEAR
[A [##]]
+
] — sets pivotal decade and year
B
-
A =ABOVE
B =BELOW
## sets the pivotal decade and year
+ or - determines whether dates above or below the pivot get century added or subtracted. Default is B+ or A-.
An unqualified A or B argument cancels the existing setting.
The DFMT command changes or displays the format used in displaying or printing data file items, system items, system variables, or literals that are date values. The
DFMT setting applies for screen input, calculations involving dates and the display of output. DFMT does not control the way dates are stored internally; INFO stores all dates as yyyymmdd; for example, 19960504.
You can retain changes to the DFMT setting for your individual use; see Appendix G Controlling Default
Assignments'
DFMT does not control the output length of the date values; this is controlled by the OUTPUT LENGTH item characteristic as specified when you use the DEFINE,
ALTER, MODIFY, REDEFINE, or FORMAT commands to format a D-type data file item or system variable. For output, a date value is formatted within the spaces allowed for it; the month, day, and year values are positioned as specified, and the specified separator character is inserted.
158 Commands INFO Reference Manual
DFMT (
DATE FORMAT) examples
ENTER COMMAND >DFMT MDY/.
ENTER COMMAND >DISPLAY $TODAY
8/31/1996
ENTER COMMAND >DFMT DMY./
ENTER COMMAND >DISPLAY $TODAY
31.8.96
ENTER COMMAND >DFMT DMY - ,M
ENTER COMMAND >DISPLAY $TODAY
31 - AUG -1996
DFMT C2000 A30-
1/2/95 generates 1/2/1995
1/2/01 generates 1/2/2001
1/2/30 generates 1/2/2030
1/2 generates 1/2/2000
DFMT C1996 B30+
1/2/95 generates 1/2/1995
1/2/01 generates 1/2/2001
1/2/30 generates 1/2/1930
1/2 generates 1/2/1996
see also
$REPDAT
$ZDATE
Appendix T Dates
INFO Reference Manual Commands 159
DICE
DICE ON
OFF
[
D
ISPLAY]
[
N
ODISPLAY]
[
IPF
DISP]
[
IPFN
ODISP]
enables editing to be performed on all INFO terminal input. When
DICE is ON, all input is via an edit buffer. Depending on the current INFO activity, there may or may not be data in the edit buffer when input commences.
arguments discussion
ON switches the editor on.
OFF switches the editor off.
DISPLAY Causes the contents of an accept field to be displayed for editing.
NO DISPLAY An accept field will not be displayed for editing. (This is the default.)
IPFDISP Contents of the same item in the previous record are displayed for editing in input forms. (This is the default.)
IPFNODISP Switches off IPFDISP. This has no effect on forms used for update.
If DICE ON is issued interactively, the current ERASE and
KILL characters will be reported on the screen.
The KILL key will erase the line from the current cursor position. If the current position is the end of the line, the whole line will be erased. The KILL character will be the character set at the operating system.
The ERASE key will erase the current character, or the last character typed if you are at the end of the line or if you are in insert mode. The ERASE key will be that set for
SYSTEM unless there is a conflict with one of the arrow keys (e.g. both BACKSPACE and left arrow send the same character on some terminals), in which case DICE will assign another key, either DEL if that is not in use as the KILL character or ".
INFO Reference Manual Commands 161
DICE
The left and right arrow keys will position the cursor on the line. At the start of any input line, the editor is in overwrite mode and characters typed will be overlaid on the existing characters. You can switch to insert mode by pressing the down arrow key. The same key pressed again will cause the editor to return to overwrite mode.
The up arrow key can be used to recall any of the last twelve lines typed in. (This function is not in operation when you are in an input or update form.)
Control-R will retype the line and reposition the cursor to the start of the line. If the cursor is already at the start of the line, it will be repositioned to the end of the line thus giving a fast move from end to end.
In input forms and update forms, the item being updated will be displayed for editing. This means that in input forms the data from the previous record will be displayed unless the user explicitly clears the field before accepting into it or he/she has used the IPFNODISP option.
In input and update forms, the INFO special characters have their usual effect. These characters may be keyed into the first position in the field even if there is already data on the line. The data will be erased before return of the special character to INFO.
The current ARET setting is observed.
Non-printing characters will only be accepted into the line if preceded by the ^ character. The exception to this rule is the bell character Control-G which will be accepted without an escape. The non-printing character will be displayed as a space on the line. If your KILL character is ?, you may also use ^ to get a ? into your line. The ^ character itself is not displayed.
In the current implementation of DICE, lines longer than a screen width will not be handled correctly on terminal types ANSI and VT52. If you want to use the editor for very long lines, e.g. for program input, set the screen width to 132 if possible.
162 Commands INFO Reference Manual
DICE programming considerations whilst using
DICE
The DICE ON command uses the local file DORIC.TRM or the same file in the alternate directory to find the arrow key definitions for the current INFO terminal types. In interactive mode, if the DORIC.TRM file does not contain a definition for the current terminal, you will be invited to supply the necessary information by pressing the arrow keys in turn. When the definition is completed, you will be asked to test the correctness of the definition by keying in and editing a line of text. Each of the arrow keys should be tested when doing this check. You may have to wait for write access to the DORIC.TRM file if another user is currently defining a terminal.
To change your terminal type after DICE ON, you must issue DICE OFF followed by DICE ON again.
On some ADM3 type terminals, the down arrow sends
Control-J. The SYSTEM ignores this character. On these terminals it is necessary to define some other key to perform the function of switching modes from overwrite to insert. On this type of terminal, when all the arrow keys are pressed in turn in response to screen messages, the error message "ARROW CHARACTER STRINGS NOT ALL
THE SAME LENGTH" is displayed. When this is seen, you should repeat the define procedure selecting a different key to act as the down arrow, e.g. HOME or Control-Z.
It is not possible merely to switch DICE ON in an existing INFO application and expect everything to work immediately, for the following reasons:
In INPUT FORMS data already present in a field will be moved into the edit buffer and displayed. This data will typically be the value entered for the previous record. In some applications, when there is a high degree of data duplication, this might be desirable. If not it would be necessary to clear the record first or use IPFNODISP, e.g.
1,1 RECORD,S''
INFO Reference Manual Commands 163
DICE
An IPF or UPDATE session with DICE OFF can be terminated by keying RETURN on the first field. With
DICE ON it is necessary to hit the KILL key first to clear the edit buffer before pressing RETURN.
In an IPF or UPF, a null or blank value, except for the first field on the form, can currently be entered by keying
RETURN. With DICE ON it is necessary to KILL the field first if there is data in the edit buffer.
If an application simulates an IPF by means of DISPLAY and ACCEPT, the keyboard operator is likely to be confused by the fact that the displayed data is not actually in the edit buffer but has to be keyed over. This can be overcome by using the DICE DISPLAY option which causes the contents of the ACCEPT field to be moved into the edit buffer. However, if the ACCEPT field is formatted to a large width, this may cause problems because DICE will clear the entire width to blanks before displaying the contents of its edit buffer. This may result in characters already on the screen being blanked out. On terminal types ANSI and VT52, which do not handle wrap-around, the cursor can end up in the wrong position.
IPFNODISP should only be used when BACK TAB or "No" to "IS THIS FORM ACCEPTABLE?" are not going to be used. If BACKTAB or "No" are used, the item contents will be displayed by INFO on the second pass, but they will not be in the DICE edit buffer. Because of the above considerations, it is preferable for new systems to be designed with DICE ON from the start. To avoid operator confusion, it is also desirable for all systems accessed by one operator to run either with DICE ON or DICE OFF. A mixture of systems, some with DICE ON and some with
DICE OFF, will inevitably confuse an operator, as it is not possible merely by looking at the screen to tell whether the characters which are being keyed over are in the edit buffer or not.
164 Commands INFO Reference Manual
INFO-Text DICTIONARY
DIC
TIONARY [matchword] [
PR
INT]
<
occurs-count
>
occurs-count
[
STOPWORDS
[matchword]]
displays entries in the dictionary file associated with the selected extended datafile, which must be concorded.
arguments notes
An unqualified DICTIONARY command displays all entries in the dictionary file associated with the selected concorded datafile. If the selected extended datafile is not concorded, an unqualified DICTIONARY command displays the default file of stopwords in effect.
PRINT sends output from the DICTIONARY command to the current INFO-Text output file.
<occurs-count requests a display of only those words or terms that occur fewer than the number of times specified by occurs-count.
>occurs-count requests a display of only those words or terms that occur more than the number of times specified by occurs-count.
STOPWORDS requests a display of all the stopwords (if no matchword is specified) or the stopwords specified in the word expression, (wildcards may be used).
match word A match word represents a combination of characters valid for a word and including the special characters \ (backslash) or % (percent sign). The backslash, also called the truncation character, indicates any prefix, suffix, or infix string in a word, as illustrated in the following n
If, when you defined an extended datafile, you requested concording separately by uppercase and lowercase letters, an unqualified DICTIONARY command distinguishes the case of indexed words or terms; otherwise, the
DICTIONARY displays shows all words without regard to
INFO Reference Manual Commands 165
DICTIONARY INFO-Text discussion
case. If you restrict the DICTIONARY display to one particular indexed word, INFO-Text operates as follows:
1) If the specified word is uppercase, INFO-Text matches the word only to uppercase occurrences in the text.
2) If the specified word is lowercase, INFO-Text matches the word to both upper and lowercase occurrences of the word in the text.
If the word or term concorded is in uppercase, the number in the occurs column on the DICTIONARY display includes those times the word or term or phrase appears in uppercase. If the word or term concorded is in lowercase, the number in the occurs column on the DICTIONARY display includes those times the word or term or phrase appears in upper- and lowercase.
The DICTIONARY command displays, in ascending order, entries in the dictionary file associated with the selected concorded datafile. Dictionary entries, which comprise concorded words or phrases, are shown with the following information:
For users with control-level access to the datafile, the total number of occurrences of the word or term. For stopwords
INFO-Text displays 'STOPWORD' instead of an occurrence count.
The number of datafile records in which the word or term appears.
The word or phrase itself.
The format of the DICTIONARY display is:
OCCURS
#########
REC'S
#####
INDEX TERM word
.
.
.
.
.
.
.
.
.
You can specify that the DICTIONARY command display only a particular word or text term, only stopwords, only a particular stopword, or only information for words that occur fewer or more times than a specified number.
166 Commands INFO Reference Manual
INFO-Text examples
DICTIONARY
ENTER COMMAND >DICTIONARY
OCCURS REC'S INDEX TERM
STOPWORD a
STOPWORD an
STOPWORD and
STOPWORD are
STOPWORD at
1 1 ate
1 1 bat
STOPWORD be
.
.
.
STOPWORD that
STOPWORD the
STOPWORD this
STOPWORD to
STOPWORD w
STOPWORD will
STOPWORD xor
ALPHA\ Matches all words that begin with the string
'ALPHA'.
\ALPHA Matches all words that end with the string 'ALPHA'.
\ALPHA\ Matches all words that contain the string
'ALPHA'.
ALP\\A Matches all words that begin with the string
'ALP' and end with the string 'A'.
The percent sign represents a character position in a word which can take any value, as illustrated below:
%%A Matches any 3-character word that ends with the character 'A'.
A%%%% Matches any 5-character word that begins with the character 'A'.
INFO Reference Manual Commands 167
DICTIONARY INFO-Text
You can combine the backslash and percent sign in the same match word.
A list of alternate prefix, suffix, or infix strings enclosed in square brackets ([ and ]) can also represent the literal string or character portion of a match word. For example:
[A,B,D]!
Matches any word that begins with the characters 'A', 'B', or 'D'.
[A,B]%%%% Matches any 5-character word that begins with the characters 'A' or 'B'.
168 Commands INFO Reference Manual
DIF
DIF
input-form-name
can be used to dump an INFO Input Form format to a command file for editing by the SYSTEM editor and later execution from within INFO to replace the current input form.
arguments
The input form name entered by the user is dumped to a
SYSTEM sequential file with the same name, complete with the INFO commands necessary to regenerate it by the execution of the command file from INFO. The dumped file may be edited with the SYSTEM editor.
examples
DIF INVOICE-SCREEN
You would then edit the SYSTEM file via the SYSTEM editor and type:
CO INVOICE-SCREEN
The necessary files must first be selected and related.
This can be done with the SETUP command.
INFO Reference Manual Commands 169
DINT
DINT
Displays the format and content of the user formatable internal variables $CHR#, $NUM#, $DAT# (where # is 1-40).
example
ENTER COMMAND >DINT
$CHR01,4,9,B = BEGIN
$CHR02,8,8,C =
$NUM03,4,9,B = 123456789
$NUM04,8,10,F,2 = 1234567.76
.
.
.
etc.
INFO Reference Manual Commands 171
DIRECTORY
DIR
ECTORY [
DF
][file_name] [
EXTE
[XX] [
PRIN
T] [
LONG
]
[XI]
[
IF
]
[
PG
][
COMP
N]
[CI]
[
COMP
Y]
[
RP
][
DECO
]
[
SF
]
displays information about the files in your INFO directory.
arguments
[DF | IF | PG | RP | SF] displays all the files in your INFO directory of the specified type.
DF data files
IF input forms
PG programs
RP reports
SF special forms
May specify one or more of these arguments to list entries of that type.
An unqualified DIRECTORY command displays information about all of the directory entries in your INFO directory.
file_name may include the * character as a wild card to list entries with a particular prefix, infix or suffix.
EXTE unqualified, displays all external directory entries.
If used with datafiles, more external types XX, XI and CI.
may specify one or
COMP Y displays all compiled entries.
COMP N displays all non-compiled entries.
DECO displays all entries except datafiles : gives the same result as DIR PG IF RP SF
PRINT copies the directory information into your spool file instead of displaying it at your terminal.
INFO Reference Manual Commands 173
DIRECTORY
LONG displays all the information that INFO provides about the files in your INFO directory. The information displayed depends on the type of file.
notes
n
The * character may be used as a wildcard to list directory entries with a particular prefix, infix or suffix.
eg.
DIR ABC* will list all entries beginning with ABC
DIR *ABC* will list all entries containing ABC
DIR *ABC will list all entries ending in ABC n
An entry in the EX column of the DIRECTORY command display indicates that a directory entry is associated with a file external to your INFO user area. See the EXTERNAL command for more information.
discussion examples
n
The OTHER column indicates whether the entry has been compiled or not (if a program, form or report); also for reports it indicates the number of title lines, column headings and columns, and for special forms the number of lines and columns.
The DIRECTORY command displays or prints information about some or all of the files in your INFO user area. The
DIRECTORY command displays the internal and external names of the files in your INFO user area, their type, size and whether or not they are external to your INFO user area.
For a displayed list of all the files in your INFO user area, enter:
ENTER COMMAND >DIRECTORY
TYPE NAME INTERNAL RECORDS LEN EX OTHER
DF D.PROJ TIM000DAT 9 12
DF D.MASTER.FILE TIM001DAT 211 33 XX
PG P.MEMU TIM002SRC 34 200 Y
PG P.UPD.TIME TIM003SRC 8 200 N
IF I.MASTER.FILE TIM004SRC 19 500 Y 0/0
RP R.PROJECT TIM005SRC 13 500 Y 1/2/132
SF S.PAYCHECK TIM006SRC 11 500 Y 60/120
174 Commands INFO Reference Manual
DIRECTORY
For more information on a specific file, enter the
DIRECTORY command with the file name and the LONG option.
ENTER COMMAND >DIR MASTER-FILE LONG
TYPE NAME NO.RECORDS
DF MASTER-FILE 211
INTERNAL TIM001DAT
RECORD LENGTH 33
NO.ITEMS 4
EXTERNAL XX HOST FIXED LENGTH
DATAFILE |home|info964sys|master
ENTER COMMAND >DIR PROJECT LONG
TYPE NAME NO.RECORDS
RP PROJECT 13
INTERNAL TIM005SRC
COMPILED Y
NO.TITLES 1
NO.HEADERS 2
MAX.WIDTH 132
INFO Reference Manual Commands 175
DISPLAY
DIS
PLAY syntax cont’d syntax cont’d
[beg_rec_1,end_rec_1 & beg_rec_2...]
DF_item system_item system_variable string
#
T
#
X
*TAB
[#] [
,
...]
*X
[#]
*L
[#]
*W
[#]
*EJ
ECT
*A
row
,
column
*C
#
*CONT
EXT
*T
EXT
[
,=
] [
PRIN
T
NOLINE
CONT
EXT
T
EXT]]
[
,
...]
or
DIS
PLAY
AT
row
,
column [DF_item system_item system_variable [
,
...] string
#
X
#
T
]
or
DIS
PLAY
=
[PRINT]
displays or prints the values of data file items in selected records, system items, system variables, or strings.
arguments
[beg_rec_1,end_rec_1 & beg_rec_2...] you can display ranges of records by specifying the beginning and ending
INFO Reference Manual Commands 177
DISPLAY
record numbers. beg_rec_# and end_rec_# must be numeric literals.
DF_item an INFO data file item.
system_item an INFO system item.
system_variable an INFO system variable.
string a character string enclosed with single quotes.
*TAB#
or #T specifies the column at which to position the next display item where n is the number of the column (1 to 200). An unqualified *TAB positions the next display item seven spaces to the right of the current column. If you use nT, you must include the tab column value. The examples below display the LAST-NAME from records 1 to 3 and records 9 to 12 starting in column 25.
ENTER COMMAND >DISPLAY 1,3&9,12 *TAB25,LAST-NAME
or
ENTER COMMAND >DISPLAY 1,3&9,12 25T,LAST-NAME
*X# or #X specifies the spaces to insert before the next display item where n is the number of spaces (1 to 200).
An unqualified *X inserts five spaces. If you use nX, you must include the space count value. The examples below display the LAST-NAME, 15 spaces and then the DEPT for every record selected.
ENTER COMMAND >DISPLAY LAST-NAME,*X15,DEPT
or
ENTER COMMAND >DISPLAY LAST-NAME,15X,DEPT
*L# inserts the number of line feeds specified by n. The line count defaults to 1. To double-space, specify *L2.
The following example displays the LAST-NAME from the first 10 records using triple spacing:
178 Commands INFO Reference Manual
DISPLAY
ENTER COMMAND >DISPLAY 1,10 *L3,LAST-NAME
*W# specifies the display width for the next display item.
If the item is a character item and the # specified is less than the item's defined output width, INFO truncates the item value to the specified number of characters. If the item is numeric and the n is less than the item's defined output width, INFO displays blanks for the item. The following example displays the LAST-NAME from the first
10 records using one character as the display width. As a result, only the first character of each name appears in a column.
ENTER COMMAND >DISPLAY 1,10 *W1,LAST-NAME
*EJECT clears the screen before INFO processes the next display item or format specifier. The following command clears the screen before each LAST-NAME value is displayed for the first five records. As a result, you will have five screens of output with a single LAST-
NAME displayed at the top of each screen.
ENTER COMMAND >DISPLAY 1,5 *E,LAST-NAME
*Arow,column takes the number of the row specified and displays the next display item that many rows below the last row displayed and in the specified column. Assuming a previous INFO command left the screen cursor on row
10, the example below displays LAST-NAME from the first selected record at row 15, column 10 and LAST-NAME from the second selected record at row 20, column 10.
ENTER COMMAND >DISPLAY 1,2 *A5,10,LAST-NAME
INFO Reference Manual Commands 179
DISPLAY
*C# displays a C-type data file item in a column where n specifies the width of the column. If n is less than the defined output width for the item, INFO truncates the item to n characters and wraps the remaining characters in the item to the next line of the same column. Each line of the column conforms to the # width specification. The example below displays the first three characters of LAST-
NAME on one line, displays the next three characters on the next line directly below the first three characters, and so on, until the number of characters defined in the output width is used up.
ENTER COMMAND >DISPLAY *C3,LAST-NAME
INFO-Text only
*CONTEXT displays the specified A-item in context, by including with the search text the two lines before and the two lines after the search text.
INFO-Text only
CONTEXT displays all A-items referenced in the command line in context, by including with the search text the two lines before and the two lines after the search text.
INFO-Text only
INFO-Text only
*TEXT displays the text portion of the specified A-item.
TEXT displays the text portion of all A-items referenced in the command line.
[,...]any of the previous options may be specified, each preceded by a comma, for a total of 16 specifications.
,= an equal sign at the end of a display list prevents the carriage return after data from each selected record is displayed. INFO continues to display information on the same line, wrapping only when the display fills the screen width. Subsequent DISPLAY commands always reset this effect. It is used most often to save space when displaying one or two items.
180 Commands INFO Reference Manual
notes
DISPLAY
The = (equal sign) used as the first display specification clears the screen. If this is followed by the PRINT option, a page eject symbol is placed in your spool file.
PRINT writes the otherwise displayed information to your spool file.
NOLINE operates like the equal sign (=) when the equal sign is used at the end of a display list. This NOLINE effect does not carry over to subsequent DISPLAY commands.
AT displays the requested information at the specified row and column.
row,column row can be a value from 0 to 24. A value of
0 clears the screen. A value of 1 corresponds to the first usable line on the screen and a value of 24 to the last usable line. A value of 24 may cause the screen display to scroll. Column can be a value from 1 to the maximum screen width of your terminal.
n
An unqualified DISPLAY command displays all item values for all selected records with each record starting on a new line.
n
There cannot be more than 16 specifications (including format specifiers) per DISPLAY command.
n
The greater the number of formatting specifiers or the longer the literals you provide in the command line, the fewer the number of list terms that can be included in the
DISPLAY command line.
n
If a displayed line exceeds the screen width, your terminal wraps the line, unless the terminal is set otherwise.
Display Attribute Settings can be set for cursor-addressed
DISPLAY statements. The system item $DISPLAY-MODE should first be set to 1, then the following system items can be used:
INFO Reference Manual Commands 181
DISPLAY discussion
$DISP-ATTRIBUTE Any string used to set attibutes, such as reverse video, on. INFO has its own set of system items containing the ANSI escape sequences for such attributes, eg. $REVERSE. Items or variables will be displayed with this attribute.
$MESS-ATTRIBUTE Works as $DISP-ATTRIBUTE for default and user-defined error messages (Input Form format only).
$RESET-ATTRIBUTE Should be set to the system default display attribute setting when using $DISPLAY-MODE = 1.
Screen output will then return to normal upon returning to interactive use from an INFO program.
For example, $RESET-ATTRIBUTE = $NORMAL.
INFO processes the DISPLAY command request by building a display page in memory for each selected record, formatted according to the display specifications in the DISPLAY command line. INFO outputs each display page at the current cursor location unless the first display specification is an equal sign.
Output line width is determined by the totaling of each item, including the larger of output width or item name width, plus one for each item in the list. You can specify more spaces by using either the *X, #X, *TAB, or #T options.
If you end a display list with an equal sign (=), INFO leaves the cursor in the first position following the last character displayed. For example, the display command
DISPLAY 5T,' ',= displays a blank in column 6 and leaves the cursor in column 7.
182 Commands INFO Reference Manual
Displaying
A-type items
(INFO-Text)
examples
DISPLAY
You can also use the DISPLAY command with the TEXT option to list the text associated with A-type items. If a
RESELECT command using a word expression was issued previously, while displaying text from A-type items, word terms that meet the criteria of the word expression are highlighted on the screen in reverse video. If a
DISPLAY command including the TEXT and PRINT options follows a RESELECT command the printed output contains an asterisk (*) in the left margin of each line containing an occurrence of the word specified in the
RESELECT command word expression.
The CONTEXT option (used with or without the PRINT option) can be used to display only the two lines preceding and the two lines following each highlighted term. Use of the CONTEXT and TEXT options are mutually exclusive.
The following sequence displays the literal 'CLIENT
NAME: ', the value of the NAME data item, 10 spaces, a dollar sign and an amount.
ENTER COMMAND >SELECT D.ACCOUNT
2 RECORD(S) SELECTED
ENTER COMMAND >
DISPLAY 'CLIENT NAME: ',NAME,*X10,'$',BAL-DUE
CLIENT NAME: GIANT MANUFACTURING $10,000.00
CLIENT NAME: MIDGET WIDGETS 872.00
INFO Reference Manual Commands 183
DISPLAY
ENTER COMMAND >SELECT ADD-UPDATE-EXAMPLE
ENTER SYNONYM FILE NAME <RETURN>
2 RECORD(S) SELECTED
ENTER COMMAND >DISPLAY
1 A.FIL X00000302
2 B.FIL X00000402
ENTER COMMAND >DISPLAY TEXT
1
A.FIL
This is the contents of the file called A.FIL.
X00000302
This is the contents of a system-named text file.
2
B.FIL
This is the contents of the second text file named by the user.
X00000402
This is the second text file named by INFO-Text.
184 Commands INFO Reference Manual
DO...DOEND
DO
.
.
.
W
HILE
U
NTIL logical_expression
DOEN
D
allows you to perform a sequence of commands repetitively in an
INFO program.
arguments notes
WHILE instructs INFO to repeat the sequence of commands as long as the logical expression is true. This is the default when neither UNTIL or WHILE are specified.
UNTIL instructs INFO to repeat the sequence of commands until the logical expression is true.
logical_expression statement that INFO evaluates at the top of the DO loop.
n
DO and DOEND are two different commands that denote, respectively, the beginning and ending of the repeated sequence of commands. The DO command instructs
INFO to repeat the INFO commands bounded by the DO and DOEND commands according to the condition specified by the option and logical expression in the DO command.
n
Up to 100 DO...DOEND pairs can be nested in one INFO program.
n
If you include a DO command in an odd-numbered program section, avoid referencing data file items in the commands within the DO...DOEND group unless you wish to process the entire selected set.
n
To test the value of an item in a selected record or corresponding related record in an odd program section, use MOVE or CALCULATE to assign the item value to an appropriate system variable and test the value of the system variable.
INFO Reference Manual Commands 185
DO...DOEND
example
20000 PROGRAM SECTION TWO
For the selected
20001 DO WHILE $NUM1 LE 4
20002 CALCULATE QTR = QTR + MNTH
record currently positioned, perform a
20003 CALCULATE $NUM1 = $NUM1 + 1
sequence of commands.
20004 DOEND
186 Commands INFO Reference Manual
DOCDF
DOCD
F DF_name [output filename]
*
helps to document an INFO data file.
arguments note
DF_name an INFO datafile: if no output filename is specified, the print will go to a file called df_name.doc where df_name is the name of the INFO datafile.
* all datafiles will be processed. If no output filename is specified, an output file will be created for each datafile; if an output filename is specified, all print will go to that file.
output filename a filename may be specified to override the default filename.
Output files produced by this command are intended for further processing with a word processor or an editor for eventual incorporation into a larger document.
sample output
DATAFILE NAME: SUPEREG
Description of file usage **
COL ITEM NAME WID OUT TYPE DEC KEY COMMENTS
REDEFINED ITEMS **
1 TYPE 20 20 C — —
21 QTR1 10 10 N 2 —
31 QTR2 10 10 N 2 —
41 QTR3 10 10 N 2 —
51 QTR4 10 10 N 2 —
61 YEAR 10 10 N 2 —
71 DUMMY 4 4 C — —
INFO Reference Manual Commands 187
DOCIF
DOCI
F IF_name [output filename]
*
helps to document an INFO input-form.
arguments discussion note
IF_name an INFO input form: if no output filename is specified, the print will go to a file called if_name.doc where if_name is the name of the INFO input form.
* all input forms will be processed. If no output filename is specified, an output file will be created for each input form; if an output filename is specified, all print will go to that file.
output filename a filename may be specified to override the default filename.
This command produces an output file containing a sample layout of the screen defined by the input form.To
use this command, the INFO command 'FILES input-formname SAVE' must previously have been used while the files necessary to the input form were selected and related. The DOCIF command creates the form layout in the file input-form-name.DOC and appends the selected and related file details. The * option causes all input-forms in the directory to be documented.
Output files produced by this command are intended for further processing with a word processor or an editor for eventual incorporation into a larger document.
INFO Reference Manual Commands 189
DOCIF sample output
FIGURE X-XX: SUPIPF
TYPE ...........
YEAR .....
QUARTER 1 ......
QUARTER 2 ......
QUARTER 3 ......
QUARTER 4 ......
MENU OPTION DESCRIPTION
WHERE USED:
FILENAME REL ITEM NAME OPTION
FILES USED: SUPEREG 0
error responses
NO FILES SAVE WAS DONE FOR THIS ENTRY
.
190 Commands INFO Reference Manual
DOCRP
DOCR
P RP_name [output filename]
*
helps to document an INFO report.
arguments discussion note
RP_name an INFO report: if no output filename is specified, the print will go to a file called rp_name.doc where rp_name.doc is the name of the INFO datafile.
* all reports will be processed. If no output filename is specified, an output file will be created for each report; if an output filename is specified, all print will go to that file.
output filename a filename may be specified to override the default filename.
To use this command, the INFO command 'FILES reportname SAVE' must previously have been used while the files necessary to the report were selected and related.
The DOCRP command puts the report in the current INFO output file into a file called report-name.DOC and appends details of the selected and related files. It is therefore necessary first to run the report to the printer with enough data to illustrate the layout.
Output files produced by this command are intended for further processing with a word processor or an editor for eventual incorporation into a larger document.
INFO Reference Manual Commands 191
DOCRP sample output
FIGURE X-XX: SUPREP
10/ 1/96
SALES
PURCHASES
DIRECT LABOUR
GROSS PROFIT
MARKETING
TRANSPORT
FINANCE
ADMIN
OTHER
NET PROFIT
QTR 1
240.00
75.00
75.00
90.00
10.00
10.00
15.00
15.00
20.00
20.00
PAGE 1
SUPERCOMP TEST
QTR 2
250.00
75.00
75.00
100.00
10.00
10.00
10.00
15.00
20.00
35.00
QTR 3
250.00
75.00
90.00
85.00
15.00
10.00
0.00
15.00
30.00
15.00
QTR 4
260.00
75.00
90.00
95.00
15.00
10.00
10.00
15.00
30.00
15.00
615.00
192 Commands INFO Reference Manual
DOCSF
DOCS
F SF_name [output filename]
*
helps to document an INFO special form.
arguments discussion
SF_name an INFO special form: if no output filename is specified, the print will go to a file called sf_name.doc where sf_name is the name of the INFO special form.
* all special forms will be processed. If no output filename is specified, an output file will be created for each special form; if an output filename is specified, all print will go to that file.
output filename a filename may be specified to override the default filename.
To use this command, the INFO command 'FILES specialform-name SAVE' must previously have been used while the files necessary to the special form were selected and related. The DOCSF command creates the form layout in the file special-form-name.DOC and appends the selected and related file details. The * option causes all special forms in the directory to be documented.
DOCSF is a synonym for DOCIF and its output is therefore identical to DOCIF.
INFO Reference Manual Commands 193
DONE
DONE
terminates processing of the current even-numbered program section and passes control to the next odd-numbered program section.
notes example
Use the DONE command in an INFO program to exit from an even-numbered program section before all instructions or selected records have been processed.
Specify DONE as the last command in an even-numbered program section if you want to terminate processing after a single execution of the section, even though many records are selected.
The sample program below is designed to accumulate the value of COST for the first six records only and then display the total.
ENTER COMMAND >TYPE P.EXAMPLE
PROGRAM NAME: P.EXAMPLE
10000 PROGRAM SECTION ONE
10001 SELECT D.COST.FILE
10002 FORMAT $NUM1,8,N,2
10003 CALCULATE $NUM1 = 0
20000 PROGRAM SECTION TWO
20001 CALCULATE $NUM1 = $NUM1 + COST
20002 IF $RECNO = 6
20003 DONE
20004 ENDIF
Stop execution of this program after the sixth record.
30000 PROGRAM SECTION THREE
30001 DISPLAY AT 15,20 'TOTAL COST = $NUM1
INFO Reference Manual Commands 195
DPG
DPG
program-name
used to dump an INFO program to a command file for editing by the SYSTEM editor and later execution from within INFO to replace the current program.
discussion examples
The program name entered by the user is dumped to a sequential SYSTEM file with the same name, complete with the INFO commands necessary to regenerate it by the execution of the command file from INFO. The dumped file may be edited with the SYSTEM editor.
DPG POST-INVOICES
You would then edit the SYSTEM file and type:
CO POST-INVOICES
INFO Reference Manual Commands 197
DRP
DRP
report-name
used to dump an INFO Report Format to a command file for editing by the SYSTEM editor, and later execution from within
INFO to replace the current report format.
discussion
The report format name entered by the user is dumped to a sequential SYSTEM file with the same name, complete with the INFO commands necessary to regenerate it by the execution of the command file from INFO. The report format is dumped with the commands necessary for specifying the "LONG" option (number of title lines, number of column header lines, and report width) to give the user more flexibility in modifying the report format.
The dumped file may be edited with the SYSTEM editor.
examples
DRP INVOICE-REPORT
You would then edit the SYSTEM file and type:
restrictions
CO INVOICE-REPORT
The necessary files must first be selected and related.
This can be done with the SETUP command.
The dumped format will not contain TABs that were entered when the report was first defined. The best way to preserve extra space between columns is to define blank fields (' ') when defining the report, as these are picked up when the report is dumped.
INFO Reference Manual Commands 199
DSEL
DSE
L
'deselects' the current record from the working set and branches to the end of the even-numbered program section.
note discussion
Any changes to the selected and related records are retained.
If conditional processing within a program even section determines that the current record will not be required for further processing, the record can be dropped from the working set.
example
PROGRAM SECTION TWO
IF $1PRODUCT-REVISION = '9.2'
MOVE 'OLD' TO $1STATUS
DSEL
ENDIF
PROGRAM SECTION THREE
REPORT CURRENT-PRODUCT-REP
DSEL will cause INFO to branch to the end of the evennumbered program section, write out the current file buffers (if they have been updated), remove the current selected record from the set, and proceed with the next selected record as normal.
INFO Reference Manual Commands 201
DSF
DSF
special-form-name
used to dump an INFO Special Form format to a command file for editing by the SYSTEM editor, and later execution from within
INFO to replace the current special form format.
note discussion
The dumped format will not contain TABs that were entered when the report was first defined. The best way to preserve extra space between columns is to define blank fields (' ') when defining the report, as these are picked up when the report is dumped.
The special form name definition entered by the user is dumped to a sequential SYSTEM file with the same name, complete with the INFO commands necessary to regenerate it by the execution of the command file from
INFO. The dumped file may be edited with the SYSTEM editor.
example
DSF CHECKS
You would then edit the SYSTEM file and type:
CO CHECKS
The necessary files must first be selected and related.
This can be done with the SETUP command.
INFO Reference Manual Commands 203
EDIT
EDIT
filepath [
S
YSTEM] [
PR
INT]
IF_name
PG_name
RP_name
SF_name
[
L
INE]
runs the system editor specified in external variable .INFOEDIT for
VMS/PRIME or _INFOEDIT for UNIX with command line options set by .INFOEXT for VMS/PRIME or _INFOEXT for UNIX.
arguments
IF_name | PG_name | RP_name | SF_name the INFO file to be changed
SYSTEM indicates that the specified file is a SYSTEM file.
[PRINT] sends a copy of the non-datafile to your spool file after you make any changes to it. If you include the PRINT option for a SYSTEM file, INFO assumes that all the data in the file is printable; it does not perform any data conversion before printing.
[LINE] edits an INFO program with the source line numbers intact.
notes
n
The option PRINT behaves differently with CHANGE. With
CHANGE the PROGRAM is written to the SPOOL file only at start up time, meaning amendments made do not reflect to the SPOOL file. EDIT writes to the SPOOL file at the end of your editing session whether it has been amended or not.
n
When editing an INFO report, the current number of column headers and the report width will be displayed, and you will be asked if these are to be changed or retained.
The title lines are displayed with a (TITLE) prefix and any new titles should be input in the same format. On leaving the editor, if you quit or file with no changes, you will be asked if you wish to apply your title or column changes.
INFO Reference Manual Commands 205
EDIT examples
n
When editing an INFO special form, the current number of lines per page and columns per line are displayed, and you are asked if these are to be changed or retained. On leaving the editor, if you quit or file with no changes, you will be asked if you wish to apply your line and column changes.
n
With EDIT you can use your choice of editor or wordprocessor; the default is the SYSTEM editor.
n
If you wish to change EDIT to use another editor, simply change the logical/global variable .INFOEDIT or environment variable _INFOEDIT to the name of the editor. If your editor has any command line options, then set the logical/global variable .INFOEXT or environment variable _INFOEXT to the command line options you usually use with the editor.
n
Quitting from the editor will not decode the program, input form, etc. Only writing the file will decode it, thereby requiring a compilation when it is next executed.
For INFO utility command:
ENTER COMMAND >GVSET '._INFOEDIT' 'EMACS'
ENTER COMMAND >GVSET '._INFOEXT' '-W-TERM ANSI'
For SYSTEM:
OK,SET_VAR. _INFOEDIT:= EMACS
OK,SET_VAR. _INFOEXT:= -W-TERM ANSI
see also
CHANGE
206 Commands INFO Reference Manual
ELAPSED
ELAP
SED item-name
returns the elapsed CPU time since LOGIN in seconds.
argument error message
item-name numeric item to receive the returned value.
ITEM NOT NUMERIC
INFO Reference Manual Commands 207
ENCODE
ENCO
DE item-1 [TO] item-2 [item-3]
tries to convert character data to numeric or date Format.
argument discussion
item-1 character_item to be converted.
item-2 numeric_item or date_item to receive the converted data item.
item-3 optional numeric_item to receive an error return code.
Tries to convert item-1 to item-2. Item-2 is left unchanged if conversion fails. Optional item-3 set to 0 if conversion succeeds, otherwise set to 1.
error message
ITEM NOT NUMERIC
see also
CLAC
INFO Reference Manual Commands 209
END
when executed within an INFO program, ends that program.
END notes
Use the END command in an INFO program to stop the execution of that program independently of the actual end of the program.
Note that INFO returns control to INFO command level even if the program in which the END command occurs was executed from a RUN...LINK command.
example
20020 IF $CHR1 = 'E'
20021
20022
END
ELSE
Terminate program execution here.
20023 RUN R.INCREMENT LINK
20024 ENDIF
INFO Reference Manual Commands 211
ERASE
ERA
SE file_name
deletes an entry from your INFO directory.
argument notes
file_name specifies the name of the entry to be deleted from your INFO directory.
The ERASE command operates only on entries that exist in your INFO directory; you cannot delete an INFO entry from an alternate directory using ERASE. Also note that you cannot use ERASE to delete an entry with an
EXTERNAL association.
A data file must be selected before it can be erased.
discussion
To delete a data file it must be selected and, if protected, must have been selected with the control-level password.
(See the PROTECT and PASSWORD commands for information about protected data files.) You can delete a report, program, input form, or special form regardless of the selected data file.
When you enter a valid ERASE command, INFO requests verification as follows:
THIS COMMAND WILL ERASE THE SPECIFIED file-type
DO YOU WISH TO CONTINUE (Y OR N) >
INFO-Text where file-type denotes the type of INFO entry (e.g., DF,
PG). Enter Y (yes) to delete the entry; enter any other character or RETURN to abort the request.
If the file-type to be erased is an extended data file, you are additionally prompted as to whether the text item files should be deleted:
DELETE TEXT ITEM FILES (Y OR N) >
INFO Reference Manual Commands 213
ERASE example
THIS COMMAND WILL ERASE THE SPECIFIED DF
DO YOU WISH TO CONTINUE (Y OR N) >Y
DELETE TEXT ITEM FILES? (Y or N) >
ENTER COMMAND >SELECT D.TEST
ENTER COMMAND >ERASE D.TEST
THIS COMMAND WILL ERASE THE SPECIFIED DF
DO YOU WISH TO CONTINUE (Y OR N) >Y
The data file D.TEST no longer exists in this user's
INFO directory.
214 Commands INFO Reference Manual
EXECUTE
EXEC
UTE DF_item system_variable literal
passes the value of a specified data file item or system variable to
INFO to execute as an INFO command.
arguments notes
DF_item is an item in an INFO data file containing a valid
INFO command.
system_variable is one of the INFO system character variables containing a valid INFO command.
literal is a string containing a valid INFO command
An unqualified EXECUTE will execute the contents of the system variable $CHR1.
When used interactively, the specified item or system variable must contain a valid interactive command. INFO reads the INFO command only from the first 200 characters of the specified item or $CHR# system variable.
An EXECUTE command used in a program is decoded when the program is executed, because INFO does not know the contents of the stored command entry until the program is actually executing.
Do not use the following commands with EXECUTE:
ALTER EXECUTE REDEFINE
COPY EXTERNAL RELATE
DEFINE GET SELECT
ERASE MODIFY TAKE
In any section of a program (odd- or even-numbered), you cannot use the EXECUTE command to perform any command that would normally be invalid in a program, or any of the following commands that are normally valid in a program:
DO...DOEND FIRST
DONE GOTO
LABEL
PROGRAM
IF...ENDIF
INFO Reference Manual Commands 215
EXECUTE discussion
In even-numbered program sections, you cannot use
EXECUTE to perform the command NEXT.
The EXECUTE command passes the value of the specified data file item or system variable to INFO to execute as an INFO command. The specified value must have been previously stored in the item or system variable.
The length of the value that is interpreted as an INFO command is determined by the defined width of the data file item or by the formatted width of the system variable.
The value interpreted as a command must be appropriate for the environment in which the EXECUTE command is performed; otherwise, the results of executing the stored value as an INFO command can be unpredictable, and almost certainly wrong.
Also remember that all rules regarding odd- and evennumbered program section processing apply for the stored command. For example, if you issue the EXECUTE command in an odd-numbered program section, and if the stored command is an active INFO command, the stored command processes the entire selected set.
example
ENTER COMMAND >FORMAT $CHR1,40,C
ENTER COMMAND >FORMAT $CHR6,40,C
ENTER COMMAND >MOVE 'RUN P.MAIN.MENU' TO $CHR1
ENTER COMMAND >MOVE 'REPORT R.YTD.SALES Y 60' TO $CHR6
ENTER COMMAND >EXEC $CHR6
ENTER COMMAND >EXEC
By default, INFO executes as a command the value in
$CHR1
216 Commands INFO Reference Manual
EXPAND
EXP
AND item-1 [INTO] item-2
translates a numeric value into appropriate English text.
arguments note discussion
item-1 the numeric_item that contains a numeric value.
[INTO] used for documentation or ease of understanding.
item-2 the numeric DF_item, system_variable or system_item that will contain the English translation of the numeric value.
The target DF_item or $CHR must be large enough to hold the translated words.
The EXPAND command translates the integer portion of a numeric value into words and the decimal position into the form AND nn/100. As necessary, EXPAND rounds the decimal portion to two positions before translation. If the item you are translating is defined as an integer, INFO includes AND 00/100 at the end of the translated value.
For example, the stored value 124.67 translates into
English as shown below:
ONE HUNDRED TWENTY-FOUR AND 67/100
You can use the EXPAND command followed by a
CONCATENATE command to fill any remaining right-most characters in the translated field. This can be used, for example, for security reasons during check processing.
INFO Reference Manual Commands 217
EXPAND examples
ENTER COMMAND >$NUM2 = 124.67
ENTER COMMAND >EXPAND $NUM2 INTO TARGET
ENTER COMMAND >DISPLAY TARGET
ONE HUNDRED TWENTY-FOUR AND 67/100
ENTER COMMAND >CONCATENATE TARGET FROM TARGET, DLS*******'
ENTER COMMAND >DISPLAY TARGET
ONE HUNDRED TWENTY-FOUR AND 67/100 DLS***
Notice that the string of asterisks being concatenated with the translated value is longer than necessary. INFO truncates the fill string to fit the field, following the normal rules for concatenation. See the CONCATENATE command for more information.
ENTER COMMAND >FO $CHR1,30
ENTER COMMAND >EXPAND 4.565 INTO $CHR1
ENTER COMMAND >DISPLAY $CHR1
FOUR AND 57/100
218 Commands INFO Reference Manual
EXPORT
EXPO
RT file_path
ASCII
[
NORM
AL]
SDF
[
TRAN
SPOSE] [
[
APPE
INIT
]
ND]
2020
DIF
SYLK
CSV
syntax cont’d
[DF_item]
[system_item]
[,...]
[system_variable]
writes the contents of a data file into a system file. The system file is written in one of six delimited formats.
arguments
file_path the system file name of the output file.
ASCII | SDF | 2020 | DIF | SYLK | CSV the file format of the output file. See Appendix P, Import/Export File
Formats.
ASCII produces an output file that resembles a standard print file Places each item value on its own line. Uses a blank line to separate records. Encloses character data in quotation marks.
SDF produces an output file in BASIC format. Separates item values with commas. Places each new record on a new line. Encloses character data in quotation marks.
2020 produces an output file ready to be imported into
20/20. Passes only cell contents. Uses # sign between item values. Precedes character data with quotation marks showing justification.
DIF produces an output file in industry-standard DIF format. Includes a header section sharing the file name and overall format. Provides a data section with row and column indicators along with cell type and contents.
SYLK produces a file whose format meets all Multiplan requirements.
INFO Reference Manual Commands 219
EXPORT notes
CSV comma separated values. Produces a file with numerics, character items and dates held as strings separated by commas, with no quotation marks around the characters or dates. The output file would be suitable for use with ADD FROM
Note. If character items contain commas, this is not a suitable option. Date fields are exported in a form not compatible with IMPORT.
[NORMAL | TRANSPOSE] are positioning modes.
NORMAL is the default positioning mode. Each data file record goes out as one row for the spreadsheet.
TRANSPOSE is the alternate positioning mode. Each data file record goes out as a column for the spreadsheet.
TRANSPOSE cannot be used in an even-numbered program section.
[APPEND | INIT]
defines the writing mode.
APPEND is the default writing mode. If a system file already exists, INFO adds the new information to the end.
INIT is the alternative writing mode. With INIT, INFO purges the existing system file before it writes the new data.
[
DF_item | system_item _ | system_variable] the name of the item or variable whose value will be exported.
DF_item is an INFO data file item .
system_item is an INFO system item.
system_variable is an INFO system variable.
If no items are specified all items on the selected file are
EXPORTED.
n
The EXPORT command copies the records of a data file into a system file. You can use the command interactively, in odd-numbered program sections, and in even-numbered program sections.
220 Commands INFO Reference Manual
note
EXPORT
n
If the system file does not already exist, INFO creates it.
n
You must select the source data file before you can issue the command. INFO uses the currently selected/related data files as the source.
n
All EXPORT formats excepting CSV output dates in military format.
n
Each of the file formats uses one delimiter between item values and a different delimiter between records. During an export, INFO reads one item value out of the data file and places that value in the next sequential delimited field of the system file. At the end of each record, INFO places a record delimiter.
n
When you include data file items in the command line,
INFO exports item values in the order in which the items are listed.
n
INFO logs the results of EXPORT to your spool file. INFO also displays brief versions of any error messages on your terminal screen.
n
The maximum item length that may be exported is 200 bytes: if an exported item is longer than this it will be truncated. N.B. if the exported data is to be imported back into INFO, IMPORT has a maximum item length of 189 bytes.
The maximum record length for the various EXPORT formats is as follows:-
ASCII
SDF
2020
DIF
SYLK
CSV
4096bytes
2048 bytes
2048 bytes
4096 bytes
4096 bytes
4096 bytes
These maximum lengths include the various field delimiters
INFO Reference Manual Commands 221
EXPORT
Exporting during programs
Within each program section, the first time INFO executes
EXPORT with a new data file name, it positions itself at the first record. At the end of each section, INFO closes the system file.
n
TRANSPOSE is not allowed in even-numbered program sections.
Considerations
The DIF and SYLK file formats include the number of rows
for DIF and
in the file as a piece of information in the header. When
SYLK files
you create a DIF or SYLK file in an even-numbered program section, INFO assumes that the total number of selected records is the number of rows to be written. Be careful when writing your programs: if you should write out fewer records than this, the number INFO puts in the file header is wrong. Some applications give you error messages when they encounter files with this type of inconsistency.
If you use EXPORT to append records to an existing DIF or SYLK system file, INFO places those records at the end of the file after the end-of-data record. Your application might stop when it reaches the end-of-data record. In this case, your application ignores the appended records.
We strongly suggest that you use only one EXPORT command per even-numbered program section. If you use
EXPORT twice in the same even-numbered section and the command specifies two different system files in DIF or
SYLK format, INFO writes an end-of-data only to the last active system file. The other system file does not receive the mandatory end-of-data record.
222 Commands INFO Reference Manual
EXPORT example
ENTER COMMAND >SELECT TEST
3 RECORD(S) SELECTED
ENTER COMMAND >LIST
$RECNO BLDG Q1
1
2
3
A -500.00
Q2
3950.00
B 9450.00
0550.00
C 4275.00
4950.00
Q3
4050.00
10575.00
4950.00
ENTER COMMAND >EXPORT SAMPLE1 ASCII
3 RECORD(S) EXPORTED
ENTER COMMAND >EXPORT SAMPLE2 DIF Q1,Q2
3 RECORD(S) EXPORTED
ENTER COMMAND >EXPORT SAMPLE3 DIF TRANSPOSE INIT
5 RECORD(S) EXPORTED
Q4
4050.00
10575.00
4950.00
To create your own customized EXPORT format, see the
INFO Exchange Manual.
see also
IMPORT
Appendix P Import/Export File Formats.
INFO Reference Manual Commands 223
EXST
EXS
T file_path return-code
Checks for the existence of an operating system file.
arguments
file_path character variable or string literal (the string literal may be an external variable enclosed in ‘%’ characters).
return-code
numeric variable
0 = File exists
1 = File does not exist.
INFO Reference Manual Commands 225
EXTERNAL
EXT
ERNAL file_name
allows you to create, cancel, or display a permanent association between an INFO object and a file outside of your INFO user area. An external association gives you automatic access to a file outside your INFO user area whenever the associated INFO entry is accessed.
argument notes
file_name is used to reference an entry in the INFO directory. Enter the name of an INFO datafile, report, program, input form or special form.
n
An unqualified EXTERNAL allows you to associate the selected data file with an operating system file; the INFO file must not contain any records. If the selected data file is already associated with an operating system file,
EXTERNAL displays the name of the associated external file.
n
A full system pathname for a file with which you are making an external association cannot be longer than 80 characters under Unix and Primos and 64 characters under VMS. However, by using external variables on part or all of a pathname, the expanded pathname may be of any length the operating system allows.
n
You can create external associations for any INFO file in your INFO user area.
n
There are important differences between creating an external association for an INFO data file and for an INFO program, report, input form, or special form. The use of the EXTERNAL command differs in the two cases, and there are different file access considerations for them.
INFO Reference Manual Commands 227
EXTERNAL
Making a data file external
To associate an external file with a data file: n
Create or find a file outside of your INFO user area containing data records; this file, to be made external, can reside in any operating system directory.
The file can contain data records just as INFO data files contain data records. In fact, this file can be an INFO data file in another INFO user area or in another system directory, or it can be a file created by another application or program on your computer.
n
Use the DEFINE command to create a data file in your
INFO user area with a template identical to that of the file to be made external. Another method would be to use the
TAKE command.
n
Use the EXTERNAL command:
ENTER COMMAND >EXTERNAL
ENTER COMPLETE FILE NAME OF EXTERNAL FILE.
/plat2/fred/info/abc000dat
DATABASE (C/R FOR DEFAULT, LIST FOR OPTIONS)>
Respond with the full operating system pathname of the file to be associated externally. For an INFO data file in a different INFO directory, use the internal name of the file, as in the above example. Or, after the prompt, enter
<RETURN>, which terminates the command with no external association created.
The DATABASE default is XX, for most fixed or variable length files. If the file to be externalled to is an ISAM file then the value CI (UNIX) or XI (VMS or PRIME) should be entered. LIST will display a list of currently available options.
228 Commands INFO Reference Manual
EXTERNAL
Changing or cancelling a data file external
You no not need to SELECT a data file to change its external; specify the data file name as an argument to
EXTERNAL. INFO creates the external association with the extenal file when the data file is next selected or related.
Until you cancel the external association, the external file and its data records are accessed when the associated INFO data file is referenced.
n
Once an external association exists for a selected data file, you can enter an unqualified EXTERNAL command to display the pathname of the external file.
ENTER COMMAND >EXTERNAL
EXTERNAL FILE NAME:
/plat2/fred/info/abc000dat
DO YOU WISH TO CANCEL EXTERNAL (Y OR N) >
Respond N (no) or <RETURN> to retain the association; or Y (yes) to cancel the association. If you respond yes, you can optionally specify another file name to associate with the selected data file. If the response is Y, INFO prompts:
ENTER COMPLETE FILE NAME OF EXTERNAL FILE
If you want to associate the selected file with a new external file, enter a new pathname and file name. The new association will be recognised the next time the data file is selected or related.
After a Y response to the ...CANCEL EXTERNAL (Y OR
N) prompt, you can also enter <RETURN> . This cancels the external association and terminates the external command.
The external association is canceled for future use, but not closed immediately. The data is still available until you enter another SELECT command.
For information on how to create a new empty ISAM template; see Appendix J, ISAM considerations.
INFO Reference Manual Commands 229
EXTERNAL
Making a non-data file external
You can associate an external file with an INFO report, program, input form, or special form.
Verify that the program, special form, report, or input form exists in your INFO user area. If the file does not exist, create and define a dummy file using the following guidelines:
A program file must contain at least one program line after the statement PROGRAM SECTION ONE.
An input form must contain at least one row, column entry.
A special form must contain size information. Specifically, when the form is defined, you must respond to the LINES
PER PAGE> and COLUMNS PER LINE> prompts. See the SPECIAL FORM command for information about defining a special form.
A report must contain title-line and header-line information. Specifically, when the report is defined, you must respond to the NUMBER OF TITLE LINES> and
NUMBER OF HEADER LINES> prompts, whether or not any report lines are defined. See the REPORT command discussion for information about defining a report.
Make sure that the program, report, or form has been compiled or executed at least once.
Verify the existence of the OBJ file you are linking to your non-data file. If you plan to look at the source version of the non-data file after the EXTERNAL association is made, you must also verify the existence of the corresponding
SRC file.
Use the EXTERNAL command:
ENTER COMMAND >EXTERNAL non-DF_name
ENTER FULL NAME OF EXTERNAL OBJECT FILE.
230 Commands INFO Reference Manual
EXTERNAL
Respond with the fully qualified pathname of the OBJ file for the non-data file.
ENTER COMMAND >/plat2/fred/info/abc018obj
INFO then prompts:
ENTER FULL NAME OF EXTERNAL SOURCE FILE.
Respond with the fully qualified pathname of the SRC file for the non-data file. If the SRC file will not be displayed in future INFO processing (that is, no RUN with LIST or
TYPE commands using the SRC file will be executed), you can respond with <RETURN> to this prompt.
To display the pathname of an external file after it is associated with a non-data file, enter:
ENTER COMMAND >EXTERNAL non-DF_name
INFO displays the file name and then prompts:
DO YOU WISH TO CANCEL EXTERNAL (Y OR N)>
Respond N (no) or <RETURN> to preserve the association, or respond Y (yes) to cancel the association or to specify a new external file.
If the response is Y, INFO again prompts:
ENTER FULL NAME OF EXTERNAL OBJECT FILE.
Now, enter a pathname for the OBJ file to be made external. If you enter <RETURN> at this point, INFO ignores the response and retains the existing external association. Once INFO receives the OBJ file name, it prompts:
ENTER FULL NAME OF EXTERNAL SOURCE FILE.
Enter the pathname of the SRC file to be made external, or a <RETURN> if the SRC file will not be displayed in future INFO processing (that is, if no RUN with LIST or
TYPE commands using the SRC file will be executed).
INFO Reference Manual Commands 231
EXTERNAL example
To cancel an existing external association for a non-data file, you must delete the non-data file from your INFO user area with the ERASE command. This removes the dummy file from your user area, but does not harm the operating system file.
The following example establishes an external association between the empty data file DF.MASTER and the file
busch/prospects/mydata.dat:
ENTER COMMAND >SELECT DF.MASTER
0 RECORD(S) SELECTED
ENTER COMMAND >EXTERNAL
ENTER COMPLETE FILE NAME OF EXTERNAL FILE
busch/prospects/mydata.dat
ENTER COMMAND >SEL DF.MASTER
10 RECORD(S) SELECTED
232 Commands INFO Reference Manual
FILES
FILE
S [IF_name
PG_name
RP_name
SF_name]
[
[
S
G
AVE]]
ET]
displays information about selected and related files.
arguments notes
IF_name is the name of an INFO input form file.
PG_name is the name of an INFO program file.
RP_name is the name of an INFO report file.
SF_name is the name of an INFO special form file.
SAVE restores a record of the file relationships and internal variable formats used with the named program, report or form.
GET restores the file relationships and internal variable formats used with the named program, report or form once they have been saved.
n
Make sure, when you use the FILES command with the
SAVE option, that the currently selected and related files are those for the specified program, report, or form.
n
There are three forms of the FILES command, as follows:
1) An unqualified FILES command displays the names of all currently selected and related files.
2) When used with the SAVE option, the command stores the names of the currently selected and related files and the formats of the internal variables ($CHR#, $NUM#, $DAT#) against the named program, report or form. Once the file information is saved, you can display the saved file information for that report or form so that you can establish the same file environment before execution.
3) If the file information for the specified program, report, or form was saved using the FILES...SAVE command, a
FILES command followed by a program, report, or form name displays that file information.
INFO Reference Manual Commands 233
FILES discussion
The column headings for the FILES display are described below:
RELNO is the relate number of the file in the buffer: 0 for the selected file, 1 for the first related file, and so on.
DATAFILE is the name of the selected or related file.
START is the starting position, within the buffer, for the file.
LENGTH is the file record length, in bytes.
RELATED BY is the name of the common item by which the file is related to the previously named file.
OPTION lists the options used when the data file was related using the RELATE command. See the RELATE command for more information about RELATE command options.
example
The following sequence of commands selects a file, relates two files, and requests a FILES display:
ENTER COMMAND >SELECT TIME-CLOCK
0 RECORD(S) SELECTED
ENTER COMMAND >RELATE PAY-MASTER 1 BY CLOCK-NO ORDER NUMERIC
ENTER COMMAND >RELATE COST-CODE 2 BY $1COST-CODE SEQUENTIAL
ENTER COMMAND >FILES
RELNO
0
DATAFILE
TIME-CLOCK
START
1
LENGTH
250
RELATED BY OPTION
1
2
PAY-MASTER
COST-CODE
251
605
354
110
CLOCK-NO
$1COST-CODE
ORDE NUME
SEQU
see also
SETUP
234 Commands INFO Reference Manual
FILL
FILL
relno
O
N
OF
F
permits the turning on and off of the fill option on a related file.
arguments description
relno identifies the related file
ON or OFF switches the fill option on the related file
This command permits the turning on or off of the FILL option on a RELATEd file which is identified by its relate number.
By using this technique, it is possible to generate records from the selected working set as and when required, rather than for each selected record. See the examples below.
examples
10000 PROGRAM SECTION ONE
10001 SEL ANY-FILE
10002 REL ISAM-FILE 1 BY KEY
20000 PROGRAM SECTION TWO
20001 IF DATA CN ‘NEW’
20002 FILL 1 ON
20003
20004
20005 ENDIF
20006
FILL 2 OFF
$1DATA = DATA
no option on FILL switch FILL option on switch FILL option off
3000 PROGRAM SECTION THREE
In the above example, a record will be created on the related ISAM file only if the item DATA in the selected record contains the string NEW and if the KEY value did not already exist on the ISAM file.
Note that reference to the related record ($1DATA = DATA in the example above) must be made for the record to be created: the record is actually written when INFO reaches the end of the program section.
INFO Reference Manual Commands 235
FILL
This technique is also useful when building up a composite key in a selected transaction file, in anticipation of creating a record on a related ISAM file.
examples
10000
10001
10002
10003
10004
ADD-ISAM-IPF
PROGRAM SECTION ONE
SEL TRANSACTION-FILE
PURGE
REL ISAM-FILE 1 BY KEY
IPF ADD-ISAM-IPF
3,10,KEY-PART1
prompt for first part of key
3,20,KEY-PART2
prompt for second part of key
rem Check if key exists on related ISAM file
IF $RELREC1 = 0
FILL 1 ON
FILL 1 OFF
key does not exist on ISAM file switch FILL option on switch FILL option off
ENDIF
$1DATA = DATA
reference to related record required to create record, which is written at the end of the input form
see also
RELATE
$FORCE-WRITE in Appendix D, Systems Items
236 Commands INFO Reference Manual
FIRST
FIR
ST
A
LL relate_# ...
[Label]
positions the specified related file(s) to the record at which processing began for the currently selected record.
arguments notes
ALL requests FIRST processing for all files that are currently related. INFO processes the files in order of their relate numbers, beginning with the lowest relate number.
relate_# ... the relate number(s) of the file(s) to be processed. Up to nine related files can be specified.
Label valid LABEL name in the program or input form.
n
When you use an unqualified FIRST command, INFO processes only the first related file (whose relate number is
1).
n
To process a different related file or more than one related file, enter the relate number for the first file to be processed, followed by the relate number of the second file to be processed, and so on. If you cannot remember the relate numbers of your related data files, use the
FILES command to display them.
n
The FIRST command instructs INFO to reposition, within a related file, to the first record for which the value of the relate key item matches the related item in the selected
(or previously related) record.
n
A single FIRST command can work on up to nine different related files, processing them in the specified order.
INFO Reference Manual Commands 237
FILL restriction example
Use the FIRST command after one or more NEXT commands, to reaccess related records having the same related key item value. See the NEXT command for more information.
n
When a label is specified, control is passed to this label on a match rather than to the following statement in the evennumbered program section or input form. If no match is detected control will be passed to the following statement.
n
If MODE SET EXACT (see MODE command) is on for a related file, INFO will permit a partial key match determined by the value in the common related item.
When used with the FIRST and NEXT commands with blank in the selected record key, INFO positions to the first record in the related file(s) using FIRST, then can read the whole file(s) using NEXT. Using the same technique with a ‘B’ in the selected record key, INFO positions to the first record in the related file(s) whose related item begins with
‘B’, then can read all the related records which also meet this criteria.
Not valid interactively or in odd-numbered program sections.
In the following example, there are multiple matches in the
D.BILLING file for each value of BILL-CODE in the
D.ACCOUNTS file. Note that the D.BILLING file has been sorted on BILL-CODE. The program will process the
NEXT command (statement 20003) within the set of billing records for each unique value of the item BILL-CODE in the D.ACCOUNTS file and accumulate the total quantity and price into $NUM1 and $NUM2, respectively.
When the NEXT processing finds no more matches for a particular BILL-CODE value in the D.BILLING file, the
FIRST command is executed (statement 20004). This causes INFO to reposition the related data file to the first record matching the current BILL-CODE value in the selected data file. The accumulated amounts are then placed in this first record's $1QTY and $PRICE items, overriding the original values.
238 Commands INFO Reference Manual
ENTER COMMAND >TYPE P.FIRST.EXAMPLE
PROGRAM NAME: P.FIRST.EXAMPLE
10000 PROGRAM SECTION ONE
10001 SELECT D.ACCOUNTS RO
10002 RELATE D.BILLING BY BILL-CODE RO
10003 FORMAT $NUM1,5,I
10004 FORMAT $NUM2,8,N,2
10005 CALCULATE $NUM1 = 0
10006 CALCULATE $NUM2 = 0
10007 REM
20000 PROGRAM SECTION TWO
20001 CALCULATE $NUM1 = $NUM1 + $1QTY
20002 CALCULATE $NUM2 = $NUM2 + $1PRICE
20003 NEXT
20004 FIRST
20005 CALCULATE $1QTY = $NUM1
20006 CALCULATE $1PRICE = $NUM2
20007 CALCULATE $NUM1 = 0
20008 CALCULTATE $NUM2 = 0
20009 REM
30000 PROGRAM SECTION THREE
30001 REPORT R.MO.BILLING Y 60
FIRST
INFO Reference Manual Commands 239
FORMAT
FO
RMAT $NUM#
,width [,output_width] [,type] [,decimal_places]
$CHR#
$DAT#
defines new characteristics for one of the INFO system variables
$CHR#, $DAT#, or $NUM#.
arguments notes
$NUM# variables store numeric values.
$CHR# variables store character values.
$DAT# variables store date values.
,width the internal width of the variable.
[,output_width] the output width of the value of the variable.
[,type] INFO item type. Item types are described in the
DEFINE command reference.
[,decimal_places] only for numeric item types with decimal positions.
n
It is important to format all system variables both before they are used in a form, program, or report and before any corresponding form, program, or report is executed.
System variables must also be formatted correctly before a program is compiled.
n
FORMAT specifications are similar to those for data file items specified with the DEFINE command and follow all rules established for that command. Aspects of concern are described below for each of the system variable types.
n
MODE SET FORMAT allows you to save off the format
320-byte internal variable buffer and reset it to the saved format at a later time, or in another part of a program.
See the MODE command.
INFO Reference Manual Commands 241
FORMAT discussion
The FORMAT command sets formats for the system variables $NUM#, $CHR# and $DAT#. Using FORMAT, you can control the internal width, output width, data type and decimal positions for each system variable.
With the FORMAT command, you define the characteristics of one of the 40 locations that can be formatted in a 320-byte buffer that is internal to INFO.
Each of the 40 locations can be defined at a given time, as a numeric value, formatted as $NUM#; a character value, formatted as $CHR#; or a date value, formatted as
$DAT#.
By default, each system variable occupies an 8-byte portion of the system variable buffer: $NUM1, $CHR1, or
$DAT1 ($xxx1) occupies bytes 1—8; $xxx2 occupies bytes
9—16; $xxx3 occupies bytes 17—24, and so on. Default formats for the system variables are shown below.
Table FORMAT-1 System variable default formats
Item type Input width Output width Type Dec.
positions
$NUM#
$CHR#
$DAT#
8
8
8
16
16
11
F
C
D
2
-
-
NB. If you change the format of any system variable, the variable will occupy the buffer area necessary to accommodate the new format, starting with the first position allocated to that variable. The system variable
$xxx1 starts in position 1, $xxx2 starts in position 9, and so on; therefore the maximum of $CHR1 is 320 byes, that of $CHR2 is 312, etc.
Be careful when you extend the width of a $CHR# or
$NUM# item beyond the default width: the storage for the trailing contiguous system variables is overwritten when you next assign a value to that $CHR# or $NUM# system variable. For example, if you define $CHR4 to be 30 characters long, the space normally reserved for $xxx4—
$xxx7 is used by the $CHR4 variable. You cannot display or calculate using the values in $NUM4, $NUM5, and so on, as INFO interprets information stored in $CHR4 as character information.
242 Commands INFO Reference Manual
$NUM# variable items
$CHR# variable items
$DAT# variable items
FORMAT
$NUM# items are often used for accumulators or other storage areas, where the defined length of a data file item is too small. By varying the type defined for a $NUM# item, you can control its storage capacity, both for integer and decimal positions. All types available for the DEFINE command are available for $NUM# variables.
No $CHR# system variable can be formatted to extend past the last byte of the 320-byte system variable buffer.
$CHR# system variables can store character strings that can be executed as INFO commands using the EXECUTE command.
The width of a $DAT# system variable is always 8 bytes.
If you try to change the width of a $DAT# system variable,
INFO displays an error message. The output width for a
$DAT# item can be up to 11 characters.
Dates are stored internally in the format yyyymmdd.
Months and days less than 10 are stored and displayed with a leading space; to display these with leading zeroes, set the internal variable to $ZDATE to 1.
When a $DAT# system variable is displayed or printed, its output format follows the format specified by the current
DFMT setting. Be aware of the effects of output width changes for $DAT# items. As you shorten the output width of the system variable, characters are dropped from the right-most display positions. See the DFMT command for more information. Table FORMAT-2 below shows the effects of varying width specifications.
Table FORMAT-2 $DATn output displays
Date displayed Output width
11/12/1996
11/12/96
11/12
11
5
2
10
8
INFO Reference Manual Commands 243
FORMAT example see also
ENTER COMMAND >TYPE P.FORMAT
PROGRAM NAME: P.FORMAT
10000 PROGRAM SECTION ONE
10001 FORMAT $CHR1,20
10002 FORMAT $NUM4,5,I
10003 FORMAT $DAT5,8,8
10004 MOVE 'WELCOME TO INFO' TO $CHR1
10005 CALCULATE $NUM4 = 12345
10006 CALCULATE $DAT5 = $TODAY
10007 DISPLAY $CHR1,3X,$NUM4,$DAT5
ENTER COMMAND >RUN P.FORMAT
WELCOME TO INFO 12345 1/ 2/96
An extra 2048 bytes of storage exists for programmers to use called $WORK-BUFFER. It has been redefined as follows:
$WORK-BUFF 128,C occurs 16, indexed by $IDX2
$WORK-CHR 8,C occurs 64, indexed by $IDX2
$WORK-NUM
$WORK-INT
8,N,C occurs 64, indexed by $IDX2
8,I occurs 64, indexed by $IDX2
$WORK-BIN 2,5,B occurs 64, indexed by $IDX2
$WORK-FLOAT 8,15,F occurs 48, indexed by $IDX2
CLEAR is used to clear all internal variables (1-40) to nulls.
DINT is used to display the format and content of all of the system variables.
INTERNAL is used to display the characteristics of a given variable or item.
NAME is used to rename internal variables in order to give them more descriptive names.
REFORMAT is used to reformat all internal variables back to their default formats. Each internal variable's format is reset to a width of eight, output width of sixteen, data type of floating point (F), and two decimal places.
244 Commands INFO Reference Manual
FORMS CONTROL
FC
FC
FC
FC
FC
FC
CL
OSE
C
REATE end_line,page_width
D
UMP start_line,line_count [
SCREEN
]
F
ORM SF_name
I
NIT start_line,line_count
PR
INT line DF_item system_item system_variable string
#
X
#
T
FC P
UT line,column,content [,content_width [,decimals]
,
D
[,content_width]]
allows you to create or execute output forms in INFO programs.
arguments
CLOSE terminates the FC session and closes all files used by INFO in processing the FC commands.
CREATE end_line,page_width opens and initializes the form, and defines its page size. End_line defines the total number of lines in the form (1—1200). Page_width defines the number of characters (1—200) per line.
DUMP start_line,line_count [SCREEN] requests that
INFO copy the FC form to the screen or spool file, starting with the line defined by start_line for the number of lines specified by line_count. If you omit the line_count, INFO copies the entire form.
SCREEN option requests that the dump be displayed at the terminal; otherwise, the dump goes to the spool file.
FORM SF_name identifies a special form used to write information in the FC form work area. The named SF must be defined in the current directory. Generally, a special form is used to move standard information
(headers, footers, etc.) to the work area.
INFO Reference Manual Commands 245
FORMS CONTROL
INIT start_line,line_count clears the number of lines specified by line_count from the FC work area, beginning with start_line.
PRINT line [DF_item | system_item | system_variable |
string | #X | #T] writes an entire line to the FC form work area. This option uses all of the PRINT command options.
DF_item an INFO data file item.
system_item an INFO system item.
system_variable an INFO system variable.
string a character string enclosed with single quotes.
#X specifies the number of spaces (1—131) to insert before the next print item.
#T indicates the column number (limited by the width of your printer) at which to position the next print item.
If you use the space or tab options, your specifications should, in most cases, not cause the line to extend beyond the form width. If a line exceeds the form width, your printer may wrap the lines.
PUT line,column,content [,content_width [,decimals] |
,D [,content_width]] writes a single item to the FC form work area.
line,column defines the position on the form to place the item: line is the vertical position on the form; column is the horizontal position. The top left-hand position is line 1, column 1. However, any character that appears in column
1 will be treated as a carriage control character. Each argument can be a constant, an item, or a system variable.
content is the information to be placed on the form. It can be a string, a data item, a system item, a system variable, or an arithmetic expression whose value becomes the content.
content_width defines the output width of the content field. In the absence of a width specification, the default is the defined or formatted OUTPUT WIDTH value for the data item or system variable, or 12 spaces for an arithmetic expression.
246 Commands INFO Reference Manual
notes
FORMS CONTROL
decimals an integer that defines the number of decimal places for the associated content field. It applies only for numeric content fields and requires the preceding width specification. It defaults to 2 positions for calculated values and to the defined or formatted DECIMAL PLACES value for other items.
D formats the content into a date (D type) and is valid only when the content is an arithmetic expression involving dates. When processing a date, INFO assumes the result is a numeric field unless you include the D option to specify a date result. When D is specified, content-width is required and is generally defined as 5, 8, or 10.
For example, FC PUT 10,10,$REPDAT + 3,D,8 puts the value of the report date, plus 3 days, in the format
10/ 7/96, at position line 10, column 10 on your form.
n
Note that FC definitions are never saved; each FC command overwrites the area used by previous FC commands.
n
If you use both a tab (T option) and space specification (X option) to position an item on a line and the two specifications conflict (such as 20X,5T), then the tab specification overrides the X option.
n
Note that DUMP does not clear the FC work area; all data remains unchanged and can be added to or replaced using subsequent FC commands.
There cannot be more than 30 data file items specified using a PRINT option.
INFO Reference Manual Commands 247
FORMS CONTROL discussion example
The FC command permits customized formatting of output forms from within INFO programs. Using the FC command, you can define a form of any size up to a maximum page length of 1,200 lines and a maximum page width of 200 characters. Space on the FC form is referenced in terms of line, column co-ordinates, or a starting line and number of lines. For optimal efficiency, specify the form top to bottom, serially processing all information for each line completely before moving on to the next line. You must start the FC sequence using the
CREATE option, and you should end it using the CLOSE option.
The FC command allows you to represent multiple records on a single page, whereas the SF command allows only one record per form.
The program example below produces an invoice for each customer in a file called ACCOUNTS, listing the multiple purchases for each account from a related SALES file.
The top of each invoice is generated from a predefined special form file called S.HEADING. Following is a sample of an invoice.
ACCOUNT NO: 2000
COMPANY: ACME CONSTRUCTION
25 BEACON STREET
BOSTON, MA 02211
10/7/96
*************************************************************
3/12/1992
4/11/1992
6/ 6/1993
TOTAL SALES :
400.00
765.00
2000.00
3,165.00
248 Commands INFO Reference Manual
FORMS CONTROL
ENTER COMMAND >TYPE F.EXAMPLE
PROGRAM NAME: F.EXAMPLE
10000 PROGRAM SECTION ONE
10001 SELECT ACCOUNTS
10002 RELATE SALES BY ACCT-NO
10003 FC CREATE 40,80
10004 FC FORM S.HEADING
10005 FORMAT $CHR1,30,C
10006 FORMAT $NUM10,2,I
10007 CALCULATE $NUM10 = 10
10008 FORMAT $NUM15,8,10,N,2
10009 CALCULATE $NUM15 = 0
10010 MOVE NAME TO $CHR1
20000 PROGRAM SECTION TWO
20001 IF NAME NE $CHR1
20002 MOVE NAME TO $CHR1
20003 FC FORM S.HEADING
20004 ENDIF
20005 FC PRINT $NUM10 25T,$1DATE,38T,$1TOTAL-SALES
20006 CALCULATE $NUM15 = $NUM15 + $1TOTAL-SALES
20007 CALCULATE $NUM10 = $NUM10 + 1
20008 NEXT
20009 CALCULATE $NUM10 = $NUM10 + 3
20010 FC PRINT $NUM10 20T,'TOTAL SALES :',36T,$NUM15
20011 FC DUMP 1,40
20012 FC INIT 1,40
20013 CALCULATE $NUM10 = 10
20014 CALCULATE $NUM15 = 0
30000 PROGRAM SECTION THREE
30001 SPOOL
30002 FC CLOSE
99999 PROGRAM END
see also
SPECIAL FORM (SF)
INFO Reference Manual Commands 249
FULL
FULL
Switches user terminal into full duplex mode.
discussion see also
This command allows terminal input to be displayed on the user's screen. It is normally used after the HALF command to turn terminal display back on.
HALF
System item $DUPLEX
INFO Reference Manual Commands 251
GET
GET
file_path [
CO
PY] [
EXT
]
[
R
O]
requests that INFO accesses data from an existing file using the item descriptions of the currently selected file.
arguments notes
file_path full system pathname of the existing file, which can be an ASCII text file, a binary file, or an INFO file. The file path may include external variables enclosed in ‘%’ characters.
COPY appends the contents of the specified file to the currently selected file, leaving the specified file unchanged. INFO assumes the file is a binary file unless the keyword ASCII is also specified.
RO requests read-only access to the file.
EXT for extended datafiles (INFO-Text only).
Warning
n
If you issue a GET with COPY after a GET command for the same file, INFO appends the selected file to itself continuously, until the disk’s available space is full or you interrupt the command. To avoid this situation, always
SELECT the appropriate file immediately before issuing the GET with COPY command.
n
You cannot GET an Isam file.
INFO Reference Manual Commands 253
GET discussion
GET without the COPY option
The GET command allows you to use the items description of your selected file as a template to access data from another data file. The file accessed by the GET command can be either an INFO data file or an external file.
The GET command without the COPY option accesses the specified file temporarily. With the COPY option, GET appends the specified file records permanently to the selected data file. Separate discussions of the GET command with and without the COPY option follow below.
For a system file, specify the full pathname of the file. For an INFO data file, specify the INFO internal file name for the file. An INFO internal file name is formatted
xxx###dat, where xxx is the 3-character abbreviation for the corresponding INFO user name, and ### is a number
INFO assigns to the file when it is created.
A GET without the COPY option temporarily associates the records from the specified file with your currently selected data file. Any data records originally selected are unassigned, the file containing the unassigned records is left intact, and the data records from the GET file are assigned instead. The newly assigned records constitute the selected set after the GET is issued. This association exists until you issue another SELECT, GET,
NEWMAP or QUIT command.
INFO performs the following processing for a GET command:
Records from the file specified in the GET command are associated temporarily with the selected data file. Unless you specify the RO option, you gain read-write access to the specified file, which means that you can update and manipulate data within the file. However, the existing data and any updated data remain in the selected file only until you select another file. You cannot use the PURGE command to delete records from the GET file.
254 Commands INFO Reference Manual
GET with the
COPY option
GET with the
COPY option for extended datafiles
(INFO-Text)
GET
GET with COPY causes all records in the specified file to get copied into the selected file. These records become a permanent part of the selected data file. Any changes you make to records copied into the selected file do not affect the file from which the records were copied.
For extended datafiles, that is, files which are defined as extended or have A- or concordable C-type items, a
GET command with the COPY option performs as for nonextended datafiles with the following additional processing:
INFO-Text creates a logical record number for each record appended to the selected datafile and sets the selected datafile's concord flag to indicate that the new records need concording.
When the GET command copies an extended datafile, it does not copy any associated text files. If the A-type items had user-namable root names, or were in the same operating system directory as the copied template, the associated text files are still accessible. Otherwise, the files must be renamed before you can access them through the new datafile.
If you are copying from non-extended datafiles into an extended selected datafile, use the EXT option to append necessary concordance information to the end of each record. Do not use the EXT option on when copying an extended datafile or a file that was saved with the EXT.
INFO Reference Manual Commands 255
GET examples
In the following example, GET associates the records from the system file arc019dat with the selected file EMP-INFO only until you issue another SELECT command.
ENTER COMMAND >SELECT EMP-INFO
10 RECORD(S) SELECTED
ENTER COMMAND >GET ARC019DAT
180 RECORD(S) SELECTED
.
180 records from arc019dat are associated with the
template in EMP-INFO..
.
ENTER COMMAND >SELECT EMP-INFO
The EMP-INFO file contains
10 RECORD(S) SELECTED
only 10 records and the arc019dat records are no longer associated with
EMP-INFO.
In the following example, GET with COPY copies all records in arc019dat into the selected file EMP-INFO.
These records become a permanent part of EMP-INFO.
ENTER COMMAND >SELECT EMP-INFO
10 RECORD(S) SELECTED
ENTER COMMAND >GET ARC019DAT COPY
180 records from
190 RECORD(S) SELECTED
arc019dat are copied
ENTER COMMAND >SELECT EMP-INFO
190 RECORD(S) SELECTED
permanently into
EMP-INFO.
The records copied from arc019dat are appended permanently to to EMP-INFO.
256 Commands INFO Reference Manual
GETL
OG item-1 [item-2]
returns the LOGIN name and SYSTEM user number.
GETLOG arguments
item-1 character internal variable wide enough to receive the login name.
item-2 numeric internal variable to receive the user number (optional).
error response
FIELD UNSUITABLE TO RECEIVE DATA
Either item-1 or item-2 is of the wrong type is or not an internal variable. If no parameters are given, only the user number is returned in $NUM40.
INFO Reference Manual Commands 257
GNAME
GNAM
E
Get Internal Name Command returns the internal name of an
INFO datafile in $CHR40.
discussion
This command returns the SYSTEM filename prefix of the most recently referenced INFO directory entry into
$CHR40. The command must immediately follow the
SELECT or RELATE command for the file whose internal name is required. $CHR40 should be formatted to a width of 6. No error checking is performed.
example
ENTER USERNAME> JOE
ENTER COMMAND > FORMAT $CHR40,6
ENTER COMMAND > SELECT FRED
ENTER COMMAND > GNAME
ENTER COMMAND > DISPLAY $CHR40
JOE001
(internal filename prefix of FRED)
INFO Reference Manual Commands 259
GOTO
GOTO
label_name
transfers control to the specified LABEL command, which must reside in the same program section.
argument notes examples
label_name location in a program specified by the LABEL command.
n
GOTO allows you to go from one set of INFO program statements to another. Corresponding GOTO and LABEL commands must be in the same program section.
n
You can have up to 200 GOTO statements within any one program section.
n
Any number of GOTO statements can refer to the same
LABEL label name.
n
When you write programs that have a GOTO command in an odd-numbered program section, make sure that file and format assignments are referenced correctly.
In the following program sequence, the commands that follow the command LABEL WORK process records in the data file D.TAX whenever the GOTO command (program line 10010) is executed.
10001 SELECT D.EMPS
10002 LABEL WORK
.
.
.
.
10008 SELECT D.TAX
10009 IF $NUM2 LE 10
10010 GOTO WORK
The data file D.EMPS
is selected.
GOTO returns to here; BUT D.TAX
is still selected.
D.TAX is selected.
INFO Reference Manual Commands 261
GOTO
When INFO processes the GOTO WORK command, it passes control to line 10002. D.TAX is still the selected file but D.EMPS is needed. To avoid this situation, simply place the LABEL statement before the command line that selects D.EMPS.
10001 LABEL WORK
10002 SELECT D.EMPS
D.EMPS is selected.
10008 SELECT D.TAX
10009 IF $NUM2 LE 10
10010 GOTO WORK
While GOTO is most often used for simple branching to another program command, you can use it to establish a program loop, similar to a DO...DOEND sequence.
.
.
.
20000 PROGRAM SECTION TWO
20001 LABEL START
20002 CURSOR 20,22
20003 DISPLAY 'ENTER OPTION:',=
20004 ACCEPT $NUM1
Destination of loop
20005 IF $NUM1 LT 1 OR $NUM1 GT 12
20006 DISPLAY 'ERROR — VALUE MUST BE 1 TO 12'
20007 GOTO START
Loops back to START
20008 ELSE
if an invalid number is entered.
.
.
.
20015 ENDIF
262 Commands INFO Reference Manual
GTIM
GTIM
item-1
allows user to get current time of day into a character item in the format HH:MM:SS.
arguments discussion see also
item-1 internal character variable to receive the time. If omitted, $CHR39 is used.
This command allows for the retrieval and use of the current time of day from the system.
The system item $TIME also contains the current system time.
INFO Reference Manual Commands 263
GVGET
GVGE
T item-1 item-2 [item-3]
allows user to get the contents of an external variable: ie.
environment variable (Unix), logical (VMS) or global variable
(Prime).
arguments
item-1 character constant or internal variable containing the name of the logical or variable.
item-2 character internal variable to receive the value from the logical or variable.
item-3 (VMS only) character constant or internal variable containing the name of the table from which to get the logical. The default is the LNM$PROCESS table.
error response
INVALID SYNTAX item of wrong type or not an internal variable
examples see also
Unix: GVGET ‘printername’ $CHR1
VMS: GVGET ‘printername’ $CHR1 ‘LNM$GROUP’
Prime: GVGET ‘printername’ $CHR1
The value of the variable ‘printername’ will be returned to
$CHR1.
GVSET
INFO Reference Manual Commands 265
GVSET
GVSE
T item-1 item-2 [item-3]
allows user to assign a value to an external variable: ie.
environment variable (UNIX), logical (VMS) or global variable
(PRIME).
arguments
item-1 character constant or internal variable containing the name of the logical or variable.
item-2 character internal variable containing the value to be assigned to the logical or variable.
item-3 (VMS only) character constant or internal variable containing the name of the table from which to get the logical. The default is the LNM$PROCESS table.
error response
INVALID SYNTAX item of wrong type or not an internal variable
examples
Unix: GVSET ‘printername’
VMS: GVSET ‘printername’
‘head-office’
‘HEAD-OFFICE’ ‘LNM$GROUP’
Prime: GVSET ‘
.
PRINTERNAME’ ‘HEAD-OFFICE’
The variable PRINTERNAME will be set to the value
HEAD-OFFICE.
see also
GVGET
INFO Reference Manual Commands 267
HALF
HALF
switches user terminal into half duplex mode.
discussion see also
This command prevents terminal input from being displayed on the user's screen. Valuable for invisible input of passwords.
FULL system item $DUPLEX
INFO Reference Manual Commands 269
HELP
HELP
topic file_path
displays information about individual INFO commands or topics, or other HELP text that you create.
arguments notes discussion example
topic refers to an INFO command or subject.
file_path is the name of an ASCII text file containing userdefined help information.
n
An unqualified HELP command instructs INFO to display a description of the HELP facility, the list of valid INFO commands and available HELP topics.
n
If you have used the ADIR command and not set the ADIR directory back to INFOSYS, INFO's own help files are not available.
The HELP command displays tutorial and reference information about a command, an INFO topic, or the contents of an ASCII text file.
To use the HELP command for information about a command or topic, enter the HELP command and the name of the command or topic. If you do not know a given topic name, an unqualified HELP command displays a list of the available topics.
To view a file that has been created as HELP, enter HELP and the file name. See Appendix M, Using the HELP
Facility for information about creating your HELP files.
You can also display any other ASCII text file, such as a
COMOUTPUT file or OUTPUT file, using the HELP command.
ENTER COMMAND >HELP USER NAMES
This command displays information about user names.
INFO Reference Manual Commands 271
IF...ENDIF
.
IF
.
ELSE
.
.
ENDI
F logical_expression
evaluates logical expressions within an INFO program or input form and executes statements according to the results of the evaluation.
argument notes
logical_expression statement that INFO evaluates.
n
IF...ENDIF denotes the beginning and ending of IFstatement logic.
n
ELSE directs INFO if the logical expression is false.
When you include an ELSE statement and the expression is false at runtime, the control passes immediately to the statement that follows the ELSE.
n
The IF command evaluates the logical expression(s) and uses the results of that evaluation to determine the next instruction to be executed, as follows:
1) If the expression(s) are evaluated to be true and you have not included the ELSE, INFO executes the commands between the IF and ENDIF.
2) If the expression(s) are evaluated to be true and you have included an ELSE command, INFO executes the commands between IF and ELSE, then executes the first command following the ENDIF command (unless GOTO,
RUN, END or DONE are specified).
3) If the expression(s) are evaluated to be false and you have not included an ELSE command, INFO executes the first command following the ENDIF command.
INFO Reference Manual Commands 273
IF...ENDIF
4) If the expression(s) are evaluated to be false and you have included an ELSE command, INFO executes the commands following the ELSE command.
n
You can nest up to 100 IF-ENDIF pairs within one IF statement.
n
You can use an IF...ENDIF sequence in an odd- or an even-numbered program section but not across sections.
n
If you include an IF statement in an odd program section, only use system variables in the IF logical expression, because referencing data file items causes only the values from the last record in the selected set to be tested.
To test the value of an item in a selected record or corresponding related record, first MOVE or CALCULATE the item into an appropriate system variable. In the following example, the MOVE command uses the value of
PART-NO from the first selected record:
10005 RESELECT BY $RECNO = 1
10006 MOVE PART-NO TO $CHR1
10007 ASELECT
10008 IF $CHR1 EQ '9999' n
Be careful if using SELECT, RELATE, or FORMAT commands within an IF...ENDIF sequence. During the program compilation, INFO's compile processor does not recognize when a statement is executed conditionally, and assumes that each statement is executed as it is encountered. Therefore, when it encounters a conditional
SELECT, for example, the compiler treats all subsequent processing, until the next selection statement, as though the selected file were current, even after it leaves the conditional command sequence that actually uses that file at runtime.
274 Commands INFO Reference Manual
IF...ENDIF
10000 PROGRAM SECTION ONE
10001 SELECT FILE1
10002 IF $NUM1 EQ 1
10003 SELECT FILE2
10004 DISPLAY SYSTEM
10005 ELSE
10006 DISPLAY CUST
10007 ENDIF
example
The compiler assumes
FILE2 is selected
When INFO compiles the command DISPLAY CUST in the above example, it assumes that FILE2 is the selected file, although at runtime, FILE1 is selected. If CUST is not an item in FILE2, a compilation error occurs. If CUST is coincidentally an item in, the program compiles and executes, but the results may be wrong.
20001 PROGRAM SECTION TWO
20002 IF YTD-AMT LE 100.00
20003 CALCULATE NET = YTD-AMT * $NUM10
20004 ELSE
20005 IF YTD-AMT LE 500.00
20006 CALCULATE NET = YTD-AMT * $NUM20
20007 ELSE
20008 IF YTD-AMT LE 1000.00
20009 CALCULATE NET = YTD-AMT * $NUM30
20010 ENDIF
20011 ENDIF
20012 ENDIF
INFO Reference Manual Commands 275
IMPORT
IMPO
RT file_path
ASCII
[
NORM
AL
SDF TRAN
SPOSE]
[
APPE
UPD
ND
ATE]
2020
DIF
SYLK
CSV
syntax cont’d
[DF_item
system_item
system_variable]
[
,
...]
creates or updates records on the currently selected datafile using data in the specified operating system file.
arguments file_path
the system file name of the input file.
ASCII | SDF | 2020 | DIF | SYLK | CSV the file format of the output file. See Appendix P, Import/Export File
Formats.
ASCII assumes that the input file is a standard print file.
SDF assumes that the input file is in BASIC format.
2020 assumes that the input file is a 20/20 export file.
DIF assumes that the input file is in industry-standard DIF format.
SYLK assumes that the format meets all Multiplan requirements.
CSV comma separated values. Assumes that numerics, character items and dates are held as strings separated by commas with no quotation marks around the character items.
[NORMAL | TRANSPOSE] are positioning modes.
NORMAL is the default positioning mode. For NORMAL,
INFO uses spreadsheet rows as records.
INFO Reference Manual Commands 277
IMPORT notes
TRANSPOSE is the alternate positioning mode. Under
TRANSPOSE, INFO uses spreadsheet columns as records.
[APPEND | UPDATE] defines the writing modes.
APPEND is the default writing mode for interactive sessions and odd-numbered program sections. Each new record is added to the end of the data file. APPEND is invalid in even-numbered program sections.
UPDATE is the alternate writing mode. It is also the default mode for even-numbered program sections.
Imported spreadsheet rows are used to overwrite data file records.
DF_item | system_item | system_variable] the name of the item or variable whose value will be imported.
DF_item is an INFO data file item .
system_item is an INFO system item.
system_variable is an INFO system variable.
n
INFO always processes the selected/related data files.
You cannot specify a different data file for IMPORT.
n
During an import, INFO processes one delimited item value at a time, and places that item in the next sequential item. When INFO reaches a record delimiter, it begins processing the next record in the data file. With the
APPEND option, INFO adds records to the data file. With the UPDATE option, INFO overwrites data file records in order beginning with record number 1.
n
When data file items are listed, INFO imports each value and places it in an item in the order in which the items are listed.
n
When INFO is importing only a subset of the items in the data file, INFO sets unspecified item values to zero or blanks if you use the APPEND option. Under the UPDATE writing mode, INFO makes no change to unspecified items.
n
The system file is closed at the end of each program section.
278 Commands INFO Reference Manual
IMPORT
Using IMPORT in even numbered program sections
n
INFO logs the results of IMPORT to your spool file. INFO also displays brief versions of any error messages on your terminal screen.
The first IMPORT command in an even-numbered program section reads the first record. The next IMPORT command for the same data file reads the next record, and so forth. If you use multiple IMPORT commands from different system files in the same even-numbered program section, INFO repositions itself to the system file's first record every time it returns to each IMPORT command. Only one record from either system file is ever imported.
An EOF, or end-of-file record, encountered in a system file in an even-numbered program section, is a null operation.
discussion example
INFO skips fields it cannot decode or which conflict with the data type defined for the item. This includes formulae written in SYLK files. INFO sets the item value corresponding to the unknown field to zero or blank for
APPEND and leaves values alone for UPDATE
When every input field in a row conflicts with the defined data types, INFO ignores the entire row and does not create a new record. INFO stays positioned at the current data file record and reads the next row out of the system file.
When you import a SYLK file, INFO ignores all formulae.
INFO stores only the numeric, character and date information from SYLK files.
The following example imports data into one selected data file. The first time, the system file is in ASCII format. The second time, the system file is transposed. The third time, the data in the system file is used to update the existing data file records.
INFO Reference Manual Commands 279
IMPORT
ENTER COMMAND >SELECT TEST
0 RECORD(S) SELECTED
ENTER COMMAND >IMPORT SAMPLE1 ASCII
3 RECORD(S) ADDED
0 RECORD(S) REJECTED
ENTER COMMAND >LIST
$RECNO BLDG Q1
1 A
2 B
3 C
—500.00
9450.00
4275.00
Q2
3950.00
10550.00
4950.00
Q3
4050.00
10575.00
4950.00
ENTER COMMAND >PURGE
THIS COMMAND WILL DELECTED SELECTED RECORDS. OK?>Y
0 RECORD(S) SELECTED
Q4
4050.00
10575.00
4950.00
ENTER COMMAND >IMPORT SAMPLE2 DIF TRANSPOSE
3 RECORD(S) ADDED
0 RECORD(S) REJECTED
ENTER COMMAND >IMPORT SAMPLE3 DIF UPDATE Q1,Q2
3 RECORD(S) SELECTED
3 RECORD(S) UPDATED
0 RECORD(S) REJECTED
ENTER COMMAND >
280 Commands INFO Reference Manual
IMPORT
Table IMPORT-1 Messages about data format errors
Message Description
In spool file only:
WARNING CONCERNING DATA INPUT FROM ROW- 2, COLUMN- 3, INTO RECORD- 2
Indicates which cell in the spreadsheet is responsible for the error. Also indicates which record in the datafile is affected.
On terminal screen and in spool file:
INVALID IMPORTED DATA FOR NUMERIC ITEM TYPE — DATA IGNORED
Imported data from a spreadsheet cell is not in the correct format for the numeric item type. The imported data could be either characters, dates, or the wrong type of numbers.
Because the data is invalid, INFO ignores it. For APPEND,
INFO initializes the item value. For UPDATE, INFO leaves the original data intact.
INVALID DATE/DATE FORMAT ASSIGNED TO DATE ITEM
CURRENT IMPORT DATA FORMAT IS 'DMY—/M' — DATA IGNORED
Imported data for an item with a date item type is not in the correct date format. The data could be a date in a different format, a number, or a string of characters. For
APPEND, INFO ignores the data and initializes the item value.
NO MATCH IN RELATED FILE — DATA IGNORED
Select/relate conditions do not correspond to the items specified to INFO in the command line. No match is found.
INFO ignores extra data. The message occurs only if an item in a related data file is specified in an IMPORT item list.
MORE ROWS IMPORTED THAN CURRENTLY SELECTED RECORDS —
EXTRA DATA IGNORED
Error occurs when the IMPORT writing mode is UPDATE.
Indicates that there are more records in the system file than there are in the data file. INFO ignores the extra records.
INFO Reference Manual Commands 281
IMPORT
Table IMPORT-1
Message
Messages about data format errors (cont'd)
Description
MORE COLUMNS IMPORTED THAN ITEMS SPECIFIED — EXTRA DATA IGNORED
Imported data has more item values in each record than there are items in the data file. If you specify which item names received imported data, you may be specifying too few items. INFO ignores the extra data.
DATA TOO WIDE FOR ITEM — DATA TRUNCATED
Character data is too wide for the item width. INFO truncates the cell data so that it fits in the item width.
DATA TOO WIDE FOR ITEM — DATA IGNORED
Numeric cell data is too wide for the defined item width.
INFO simply ignores the numeric cell data. For APPEND,
INFO initializes the item value. For UPDATE, INFO leaves the current value intact.
NULL DATA ASSIGNED TO INFO ITEM — DATA IGNORED
************* NO ITEMS IMPORTED — ROW X REJECTED ****************
NULL DATA ASSIGNED TO INFO ITEM — DATA IGNORED
************ NO ITEMS IMPORTED — COLUMN X REJECTED **************
Errors or null characters cause INFO to ignore an entire row of data.
At completion of command execution — UPDATE mode:
X RECORD(S) SELECTED
Y RECORD(S) UPDATED
Z RECORD(S) REJECTED
Indicates the outcome of an IMPORT command with the
UPDATE option. If the number of spreadsheet rows and the number of data file records are equal, and if no errors occur, the number of records updated is to the number selected and none are rejected. If there are any errors that cause INFO to ignore data, the number of
282 Commands INFO Reference Manual
IMPORT
Table IMPORT-1
Message
Messages about data format errors (cont'd)
Description records that cause INFO to ignore data, the number of records rejected is indicated.
At completion of command execution — APPEND mode:
X RECORD(S) ADDED
Y RECORD(S) REJECTED
Indicates the outcome of an IMPORT command with the
APPEND option. If any errors occur, the number of records rejected is indicated.
see also
EXPORT
Appendix P Import/Export File Formats
INFO Reference Manual Commands 283
INKEY
INKE
Y item-1 [
C
LEAR]
allows user to sense that a key has been pressed and/or to clear the TTY input buffer.
arguments discussion example
item-1 numeric return code.
1 = chars in buffer
0 = buffer empty
CLEAR flushes the TTY input buffer.
This command may be used to allow the user to leave a repetitive task without having to be prompted. Each time the INKEY command is executed it detects if any keys have been pressed (apart from responses to ACCEPT,
IPF and other commands) and sets the specified item accordingly. If the CLEAR option is specified the characters entered are cleared from the TTY input buffer.
$NUM1=0
DO WHILE $NUM1, LE 100000
DISP ‘Hello’
INKEY $NUM40 CLEAR
IF $NUM40 NE 0
DISP ‘Jumping out of loop’
END
ENDIF
$NUM1=$NUM1
DOEND
INFO Reference Manual Commands 285
INPUT FORM
INPU
T FORM
IPF
IPF
IF_name [
NO
DISPLAY]
IF_name [
AL
AY
[
NC
]
LN
[
NC
]
NC
]
directs INFO to define a new screen entry form or to run an existing screen form.
arguments
IF_name the name of the INFO input form file.
[NODISPLAY] used during form definition to suppress display of the input form grid during the definition dialog.
AL (Automatic Leave) suppresses the IS THIS RECORD
ACCEPTABLE? prompt and automatically accepts the record, but does not clear the screen at the end of the record. It returns to the ENTER COMMAND > prompt.
AY (Automatic Yes) suppresses the IS THIS RECORD
ACCEPTABLE? prompt, assumes a response of Y and clears the screen after each record is entered unless the
NC option is included.
You cannot use the AY option when the first entry of an input form is defined as an F (forced field) item.
LN displays the IS THIS RECORD ACCEPTABLE?
prompt and waits for a response of L or N (leave or not accept). If you enter a Y (yes) or <RETURN>, INFO assumes a response of L. If you enter a Q (quit), INFO displays an error message and reissues the prompt.
NC (No Clear) does not clear the screen after each record is entered, regardless of the response to the message IS
THIS RECORD ACCEPTABLE?. If you are executing a multiple-screen input form, INFO displays the first screen of the form after each record is entered.
INFO Reference Manual Commands 287
INPUT FORM notes
n
Before defining or executing an input form, be sure to take the following steps: n
Format the system variables, $CHRn, $DATn and $NUMn, to correspond to their use in the form. See the FORMAT command discussion for instructions.
n
Select and relate all applicable data files in the order in which they will be selected when the form is executed.
n
Use the TERMINAL command to notify INFO of your computer's screen hardware configuration. See the
TERMINAL command for information about changing terminal types.
The following system control variables allow input forms to be customized :
$IPF-DISPLAY When set to 1, causes INFO to display the contents of the buffers for the second and subsequent records added, based on the first or preceding record. In an even-numbered program section (i.e. equivalent to a
UPF command) it displays the current buffer contents for the current record.
$RETRY Enables you to change the maximum error count that INFO will allow before asking 'DO YOU WANT
TO TRY AGAIN ?'. Do not set $RETRY to 0, as you will be prompted before each field. Default = 6.
$IPF-COMMAND Allows you to test which command invoked the input form. $IPF-COMMAND is a read-only variable which is set by INFO during the execution of an input form to the command used :
'INPU' = IPF
'UPDA' = UPDATE ... with IPF
'UPFO' = UPF (or equivalent even-section IPF).
$IPF-PROMPT User-definable end of input form prompt to replace :
'IS THIS RECORD ACCEPTABLE (Y,N,Q,L OR E)>.
288 Commands INFO Reference Manual
INPUT FORM
$IPF-YES Single character alternative to the 'Y' response.
$IPF-NO Single character alternative to the 'N' response.
$IPF-QUIT Single character alternative to the 'Q' response.
$IPF-LEAVE Single character alternative to the 'L' response.
$IPF-EXIT Single character alternative to the 'E' response.
$IPF-ANSWER Set by INFO to the corresponding answer to the end of form prompt. 1 = Yes, 2 = No, 3 = Quit,
4 = Leave, 5 = Exit.
$IPF-NC When set by INFO to 1 implies that the NC option was used.
$IPF-LN When set by INFO to 1 implies that the LN option was used.
$IPF-AY-AL When set by INFO to 1 implies that the AY or AL options were used.
$IPF-QUIT-ON-LOCK If set by the user, upon detection of a record lock on a related file, INFO will quit the input form.
$IPF-QUIT-MESSAGE Can contain a user-defined message to be displayed upon a QUIT-ON-LOCK condition.
Accept Attribute Settings can be set for IPF fields and cursor-addressed ACCEPT statements. The system item
$DISPLAY-MODE should first be set to 1, then the following system items can be used:
$ACC-ATTRIBUTE Any string used to set attibutes, such as reverse video, on ACCEPT. INFO has its own set of system items containing the ANSI escape sequences for such attributes, eg. $REVERSE.
$ACCEPT-FILL Set to 1, will cause INFO to display
ACCEPT-FILL-CHAR across the accept field rather than the field contents.
$ACCEPT-FILL-CHAR Any character to be displayed across the accept field width.
INFO Reference Manual Commands 289
INPUT FORM
$LEFT-DELIMITER Any character used as a left delimiter for an accept field. Displayed at row,col - 1.
$RIGHT-DELIMITER Any character used as a right delimiter for an accept field. Displayed at row,col + 1.
$DELIM-ATTRIBUTE Any attribute to be associated with the delimiter characters.
examples
FORMAT $NUM1,6,I
DISPLAY-MODE = 1
$ACC-ATTRIBUTE = $REVERSE
$ACCEPT-FILL = 1
$ACCEPT-FILL-CHAR = '.'
$LEFT-DELIMITER = ='['
$RIGHT-DELIMITER = =']'
$DELIM-ATTRIBUTE = $BOLD
IPF ENHANCED.IPF
discussion
Display Attribute Settings can be set for IPF fields and cursor-addressed DISPLAY statements. The system item
$DISPLAY-MODE should first be set to 1, then the following system items can be used:
$DISP-ATTRIBUTE Any string used to set attibutes, such as reverse video, on. INFO has its own set of system items containing the ANSI escape sequences for such attributes, eg. $REVERSE. Items or variables will be displayed with this attribute.
$MESS-ATTRIBUTE Works as $DISP-ATTRIBUTE for default and user-defined error messages (Input Form format only).
$RESET-ATTRIBUTE Should be set to the system default display attribute setting when using $DISPLAY-
MODE = 1. Screen output will then return to 'normal' upon returning to interactive use from an INFO program. For example, $RESET-ATTRIBUTE = $NORMAL.
An input form is a combination of literal and data fields.
Once defined, it allows fast and accurate data entry.
290 Commands INFO Reference Manual
INPUT FORM
Input form supports the following validation:
R - Range checking
V - Default value
L - List check
M - Match related item
K - Duplicate key check
A - Auto duplicate
F - Forced field
Most INFO commands which are valid in program even sections may be used in input forms in program-style statements, and it is possible to mix and match input form and program-style commands, using the strengths of each.
For instance, the MATCH, LIST and KEY input for subcommands do in one line of coding what would take several lines in a program. On the other hand, programstyle conditional testing via IF...ELSE...ENDIF and branching via GOTO and LABEL can be a lot easier to code and maintain than the input form BRANCH option with its PASS/FAIL options.
It is also possible to insert commands in input forms, as in programs, for ease of maintenance.
INFO Reference Manual Commands 291
INPUT FORM
Defining a new form
To initiate an input form definition dialog, enter the command INPUT FORM with the name of the new form.
INFO brings up a grid on your terminal screen to help you design your input form.
ENTER COMMAND >SELECT D.EMPS
0 RECORD(S) SELECTED
ENTER COMMAND >INPUT FORM I.EMPS
1---5---10---15---20---25--//--45---50---55---60---65---70---75---80
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+---+----+----+----+----+--//---+----+----+----+----+----+----+----+
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+---+----+----+----+----+--//---+----+----+----+----+----+----+----+
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+---+----+----+----+----+--//---+----+----+----+----+----+----+----+
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+---+----+----+----+----+--//---+----+----+----+----+----+----+----+
LINE,COLUMN,CONTENT>
To suppress the grid display, include the NO DISPLAY option on the INPUT FORM command.
292 Commands INFO Reference Manual
INPUT FORM
Defining an input form field
You can define your INPUT FORM fields in any order.
However, INFO processes each field in the defined order at execution. Therefore, it is good practice to define the input form prompts before the input fields to which they refer and to define both going left to right, top to bottom on your screen.
For each field definition, INFO prompts:
LINE,COLUMN,CONTENT>
Enter a response in the following format: line[,] column,content[,sub-commands[,MESS [text]]]
Value
Zero (0)
1 to 24
Line and column identify the position at which the content is displayed or entered on the screen. Line and column can be expressed as a literal, an item name, or a system variable.
Line defines the horizontal line on which the content is displayed using any of the following values:
Description
Clears the screen and positions the cursor to line 1, column 1 at execution. Use this
specification to define a second or subsequent screen format for a multiple-screen input form.
If column also equals 0, INFO starts a new screen and displays the screen grid again. If column is greater than 0, INFO starts a new screen but does not display the screen grid.
Identifies the specified line. 1 corresponds to the top-most line on the screen, and 24 corresponds to the last usable line at the bottom of the screen. Many CRT screens scroll if you try to accept or display information on line 24.
INFO Reference Manual Commands 293
INPUT FORM
Column defines the vertical position on the line where the content is displayed. It can be any value from 1 to the maximum screen width for the terminal in use: 1 corresponds to the left-most position on the screen; the maximum width corresponds to the right-most position on the screen.
INFO displays messages during input form processing on the line corresponding to the value of $ERROR-
POSITION, columns 1—50. The input form processor uses lines 21—23 for prompts and messages. If you define fields for these locations, they may be overwritten on the definition grid, although this will not affect the execution of the form.
Content is the information to be located at the specified line and column. Content can be a literal, an arithmetic expression, or an item.
A 'literal' appears on your screen exactly as entered.
Specify a literal by enclosing it in single quotes
(apostrophe). To embed an apostrophe within the text, use two successive quotes (for example, 'YESTERDAY''S
PRICE').
An 'arithmetic expression' evaluates a value that is displayed on the screen at runtime. See 'Building
Expressions' in the Introduction for a complete discussion of the rules for constructing a valid expression.
An 'item' is a data item, system item, or system variable.
You can use any data item from a currently selected file or related file. INFO either displays or accepts the item, depending on the subcommands you include in the field definition.
The sub-commands control data validation and display, and provide logical branching capability during the execution of an input form. Table IPF-1, at the end of the
INPUT FORM discussion, describes the various subcommands.
294 Commands INFO Reference Manual
INPUT FORM
MESS [text] is used only when a data validation subcommand is provided for the field. MESS allows you to override standard INFO data validation error messages with user-defined messages. Text can be any combination of items and literals. If the data entered for the associated content fails to meet the specified data validation criteria,
INFO displays the specified message text. To suppress any message display when a data validation error occurs, include MESS without text.
In the following example, the input form I.EMPS is being defined. The command lines used to create the form are listed below.
1---5---10---15---20--//--45---50---55---60---65---70---75---80
+ + + + + + + + + + + + +
+ + + + NEW EMPLOYEE FORM + + + + + +
+ + + + + + + + + + + + +
+LAST NAME:+-------+-//-+---+----DATE HIRED:---+----+----+----+
+FIRST NAME: ............... + + + + + + +
+ + + + + + + + + + + + +
+JOB TITLE:.................... + SALARY: $....... + +
+ + + + + DEDUCTIONS: .. + + + +
+---+----+----+----+-//-----+---+----+----+----+----+----+----+
+ADDRESS:+ .................... + SSN: ......... + + +
+ADDRESS:+ .................... + + + + + + +
+ + + + + + + + + + + + + +
+PHONE NO.: .......+ + + + + + + + +
+---+----+----+----+--//---+----+----+----+----+----+----+----+
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+---+----+----+----+--//---+----+----+----+----+----+----+----+
INFO Reference Manual Commands 295
INPUT FORM
OK?>
LINE,COLUMN,CONTENT>
3,17,'NEW EMPLOYEE FORM'
5,1,'LAST NAME:'
5,51,'DATE HIRED:'
6,2,'FIRST NAME:'
8,2,'JOB TITLE:'
8,55,'SALARY: $'
9,51,'DEDUCTIONS:'
11,1,'ADDRESS:'
11,55,'SSN:'
12,1,'ADDRESS:'
14,1,'PHONE NO.:'
5,13,L.NAME,F
5,62,DATE.HIRED,V,$TODAY
6,13,F.NAME
8,13,TITLE
8,64,PAY,R,750,2200
9,63,NO.DEDS,R,1,5
11,13,ADDRESS.1
11,60,SSN,K
12,13,ADDRESS.2
14,13,HOME.NO
Create form title.
Create form prompts.
Forced entry Value.
$TODAY is default value.
Range checking.
Checks for unique value.
296 Commands INFO Reference Manual
INPUT FORM
Each time you enter a text literal, such as the title line of this input form, INFO displays the literal at the location specified and prompts OK?>. If you respond Y (yes) or
<RETURN>, INFO accepts the literal and prompts for the next line. N (no) causes INFO to remove the literal from the grid and prompts you to re-enter the line.
When you define a data field such as 5,22,L.NAME,F,
INFO fills the specified screen location with periods for the correct output width and prompts for verification, as described above.
To end the definition dialog, enter a <RETURN> after any
LINE,COLUMN,CONTENT> prompt. A <RETURN> after the first such prompt causes INFO to return immediately to
ENTER COMMAND >. When you end the dialog, INFO prompts:
DO YOU WISH TO EXECUTE THIS FORM (Y OR N)>
Respond with Y (yes) or <RETURN> to clear the screen definition grid and begin executing the form. An N (no) response will store the input form for future execution and return you to ENTER COMMAND >.
Use the EDIT or CHANGE command to make corrections or changes to a finished input form.
INFO Reference Manual Commands 297
INPUT FORM
Logical branching
A variation of the field-definition syntax defines logical branching within your input form processing.
To define PASS/FAIL branching for a field, use the following syntax: line[,]col,content[,B],sub-command,... [PASS | FAIL label_name]
To label a target field, use the following syntax: line[,]column,content,sub-command[,] ..LABEL label_name
When processing the field at runtime, INFO evaluates the data for the item according to the subcommands provided, then uses the criteria described below to determine a true or false condition. You can include any subcommand described in Table IPF-1 at the end of this discussion in a field definition that uses the PASS or FAIL specification.
The logical branching subcommands B, PASS and FAIL instruct INFO as follows:
B directs INFO not to accept the data being tested. You might use B specification, for example, to test a date and branch according to its value, even though the date is not included in the record built by the input form.
PASS instructs INFO to branch to the corresponding label if the result of the evaluation is true. If the evaluation is false, INFO passes control to the next line. Label_name is the 1- to 16-character name of a label defined using the
LABEL command.
FAIL instructs INFO to branch to the corresponding label if the result of the evaluation is false. If the evaluation is true, INFO passes control to the next line. Label_name is the 1- to 16-character name of a label defined using the
LABEL command.
Label_name is from 1 to 16 characters long and must be unique within the input form definition. You can include up to 100 labels in an input form. Including the LABEL subcommand at the end of an item definition does not affect execution of the line at runtime.
298 Commands INFO Reference Manual
Executing an existing form
Response
Y
(Yes)
INPUT FORM
If PASS is included in a field definition that does not accept data or contains the A, D, S, or V subcommands
(subcommands that cannot be evaluated as true or false),
INFO branches unconditionally to the labeled field. If you specify FAIL for such a field, INFO ignores the FAIL and transfers control immediately to the next line.
It is also possible to use the INFO program command
IF...ELSE...ENDIF for logical branching.
You can execute an input form by entering an INPUT
FORM command followed by the name of the input form and any appropriate runtime options.
INFO processes each line in the input form in the order in which it was defined. When it encounters a display field,
INFO displays that value. When it encounters an input field, INFO positions the cursor at the defined location and waits for you to enter a value.
Each time you enter an input value, INFO checks the validity of the value, then checks the data against any verification subcommands specified for the item. If an error occurs, INFO displays an appropriate error message and repositions the cursor so you can re-enter the data over the invalid entry. INFO does not store a record until the entire form has been processed.
When INFO encounters the end of the form, it prompts:
IS THIS RECORD ACCEPTABLE (Y,N,Q,L OR E)> unless you specified an AY or AL option. Enter one of the following responses to this prompt:
Description
Instructs INFO to accept the record and store it in the selected data file. Unless you specify the
NC subcommand on the IPF command, INFO clears the screen before processing the next record. INFO assumes a Yes if you respond
<RETURN> or include the AY subcommand in the INPUT FORM command.
INFO Reference Manual Commands 299
INPUT FORM
(cont'd)
Response
N
(No)
Q
(Quit)
L
(Leave)
E
(Exit)
Description
If you want to correct errors in the record, enter an N to direct INFO to reprocess the record.
INFO repositions the cursor at the first input field and waits for new data. Overwrite fields to correct them. To keep correct values, enter an equal sign (=) or the current TAB character.
See 'Screen initialization and data entry' below for information about the use of control characters in IPF processing.
If you are executing a multiple-screen form,
INFO redisplays the first screen of the form and repositions to the first input field on that screen.
INFO does not accept the data and clears the screen unless the NC subcommand is specified on the IPF command. INFO repositions the cursor at the first input field and waits for you to enter a new record.
Specifies that the record is acceptable and should be stored, but instructs INFO to terminate form processing without clearing the screen. If you include the AL option when executing the form, INFO assumes this response.
Alternatively, the runtime LN option directs
INFO to assume this response if you enter a Y
(yes) or <RETURN>. Typically, you will use this option when the form is executing from within a program, to enter one record at a time and leave the formatted screen for the next record.
Instructs INFO to accept the record, terminate the form processing and clear the screen.
Terminate INPUT FORM processing as follows:
If the first field in the form is not defined with the F or V subcommand, enter a <RETURN> to the first request for input in any record.
300 Commands INFO Reference Manual
INPUT FORM
(cont'd)
Response
Screen initialization and data entry
Description
Respond E (Exit) or L (Leave) to the IS THIS RECORD
ACCEPTABLE ? prompt after entering data for the last record you want to add. If the first field in the form is a forced field, you must use the E or L response to terminate form processing.
You cannot include the AY option when executing a form whose first field is a forced field or default value field, because those subcommands suppress the display of the
IS THIS RECORD ACCEPTABLE prompt.
In an interactive session or odd-numbered program section, before accepting any input values for a new record, INFO initializes all items in the record buffer to blanks or zeros, depending on the data type. Initialization does not take place between successive records. If the form is executed in an even-numbered program section, it is not initialized.
When INFO processes an input field, it positions the cursor at the defined location for the item and waits for input. Respond as follows:
To enter a value for an item, enter the value followed by a
<RETURN> (unless ARET is Y and field is filled).
To enter a null value to an item, enter <SPACE>
<RETURN> for the first item and <RETURN> for any other items.
To preserve an item value from the previous record, enter an equal sign (=) or the TAB character and press
<RETURN>
To skip all fields remaining on an input form, preserving the value for each field from the previous record, enter the
<KEEP> character at any point. INFO stops processing the current record immediately and displays the IS THIS
RECORD ACCEPTABLE ? prompt, leaving the remaining items in the form unchecked.
INFO Reference Manual Commands 301
INPUT FORM
To abort the form with the remaining fields set to blank or zero, enter the <CLEAR> character at any point. INFO ends form processing immediately, initializes all remaining fields as null values, and displays the IS THIS RECORD
ACCEPTABLE ? prompt. If you respond with the <KEEP> or <CLEAR> character for the first field in the form, INFO ends form processing immediately, but does not display the IS THIS RECORD ACCEPTABLE? prompt. INFO returns to the ENTER COMMAND > prompt.
To return to a previously entered field, enter the
BACKTAB character (\). You can use this response to change a value previously entered for a field. If you tab back to a previous screen while executing a multiplescreen form, INFO redisplays that previous screen.
See the CCHR command for more information about the
<KEEP>, <CLEAR>, <TAB> and <BACKTAB> settings.
Using related files
INFO repositions a related data file during input form execution under these conditions:
The value of the item by which the file is related changes
Any portion of an accepted item overlaps the relate key item
Be careful to avoid changing the value of the relate key item on either the selected or previous related file until you finish processing all other related data items. This allows
INFO to accept new values for items other than the relate key item in a related record, then modify and rewrite the record before repositioning the data file.
Programming considerations with INPUT
FORM
When you execute an input form in an odd-numbered program section, it is most efficient to leave the prompts on the screen between records. Do this by defining two forms, one comprising the displayed prompts and the other the data items to be entered, and instruct
INFO to clear only the data-item screen. Specifically, use the AL subcommand with the first (prompt) screen, and use the NC subcommand with the second (data-item) screen.
302 Commands INFO Reference Manual
example
INPUT FORM
In an even-numbered program section, INPUT FORM processing only modifies the current record. It does not create new records or clear the screen before processing the form.
The following listing of an input form illustrates the use of some of the input form subcommands. You may list the contents of an input form file with the TYPE command.
3,30,'O.I.C., INC.'
5,20,'WEEKLY PAYROLL UPDATES'
.
.
.
10,10,'REG. HOURS:'
10,25,$1REG-HRS
10,25,$1REG-HRS,B,R,0,40,PASS SKIP
If $1REG-HOURS is in the range of 0 to 40, branch to the line labeled SKIP.
Otherwise, go to the next line.
10,25,$1REG-HRS,D
1,1,$1OT-HRS,S,$1REG-HRS — 40
Calculate and store overtime hours.
1,1,$1REG-HRS,S,40
13,10,'OT HOURS:'
13,25,$1OT-HRS,D
Display the hours calculated above.
15,10,'GROSS PAY:',LABEL SKIP
If $REG-HRS is less than 40 and greater than 0, skip to here.
15,30,'$'
1,1,$1GROSS,S,( $1REG-HRS * $1HRLY-RATE ) + ( $1OT-HRS *
( $1HRLY-RATE * 1.5 ) )
Calculate and store $GROSS-
PAY.
1,1,$1YTD-GROSS,S,$1YTD-GROSS + $1GROSS
15,31,$1GROSS,D
Display $1GROSS-PAY
INFO Reference Manual Commands 303
INPUT FORM
Table IPF-1 INPUT FORM definition subcommands
Subcommand Description
A
(Auto- Duplicate)
B
(Branch)
For input fields only. INFO requests a value for the item only for the first record in an INPUT
FORM session and duplicates the value automatically for each subsequent record.
Auto-duplicate is useful, for example, if the same batch number is entered for each record in a group.
Auto-duplicate should not be used for items in a related data file, in even-numbered program sections, or with the K subcommand (described below).
When used with another data validation subcommand and with the PASS or FAIL subcommand, processing can branch to the input form statement labeled label_name based on whether or not the validation passed or failed.
line[,]column,content,B,subcommand,<PASS/FAIL> label_name
D
(Display)
The field is displayed, not accepted as input.
This is the default subcommand for literal and arithmetic expression content. INFO displays the field according to the output width of the field. You can override the width and decimal position specifications by entering them explicitly as part of the subcommand specification using the following subcommand format:
D,width,decimal_positions
304 Commands INFO Reference Manual
INPUT FORM
Table IPF-1 INPUT FORM definition subcommands (cont’d)
Subcommand Description
D
(Display) cont’d
F
(Forced Field)
In the following example, INFO subtracts the value in AMOUNT from that in BALANCE-DUE and displays the result on the screen, starting at line 10, column 25, with an output width of
14 and 2 decimal positions:
10,25,BALANCE-DUE – AMOUNT,D,14,2
D is the default subcommand for calculated fields. Therefore, the example above can also be specified as:
10,25,BALANCE-DUE – AMOUNT,14,2
For date items, you must include a display length followed by a 'D' for the decimal positions. Otherwise, INFO displays the result as the number of days since 1/1/1801. In the following example, today's date is displayed in 8-position date format (the century is omitted).
5,15,$TODAY,D,8,D
With the F subcommand, you must enter a value. If you forget, INFO displays an error message and waits for you to enter a value for the field.
If you specify the F subcommand for the first field in a form, you cannot execute the form using the AY subcommand.
INFO Reference Manual Commands 305
INPUT FORM
Table IPF-1 INPUT FORM definition subcommands (cont’d)
Subcommand Description
K*
(Key)
The value entered into this field must be unique. INFO verifies this by sequentially searching the selected records. If INFO finds a record with the same value, it displays the following message:
ITEM ALREADY EXISTS
KO*
(Key ordered)
INFO waits for you to enter a correct value. In the following example, the value entered for
EMP-ID-NO must be unique.
4,15,EMP-ID-NO,K
This subcommand cannot be specified in conjunction with the A subcommand.
The value entered must be unique (see the K subcommand). INFO assumes the selected records are in ascending order by the item name and performs a binary, instead of sequential, search of the selected records to make sure that the value entered is unique.
*You can combine any one Key subcommand
(K, KO, NK, NKO) with any one Match subcommand (Mn, MnS, NMn, NMnS).
Any records added during an INPUT FORM session are maintained separately and searched sequentially, even when the KO subcommand is specified. At the end of input form processing, INFO appends the new records to the selected data file and selects them. The appended records must be merged into the sorted selected records before they can be processed again using an input form with the KO subcommand.
306 Commands INFO Reference Manual
INPUT FORM
Table IPF-1 INPUT FORM definition subcommands (cont’d)
Subcommand Description
L
(List)
The value entered must be in the specified list.
The list can contain up to 10 items including system items, system variables, numbers, or dates, and up to 20 literals enclosed in single quotes. You can include a total of 20 C-type items and literals combined in the same list.
Separate the values in the list with a single comma or the current delimiter. Terminate the list by entering two successive delimiters or a
<RETURN>. INFO rejects an invalid entry with the message:
INPUT VALUE NOT AN ELEMENT OF SPECIFIED LIST
M#*
(Match)
After displaying the error message, INFO repositions the cursor at the field location and waits for you to enter a new value over the invalid entry.
In the following example, the value entered for
CHAR-FIELD must be A, B, C, or D.
5,7,CHAR-FIELD, L,'A','B','C','D'
This subcommand cannot be used in conjunction with the R, NR, or NL subcommands.
The value entered for the field is accepted only if the specified item has a matching value in a related data file. Enter this subcommand in the following format: line[,] column,content,M#[,item_name]
*You can combine any one Key subcommand
(K, KO, NK, NKO) with any one Match subcommand (Mn, MnS, NMn, NMnS).
INFO Reference Manual Commands 307
INPUT FORM
Table IPF-1 INPUT FORM definition subcommands (cont’d)
Subcommand Description
M#*
(Match)
(cont'd) where # indicates the data file relation number.
(For example, M2 indicates that the item must have a match in the second related data file.)
Since the default value is 1, you can specify M1 as M. The item_name is the item that INFO uses to process a match operation. Do not include the $# prefix with the item name.
If INFO fails to locate a matching record, it displays the following message and waits for you to enter another value.
NO MATCH IN RELATED FILE # FOR RECORD nnnnnnnn
M#S*
(Match sequential)
In the following example, ACCT-NO is defined as a six-digit numeric field with the first two digits redefined as SUB-CODE. The selected file is related to another file on the common item, SUB-CODE.
7,2,ACCT-NO,M,SUB-CODE
The statement above directs INFO to accept the value for ACCT-NO only if the first two digits entered, the SUB-CODE, match a value in the related data file.
The value entered for the field is accepted only if the item specified is in the selected file and has a match in a related data file.
Operates exactly as the M# subcommand, described above, but forces a sequential search of the related file. Use M#S to force a sequential search on data files related with the
ORDERED or SEQUENTIAL options.
308 Commands INFO Reference Manual
INPUT FORM
Table IPF-1 INPUT FORM definition subcommands (cont’d)
Subcommand Description
NL
(Not in List)
NK* and NKO*
(Not a Key and
Not a Key Ordered)
NM#* and NM#S*
(No Match and
No Match Sequential)
NR
(Not in Range)
The field value cannot be a value in the specified list. Operates like the L subcommand except that you can only enter values that are not on the specified list. See the L subcommand for information about how to specify this subcommand.
You cannot use this subcommand in conjunction with the L, R or NR subcommand.
*You can combine any one Key subcommand
(K, KO, NK, NKO) with any one Match subcommand (M#, M#S, NM#, NM#S).
The field value must already exist. INFO verifies that the value exists by searching the selected records.
NKO indicates that the records are sorted in ascending order by the key item so that INFO can perform a binary search on the records rather than a less efficient sequential search.
These subcommands are the logical opposites to the M# and M#S subcommands They ensure that the value entered for a field does not have a match in the related data file.
The value entered for this item must not fall within a specified range. The range identifies illegal values for the item. Range limits are inclusive. An invalid entry for the item displays an error message.
After displaying the error message, INFO blanks the input field, repositions the cursor at the field location and waits for you to enter a new value.
This subcommand cannot be used in conjunction with the R, L or NL subcommands.
INFO Reference Manual Commands 309
INPUT FORM
Table IPF-1 INPUT FORM definition subcommands (cont’d)
Subcommand Description
R
(Range)
The value entered for this field must fall within the specified range. Format the R (or NR) subcommand as follows:
R,low_value,high_value where low_value and high_value can be data file items, system items, system variables, literals, numbers, or dates. Both values must be compatible with the field defined. The range limits are inclusive.
When comparing items of different lengths,
INFO uses the length of the shorter item, ignoring the excess characters of the other item.
INFO rejects a value outside the specified range and displays one of the following messages:
BELOW MINIMUM VALUE OF RANGE or
ABOVE MAXIMUM VALUE OF RANGE
After displaying the error message, INFO blanks out the input field, repositions the cursor at the field location and waits for you to enter a new value.
In the following example, the value entered for
DATE-HIRED must be greater than or equal to
1/1/1980 and less than or equal to today's date.
6,23,DATE-HIRED,R,1/1/1980,$TODAY
This subcommand cannot be specified with the
NR or NL subcommands.
310 Commands INFO Reference Manual
INPUT FORM
Table IPF-1 INPUT FORM definition subcommands (cont’d)
Subcommand Description
S
(Store)
The field is the destination for a MOVE or
CALCULATE operation, implied by the type of the item specified, but is not displayed on the screen. Use the following format for the S subcommand:
S,source_item
The source_item can be a literal, arithmetic expression, or item, as described above for content. The content and source item must be compatible data types. For example, if the field content is a C-type item, you must specify another C-type item or a literal for source_item.
If source_item is an arithmetic expression,
INFO evaluates the expression and stores the result in the content item. Truncation and blank padding occur when appropriate. You must specify a legal screen position, even though it is not used. The same screen position can be used in another field that displays or accepts data.
When you use the BACKTAB character to return to a previous field, INFO executes each field that it encounters. For example, if the source_item for a particular field is an arithmetic expression that contains a system item whose value has changed since it was first stored, back-tabbing through the field causes
INFO to recalculate the arithmetic expression and store the new result, which might differ from the earlier result.
Note that the Store subcommand can cause a repositioning of any data file related on the item modified. Depending on the RELATE option in effect, new records can be written to a related data file from Store subcommand processing.
INFO Reference Manual Commands 311
INPUT FORM
Table IPF-1 INPUT FORM definition subcommands (cont’d)
Subcommand Description
S
(Store)
(cont’d)
The following examples illustrate the use of the
S subcommand:
SC
(Store Conditionally)
12,23,NEW-FLAG,S,'*'
Moves an asterisk to item NEW-FLAG. If NEW-FLAG is wider than one character, the item is right- padded with blanks.
20,1,$IDX2,S$IDX2 + 3 Increments $IDX2 by
3 and stores it back in $IDX2. This is a common technique used to accept input to elements of an array.
The field is the destination for a MOVE or
CALCULATE operation, implied by the type of the item specified that is not displayed on the screen. Operates as the S (Store) subcommand, except that INFO saves the original value of the field before storing the entered value. If you respond Q or N to the IS
THIS RECORD ACCEPTABLE prompt during form execution, INFO restores the original value of the field before processing the Q or N response. If you respond Y, L, or E to the IS
THIS RECORD ACCEPTABLE prompt, INFO stores the entered value.
312 Commands INFO Reference Manual
INPUT FORM
Table IPF-1 INPUT FORM definition subcommands (cont’d)
Subcommand Description
V
(Value)
see also
For input fields only. The stored value defaults to the specified value if the user enters a
<RETURN>. Format the V subcommand as follows:
V,default_value where default_value is the name of another data file item, system item, system variable, or literal. The following example requests that
INFO supply the value 'UPS' for SHIP-VIA whenever a <RETURN> is entered during execution:
9,1,SHIP-VIA,V,'UPS'
The V subcommand cannot be specified in conjunction with the F subcommand.
UPF
UPDATE
INFO Reference Manual Commands 313
INTERNAL
INTE
RNAL DF_item system_item system_variable
displays the characteristics of a data file item, system item or system variable.
discussion
The INTERNAL command displays the item characteristics of a data file item or system item, or displays the characteristics of a system variable as if it were an item.
The format of the display of characteristics is similar to the display from the ITEMS LONG command, except that no headings are provided for the various characteristics. See the ITEMS command for a description of the various characteristics.
example
ENTER COMMAND >INTERNAL $NUM1
4097 $NUM1 8 16 F 2 4 — — 0 — — — -
INFO Reference Manual Commands 315
ITEMS
IT
EMS [relate_#] [
PR
INT] [
L
ONG]
lists the items structure of a data file or lists the current system items.
arguments
[relate_#] the integer that specifies the relational level of a data file to the selected file.
[PRINT] requests that the item structure display be sent to your INFO spool file.
[LONG] requests the long form of the ITEMS display.
notes discussion
n
An unqualified ITEMS command requests a short form display of the item structure of the currently selected data file.
n
When relate_# is specified as -1, INFO displays the item characteristics of all INFO system items.
The ITEMS command instructs INFO to display or print the item structure of your currently selected data file, one of your currently related data files, or the system items file.
If the named file includes protected items, INFO displays only those items that are unprotected at the password level you are using. INFO displays the unprotected items without the column number and makes no distinction between defined and redefined items. See the PROTECT and PASSWORD commands for more information about data file protection. If an alternate item name has been defined for an item, INFO displays the alternate name on the line following the corresponding item display.
The column headings for the short form of the ITEMS display are described below in Table ITEMS-1. See the
DEFINE command for detailed information about each item specification. INFO displays blanks or a hyphen (-) for specifications not defined for the item.
INFO Reference Manual Commands 317
ITEMS examples
The short form of the ITEMS display:
ENTER COMMAND >ITEMS
DATAFILE NAME: PRICE-SCHEDULE
2 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC ALTERNATE NAME
1 PART.NO 6 6 I -
7 PRICE 80 80 C -
** REDEFINED ITEMS **
7 PRICE.ARRAY 10 10 N — PRICES
The long form of the ITEMS display:
ENTER COMMAND >ITEMS LONG
DATAFILE NAME: PRICE-SCHEDULE
2 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC PROT KEY OCCRS INDX CNLV CC CN UN
1 PART.NO 6 6 I — 4 — — — — — — -
7 PRICE 80 80 C — 4 — — — — — — -
** REDEFINED ITEMS **
7 PRICE.ARRAY 10 10 N 2 0 — 8 1 — — — -
ALT PRICES
318 Commands INFO Reference Manual
ITEMS
Table ITEMS-1 ITEMS display headings
Item headings Description
COL
ITEM NAME
WDTH
OPUT
TYP
N.DEC
ALTERNATE NAME
PROT
KEY
OCCRS
INDX
Starting position within the record buffer for the item name that follows.
Name of the record data item.
Internal storage width of the item.
Output width of the item.
Item type.
Number of decimal positions defined (for numeric fields only).
Alternate name.
The additional information provided in the long form of the ITEMS list is described below. An alternate item name is displayed on the line following its associated item name and is preceded by the label ALT, instead of being displayed in a separate column, as in the short form.
Protection level for the item.
Key level for ISAM files.
Occurrence count for an arrayed item.
The number of the internal index counter used to control processing of the array for arrayed items.
INFO Reference Manual Commands 319
ITEMS
Table ITEMS-1 ITEMS display headings (cont’d)
Item headings Description
The following apply to INFO-Text only
CNLV
CC
CN
UN
Concordance level for A-, or concordable Ctype items.
Case concorded for A-, and concordable Ctype items. Y indicates words in upper- and lowercase concorded separately, N indicates case is not concorded.
Concorded numbers for A-, and concordable Ctype items Y indicates concorded numbers, N indicates numbers are not concorded.
User-namable text files for A-type items. Y indicates user-namable text files, N indicates an item whose text files are named by
INFO-Text.
320 Commands INFO Reference Manual
JUSTIFY
JUST
IFY [
L
EFT
C
ENTER
R
IGHT] item-1 [TO] [item-2 [item-3]]
truncates unwanted characters from right and left and aligns the result.
arguments
item-1 any INFO item or a character literal.
item-2 any INFO item (not literal).
item-3 character to be truncated (default is space). A single character INFO item or literal.
notes discussion examples
n
Item-1 and Item-2 can be the same: e.g. JUSTIFY RIGHT SURNAME TO SURNAME or JUSTIFY RIGHT SURNAME
In effect, JUSTIFY is MOVE with justification, and therefore mimics MOVE used interactively and in odd/even program sections.
FO $CHR1,8
FO $CHR2,8
$CHR1 = ‘ABC’
JUSTIFY RIGHT $CHR1 $CHR2
The trailing spaces in $CHR1 will be truncated and $CHR2 will contain five spaces followed by ABC.
FO $CHR1,16
FO $CHR3,8
FO $CHR40,1
$CHR1 = ‘$$$$123.45$$$$’
JUSTIFY CENTER $CHR1 $CHR3 $CHR40
The dollar signs will be stripped out and $CHR3 will contain 123.45 with a space either side.
INFO Reference Manual Commands 321
LABEL
LAB
EL label_name
identifies a location within a program or input form, marking that location for use by GOTO statements within the same program section.
argument
label_name name that identifies a command line in an
INFO program or input form.
notes example
n
The LABEL command labels a line in an INFO program or input form as the destination of a GOTO or branch command in that program or input form.
n
You can include up to 100 LABEL statements within each program section. as input form Any number of GOTO statements can refer to the same label name.
n
As noted for the GOTO command, corresponding GOTO and LABEL commands in programs must be in the same program section.
n
See the command reference for INPUT FORM for a discussion of labels in input forms.
The first time the program processes LABEL TRY.AGAIN, it does nothing. If an invalid department number is added, the error message is displayed and the GOTO command sends INFO back to the label.
10000 PROGRAM SECTION ONE
.
.
20000 PROGRAM SECTION TWO
20001 LABEL TRY.AGAIN
20002 DISPLAY 'ENTER DEPT NUMBER:',=
20003 ACCEPT $NUM1
20004 IF $NUM1 < 10 OR $NUM1 > 700
20005 DISPLAY 'INVALID DEPT NUMBER. PLEASE ENTER AGAIN.'
20006 GOTO TRY.AGAIN
20007 ENDIF
.
INFO Reference Manual Commands 323
LCHAR
LCHA
R character
changes or displays the current value of the leading character setting.
argument
character specifies a new leading character. Valid leading characters are any non-digit alphabetic character, except a blank or the current delimiter.
notes discussion
example n
An unqualified LCHAR command displays the current leading character. The default leading character is the integer '0'. To change the default, see Appendix G
Controlling Default Assignments.
The LCHAR command fills unused positions to the left of the most significant digit in L-type data file items or
$NUMn system variables formatted as L-type. Commonly assigned LCHARs are ‘
*’
or '$', used for making printed values on checks tamper proof; and '0', used for fields such as ZIP-CODE, where all positions must contain a valid numeric character.
The following program section changes the LCHAR setting to an asterisk (*), clears the screen and requests an amount.
10000 PROGRAM SECTION ONE
10001 FORMAT $NUM1,15,15,L,2
10002 LCHAR *
10004 DISPLAY AT 10,10 'PLEASE ENTER AMOUNT:'
10005 ACCEPT AT 10,44,$NUM1
10006 DISPLAY AT 15,10 'YOUR CHECK = $',$NUM1
When the above program executes, it displays:
PLEASE ENTER AMOUNT:157.93
INFO responds with:
YOUR CHECK = $*********157.93
which is the amount padded to the left with the leading fill character.
INFO Reference Manual Commands 325
LIMIT
LIM
IT [BY] key-logical-expression-1
[[ OR key-logical-expression-2]
[FOR]
AND syntax cont’d
[
AND
logical-expression-1] [logical-connector syntax cont’d
logical-expression-2] [...]
establishes up to 8 search criteria that INFO uses to determine which of the selected ISAM file records are available for processing by subsequent active commands.
arguments
AND is a reserved logical-connector.
BY is used for documentation and ease of understanding.
FOR is used for documentation and ease of understanding.
OR is a reserved logical-connector.
notes discussion
n
Special considerations apply when using the system items
$SETMAX and $SETMIN for the selected file when a
LIMIT command is in effect. See System Items in
Appendix D for more information.
n
RESELECT BY commands cancel the effect of a LIMIT command.
n
If you issue a PURGE command when a LIMIT command is active,your INFO Isam bitmap is also deleted.
The LIMIT command has no immediate effect on the currently selected set of records; INFO uses the specified search criteria once you process the selected ISAM datafile with a subsequent active command.
The LIMIT command supersedes any previous record selection criteria requested for the datafile. Specifically, the search criteria specified by the LIMIT command replaces any search criteria specified by a previous LIMIT,
ASELECT, or RESELECT command.
INFO Reference Manual Commands 327
LIMIT
When you issue a LIMIT command, INFO performs one read of the selected ISAM file to try to determine if any records meet the LIMIT criteria. INFO uses the results of that read to set the value of the system item $NOSEL, as follows:
0 indicates that no records met the LIMIT criteria.
1 indicates that at least one record met the LIMIT criteria.
Key logical expressions
LIMIT requires a special form of an INFO logical expression, called a key logical expression: the first operand of the expression must be an item name defined as a ISAM key and the expression operator must be EQ,
GE, GT, LE, LT or BW. The specified ISAM key item is the primary access key for the file during future processing of the selected ISAM datafile.
Although the LIMIT command allows up to 8 key logical expressions, the syntax line is restricted by the 200character INFO command buffer. Multiple key logical expressions must reference the same key field and must be connected by the connector OR, as shown in the following command line:
LIMIT BY KEY1 EQ 10 OR KEY1 EQ 20 OR KEY1 EQ 30
The only exception to this rule is the use of the connector
AND, when specifying a single key range condition, as in the following line:
LIMIT BY KEY1 GE 100 AND KEY1 LE 450
You can use the connector AND for either of the following purposes:
To connect two key logical expressions that define a single key-field range condition, for example
LIMIT BY KEY1 GT 19 AND KEY1 LT 61.
328 Commands INFO Reference Manual
LIMIT examples
To define a logical connection between multiple key-field logical expression(s) and any other logical expressions in the LIMIT command. In this case "other" logical expressions can reference any item including other key fields. The key logical expression(s) to the left of the AND establish the main LIMIT criteria and are processed against the ISAM file via keyed access, establishing an initial set of records. The logical expression(s) to the right of the AND connector, whether or not they are key fields, are then evaluated against these records to refine the
LIMIT selections.
INFO evaluates the LIMIT command logical expressions moving left-to-right within the command. Optionally, you can group expressions and connectors within parentheses, to request that INFO process the logic within the parentheses before the logic outside the parentheses.
For more information about connectors and logical expressions, see Building Expressions in the Introduction.
The following examples illustrate the use of the LIMIT command, where KEY1 is a primary key, and KEY2 is a secondary key. The key logical expressions appear in bold type.
In the next example, INFO makes an initial pass of the
ISAM file via KEY1 selecting those records having a KEY1 value of 10 or 50. INFO then reads these records sequentially and further limits them by selecting those records having a KEY2 value equal to the $NUM1 variable.
ENTER COMMAND >LIMIT BY KEY1 EQ 10 OR KEY1 EQ 50 AND KEY2 EQ $NUM1
In the next example, INFO-Text uses the KEY1 range condition (e.g., KEY1 GE 10 AND KEY1 LE 45) to establish an initial set of keyed access records. It then processes these records sequentially, looking for the records that meet the criterion, AND ITEM9 NE $NUM1.
ENTER COMMAND >LIMIT BY KEY1 GE 10 AND KEY1 LE 45 AND ITEM9 NE $NUM1
INFO Reference Manual Commands 329
LIMIT
In the next example, INFO makes its initial pass against the ISAM file via KEY1 only, selecting those records having a KEY1 value greater than the $NUM1 variable. It then processes these records sequentially, looking for the records that meet the remaining criteria.
ENTER COMMAND >LIMIT BY KEY1 GT $NUM1 AND KEY2 NE 0 AND ITEM3 GT $NUM2
see also
RESELECT
330 Commands INFO Reference Manual
LIST
LI
ST syntax cont’d
[beg_rec_1,end_rec_1] ]& beg_rec_2...]
DF_item
[
,
...] system_item system_variable string
#
T
#
X
*TAB
[#]
*X
[#]
*L
[#]
*W
[#]
*E
JECT
*A
row,column
*C
#
*CONT
EXT
*T
EXT syntax cont’d
[
P
RINT
FORMAT
(
FMT
)]
NOLINE
CONT
EXT
TEXT
] [
,
...]
or
LI
ST
AT
row
,
column [DF_item system_item system_variable [
,
...]
string
#
X
#
T
] [,...]
or
LI
ST
=[PRIN
T
]
displays or prints, using optional formatting specifiers, a combination of data file items from the selected set of records, system items, system variables, or strings. An unqualified LIST command displays all item values for all selected records.
INFO Reference Manual Commands 331
LIST arguments
[beg_rec_1,end_rec_1 & beg_rec_2...] you can list ranges of records by specifying the beginning and ending record numbers.
beg_rec_#
and
end_rec_#
must be numeric literals
.
DF_item
an INFO data file item.
system_item an INFO system item.
system_variable an INFO system variable.
string a character string enclosed with single quotes.
*TAB# or #T specifies the position for the next list item where n is the number of the column (1-200). An unqualified *TAB positions the next list item seven spaces to the right of the current column. If you use #T, you must include the tab value. The examples below list the LAST-
NAME from records 1-3 and records 9-12 starting in column 25.
ENTER COMMAND LIST 1,3&9,12 *TAB25,LAST-NAME
or
ENTER COMMAND LIST 1,3&9,12 25T,LAST-NAME
*X# or #X
specifies the spaces to insert before the next list item where n is the number of spaces (1-200). An unqualified *X inserts five spaces. If you use nX, you must include the space count value. The examples below list the LAST-NAME, 15 spaces, and then the DEPT for every record selected.
332 Commands INFO Reference Manual
LIST
ENTER COMMAND >LIST LAST-NAME,*X15,DEPT
or
ENTER COMMAND >LIST LAST-NAME,15X,DEPT
*L# inserts the number of line feeds specified by n. The line count defaults to 1. To double-space, specify *L2.
The following example lists the LAST-NAME from the first
10 records using triple spacing:
ENTER COMMAND >LIST 1,10 *L3,LAST-NAME
*W# specifies the list width for the next list item. If the item is a character item and the n specified is less than the item's defined output width, INFO truncates the item value to the specified number of characters. If the item is numeric and the n is less than the item's defined output width, INFO displays blanks for the item. The following example lists the LAST-NAME from the first 10 records, using one character as the list width. As a result, only the first character of each name appears in a column.
ENTER COMMAND >LIST 1,10 *W1,LAST-NAME
*EJECT clears the screen before the next list item. If you include the PRINT option, *EJECT performs a page eject before the next list item is printed. The example below clears the screen and then lists the LAST-NAME value for the first 5 records.
ENTER COMMAND >LIST 1,5 *E,LAST-NAME
*Arow,column takes the number of the row specified and lists the next list item that many rows below the last row listed and in the specified column. Assuming a previous
INFO command left the screen cursor on row 10, the example below displays LAST-NAME from the first selected record at row 15, column 10 and LAST-NAME from the second selected record at row 20, column 10.
INFO Reference Manual Commands 333
LIST
ENTER COMMAND >LIST 1,2 *A5,10,LAST-NAME
*C# lists a C-type data file item in a column where # specifies the width of the column. If # is less than the defined output width for the item, INFO truncates the item to n characters and wraps the remaining characters in the item to the next line of the same column. Each line of the column conforms to the # width specification. The example below lists the first three characters of LAST-
NAME on one line, lists the next three characters on the next line directly below the first three characters, and so on, until the number of characters defined in the output width is used up.
ENTER COMMAND >LIST *C3,LAST-NAME
INFO-Text only
INFO-Text only
INFO-Text only
INFO-Text only
*CONTEXT displays the specified X- or A-item in context, by including with the search text the two lines before and the two lines after the search text.
CONTEXT displays all X- or A-items referenced in the command line in context, by including with the search text the two lines before and the two lines after the search text.
*TEXT displays the text portion of the specified X- or Aitem.
TEXT displays the text portion of all X- or A-items referenced in the command line.
[,...] any of the previous options may be specified, each preceded by a comma, for a total of 16 specifications.
= the equal sign used as the last specification prevents
INFO from issuing a <RETURN> after data from each record is listed. Instead, INFO lists data from the next selected record on the same line, wrapping only at the end of the screen (or page) width. Subsequent LIST commands always reset this effect. It is used most often to save space when displaying one or two items.
334 Commands INFO Reference Manual
notes
LIST
The = (equal sign) used as the first list specification clears the screen. If this is followed by the PRINT option, a page eject symbol is placed in your spool file.
PRINT sends your listing to your spool file.
NOLINE operates like the equal sign (=) when the equal sign is used as the last list term. This NOLINE effect does not carry over to subsequent LIST commands.
FORMAT (FMT) suppresses data file item, system item and system variable name headings.
AT lists the requested information at the specified row and column on the screen.
row,column row can be a value from 0 to 24. A value of
0 clears the screen. A value of 1 corresponds to the first usable line on the screen and a value of 24 to the last usable line. A value of 24 may cause the screen display to scroll. Column can be a value from 1 to the maximum screen width of your terminal.
n
An unqualified LIST command displays all item values for all selected records, with each record starting on a new line.
n
When listing a range of records, you can separate the beginning record number and end record number with either a comma (,) or a dash (-).
n
There cannot be more than 16 specifications (including format specifiers) per LIST command. The more formatting specifiers you use or the longer the literal specified in the LIST command line, the fewer list terms can be specified with the LIST command.
n
When the combined width of the listed items is less than one line, INFO lists the values for each item in a column, headed by the item name. If the LIST command is executed in an even-numbered program section, no item names appear over the columns. INFO generates a first column which lists the record number for the record on each line under the column heading $RECNO.
INFO Reference Manual Commands 335
LIST discussion
n
When the total width of the listed items is wider than one line, record items are listed vertically, one item per line, with the item name preceding each item value.
INFO lists the item names and values for each selected record in order as the items are defined for the record, for an unqualified LIST command, or as the items are specified. INFO lists the items either in columns or serially, depending upon the total length of the items.
You can include specifications to control the format of the listing, such as tabbing, spacing and column positioning, as described in the syntax description above.
You can suppress the display of item names by including the FORMAT option items or system variables.
The width of the line is dependent on the hardware you are using. The default limits are 80 spaces wide for a screen and 132 spaces wide for a printed line.
When using LIST without the PRINT option, the output of values whose output width exceeds 80 characters is truncated. When using LIST with the PRINT option, the output of values whose output width exceeds the value of the system item $PRINTER-SIZE is truncated. There is no wrapping.
When listing over 23 lines of information, INFO displays
23 lines of data (one screenfull) followed by the prompt
MORE?. Respond as follows:
Response
<RETURN>
Y
Description
Continues listing the records in 23-line increments, beginning with the line after the last line listed on the previous screen, prompting MORE? each time.
Lists remaining records in a continuous display, without stopping after each 23 lines, and returns to ENTER COMMAND> when the last record has been displayed.
336 Commands INFO Reference Manual
N
C examples
LIST
Ends the display and returns to command level.
Ends the display of the current record and begins displaying the next record, in contrast to
<RETURN>, which continues the display with the current record.
List data in the selected records in columns (total width of listed items is less than one line):
ENTER COMMAND >SELECT DF.TYPE
8 RECORD(S) SELECTED
ENTER COMMAND >LIST
$RECNO
1
2
3
4
5
6
7
8
YEAR INDUSTRY
1976 100
1977
1978
1979
1980
1981
1982
1983
250
250
275
300
250
325
0
CONDO
0
25
50
60
100
70
90
100
Lists all the item values for all selected records.
HOUSE
50
75
100
150
150
100
125
150
Vertical list (total width of listed items is wider than one line):
ENTER COMMAND >SELECT DF.CUSTOMER
10 RECORD(S) SELECTED
ENTER COMMAND >LIST 1
CUST-NUM
FIRST-NAME
LAST-NAME
STREET
CITY
STATE
ZIP
Lists the item values for record number 1
=134
=HOLLY
=HARWOOD
=21 HILLVIEW ST.
=HAVERHILL
=PA
=17812
INFO Reference Manual Commands 337
LIST
The following is an example of a datafile containing A-type items being listed (INFO-Text only).
ENTER COMMAND >SELECT—AND—UPDATE—EXAMPLE
ENTER SYNONYM FILE NAME ><R>
2 RECORD(S) SELECTED
ENTER COMMAND >LIST TEXT
l
NAMABLE-A =A.FIL.
This is the contents of the file called A.FIL.
NOT-NAMABLE-A =A00000302
This is the contents of a system-named text file.
2
NAMABLE-A =B.FIL
This is the contents of the second text file named by the user.
NOT-NAMABLE-A =A00000402
This is the second text file named by INFO-Text.
338 Commands INFO Reference Manual
LOG
LOG
file_path
A
PPEND
E
ND
records all user input during an INFO session to an ASCII text file.
arguments
file_path the full pathname of the ASCII text file. If you specify just a file name, it refers to the current working
INFO directory.
APPEND directs INFO to write new log records to the end of an existing file.
END directs INFO to stop saving a copy of terminal input to the LOG file.
notes
n
An unqualified LOG command terminates input logging and closes the active log file.
n
If the text file you specify does not exist, INFO creates and opens it. If the file you specify already exists and you do not use the APPEND option, INFO clears the file and then writes new log records to it.
n
All keystrokes in Input Forms are now recorded to the LOG file — not just the final field. The INFO special characters
<KEEP> <CLEAR> <TAB> and <BACKTAB> are correctly captured so that the log file can be run back as in a COMI file without any editing (see $KIDSP in Appendix D
‘’System Items’’)
discussion
The LOG command records all terminal input in an ASCII text file. You can then use this file as a command file or for control or recovery purposes.
example
ENTER COMMAND >LOG INPUT.LIST
To begin saving a copy of what was entered at the terminal during the
INFO session in an
ASCII text file named
INPUT.LIST
INFO Reference Manual Commands 339
MERGE
MERG
E syntax cont’d
[
I
NTO DF_name] [ON] DF_item_1 [(
D
)]
[,DF_name_2...] [
U
NSORTED]
merges a selected set of records from one data file either into the unselected set of records from the same data file or into another data file. The values of up to 16 data file items common to both sets of records may be used to control the merge.
arguments notes
[INTO DF_name] is used when you want to merge the selected set of records into another data file.
[ON] is used only for documentation and clarification.
DF_item_1 is the item used as the primary merge key.
[(D)] tells INFO to merge the records in descending order by the named item. You must enclose the D in parentheses. If you do not use the D option, INFO merges the records in ascending order.
[,DF_name_2...] item or items used as secondary merge keys.
[UNSORTED] tells INFO that the selected records are not sorted. If this is the case, INFO sorts the selected records by the specified key items before processing the merge.
n
For more efficient processing, always merge a smaller set of records into a larger set of records or a smaller file into a larger file.
n
It is not possible to merge records into an ISAM file.
INFO Reference Manual Commands 341
MERGE discussion
PRIME
Use the MERGE command when you want to add or update records in a file in sorted order without having to resort the entire file.
You can merge unselected records from one file into the unselected records of the same file or into another file. In either case, merge the records on specified items. You can specify up to 16 items. The first item you specify is the primary merge key. Any other items you specify are secondary merge keys and are processed in the order specified.
If you merge records from one data file into another data file, the data files must have the same format and record length.
Both sets of records, whether they are from the same data file or not, should be sorted by the items you specify. If the selected set of records is not sorted, use the
UNSORTED option and INFO sorts it. If you do not sort the records and you do not use the UNSORTED option,
INFO displays an error message and aborts the merge.
For example, if you merge the data file D.NEW.EMPS into the data file D.MASTER on the items BRANCH and
DEPT, in that order, and both files are sorted on those items, the selected records from D.NEW.EMPS will be put into D.MASTER in sorted order, first according to the value of BRANCH and then within BRANCH according to the value of DEPT.
If a selected record has the same value for the specified merge item(s) as a record in the destination set of records,
INFO puts the selected record after the destination record in the file.
The existing file protection status is maintained after
MERGE, rather than set to the value held within
$RWLOCK.
342 Commands INFO Reference Manual
MERGE examples
To update records in a sorted file without having to resort the file:
ENTER COMMAND >SELECT D.MASTER
7 RECORD(S) SELECTED
ENTER COMMAND >LIST
$RECNO BRANCH DEPT NAME
1 1 100 KITTY
2 1 200 LISA
3 1 200 MIRIAM
4 2 100 PAUL
5 2 200 TRISH
6 2 200 SHARON
7 2 300 STEVE
The file is sorted on BRANCH and on
DEPT within BRANCH.
ENTER COMMAND >RESELECT FOR BRANCH = 2 AND DEPT = 200
2 RECORD(S) SELECTED
ENTER COMMAND >CALCULATE DEPT = 50
ENTER COMMAND >LIST
$RECNO BRANCH DEPT NAME
5 2 50 TRISH
6 2 50 SHARON
ENTER COMMAND >MERGE ON BRANCH,DEPT
ENTER COMMAND >ASELECT
7 RECORD(S) SELECTED
ENTER COMMAND >LIST
$RECNO BRANCH DEPT NAME
1 1 100 KITTY
2 1 200 LISA
3 1 200 MIRIAM
4 2 50 TRISH
5 2 50 SHARON
6 2 100 PAUL
7 2 300 STEVE
INFO Reference Manual Commands 343
MERGE
Or to add records in sorted order from one file to another file:
ENTER COMMAND >SELECT D.NEW.EMPS
3 RECORD(S) SELECTED
ENTER COMMAND >LIST
$RECNO BRANCH DEPT NAME
1 2 100 PAULA
2 1 200 JOE
3 2 150 DOM
ENTER COMMAND >MERGE INTO D.MASTER ON BRANCH,DEPT U
The U or UNSORTED option sorts the selected file before processing the merge.
ENTER COMMAND >SELECT D.MASTER
10 RECORD(S) SELECTED
ENTER COMMAND >LIST
$RECNO BRANCH DEPT NAME
1 1 100 PAULA
2 1 200 JOE
3 1 200 DOM
4 1 200 PAULA
5 2 50 JOE
6 2 50 DOM
7 2 100 PAUL
8 2 100 PAULA
9 2 150 DOM
10 2 300 STEVE
344 Commands INFO Reference Manual
PRIME MIDAS
MIDAS
[pathname] [filename]]
causes the creation of a MIDAS file template for a selected file and the automatic externalling of it to the selected file.
arguments description restrictions
pathname the required directory pathname.
filename the MIDAS template name.
This command will use the INFO file definition of a selected file to create a MIDAS template (CREATK) for that file. By specifying a treename, the user can create the
MIDAS template in a separate directory; if the tree name is omitted, the current directory is used. Again by specifying a filename with a treename, the MIDAS template can be assigned a different name; otherwise the name of the INFO selected file will be used. When both parameters are omitted, the file is created locally with the
INFO selected filename. The keys previously specified through INFO using the ALTER command must have been accurate. When this command is executed, it will warn the user that the execution of this command will delete the present MIDAS template (if one exists) for this file
(destroying any records residing there), and ask for the user's approval to continue. If the user answers anything other than "Y", the command will abort immediately. On a
"Y" answer, the present MIDAS file is deleted (if one exists), and another MIDAS file template is created; then the file is automatically externalled to the selected INFO file.
If the user is required to use a pathname, the correct protection must be set, to allow access.
The only numeric types that will currently work as keys under the MIDAS command are binary (B) and floating point (F); the other numeric types will be treated as ASCII strings, i.e. negative numbers will not be evaluated numerically.
Only one user may use this command at a time if attached to the same User File Directory.
INFO Reference Manual Commands 345
MODE
MODE
[
P
RINT ]
S
ET
E
XACT relno#, relno#+1
O
N
OF
F
S
S
S
ET
ET
ET
H
OF
O
N
OF
F
CLOSE
#
CLOSE ALL
F
ORMAT
S
AVE
R
ESET
M
ORE
ON
OF
F
sets (on or off), displays or prints the status setting of some control variables.
arguments
MODE SET
EXACT note see also
An unqualified MODE command displays the status settings of some system items.
[ PRINT ] prints the status settings of some system items.
To determine whether INFO will permit a partial key match determined by the value in the common related item.
With blank in the selected record key for example, it will position to the first record on the related file. By using
NEXT against this file, the whole file can be read. It can be used interactively, in odd or even sections, and in IPFs.
MODE S ET E XACT [RELNO1, RELNOn] [ O N] [ OF F]
n
Data generating options on the specified related file, or any files tree-structured to those files, will be disabled while EXACT is on to prevent unnecessary records being generated. When set on, the read-only system item
$EXACT (occurs 10 indexed by $IDX2) will hold a value of
1.
FIRST
NEXT
INFO Reference Manual Commands 347
MODE example
SEL TRANS
REL CUSTOMER BY CUSTOMER-NAME FILL
RESEL BY $RECNO = 1
/* disable fill option and enable partial-match
MODE SET EXACT 1 ON
MOVE''TO CUSTOMER-NAME
NEXT 1
/* display ALL of the CUSTOMER-NAMEs on the file
/* CUSTOMER starting with the first one
DISP $1CUSTOMER-NAME
MOVE 'B' TO CUSTOMER-NAME
/* will display only the customers who have 'B' in
/* the first character position in CUSTOMER-NAME
DISP $1CUSTOMER-NAME
/* re-enable the FILL option, and return to the
/* normal full-field-width match
MODE SET EXACT 1 OFF
NEXT
The condition of EXACT [RELNO] ON will revert to OFF when the RELATE is broken, i.e. it will not be carried forward to any subsequent file opened on the same REL number.
MODE SET HOF MODE S ET H OF [ O N] [ OF F] [ CLOSE n] [ CLOSE ALL ]
(hold files open)
To control whether ISAM files are to be passively held open
PRIME only within INFO once actively opened within a SELECT /
RELATE structure, even though they are not held within the current SELECT / RELATE structure. The reason for this facility is once the file is open, it can be re-introduced into the active SELECT / RELATE set without incurring a large run-time overhead.
arguments
HOF ON will hold up to a maximum of 60 ISAM files outside of the SELECT / RELATE structure. If the file
(referenced through the EXTERNAL command) is subsequently SELECTed or RELATEd then it will not be re-opened via the ISAM file sub-system but the table reference will merely be snapped within INFO. When set on, the read-only system item $HOF will hold a value of 1.
348 Commands INFO Reference Manual
notes example
MODE
HOF OFF will hold open all files opened under HOF but not add any more to the list. $HOF will be set to 0. This is the default.
HOF CLOSE [#] where # is a number between 1 and 60
(the order in which the files were first selected) will close a given file passively held open within HOF.
HOF CLOSE ALL will close all passively opened files not within the active file set and set $HOF to 0.
If files are opened within the SELECT / RELATE structure they will be held open but removed from the HOF table.
n
Up to 60 ISAM files can be held open, and can be passed open between different INFO usernames using the new
QUIT <username> syntax.
n
HOF [ON] does not in any way impact on the creation or re-use of bitmap files. These will be built or re-used as before.
An application uses 12 ISAM files, of which 5 are frequently used in different programs. A PROFILE could set HOF ON and SELECT each of these 5 files in turn — so that they would all be opened and the EXTERNAL references be resolved as part of the system initialization.
HOF is then set to OFF, so preventing further files from being added to the set. SELECTing or RELATing these files subsequently will be a very fast procedure.
INFO Reference Manual Commands 349
MODE
PROGRAM PROFILE
/* set HOF ON
MODE SET HOF ON
/* open the ISAM master files at
/* beginning of the application
SELECT CUSTOMER-FILE D
SELECT STOCK-FILE D
SELECT ORDER-HEADER D
SELECT ORDER-LINES D
SELECT INVOICES D
/* set HOF OFF — all files held open
/* no more to be added to the list at this time
MODE SET HOF OFF
.
.
RUN ORDER-ENQUIRY
.
.
.
.
PROGRAM ORDER-ENQUIRY
/* snap back onto the ISAM files which have
/* been left open under HOF
SELECT ORDER-LINES
RELATE ORDER-HEADER BY ORDER-NUMBER
RELATE STOCK 2 BY PRODUCT-CODE
RELATE CUSTOMER 3 BY $1CUSTOMER-CODE
MODE SET
FORMAT
MODE S ET F ORMAT [ S AVE] [ R ESET]
The formatting of the 320-byte internal variable buffer may be saved off and reset at a later time, or in another part of a program.
note
MODE SET
MORE
n
The one restriction on the use of the command is that in programs, formats saved by a calling program may only be reset in the program it calls if the two programs were compiled together, i.e. as long as they had the variables formatted the same at the time of compilation
MODE S ET M ORE [ ON ] [ OF F]
This determines whether INFO prompts MORE? when sending more than a screen full of output to a terminal.
The default is ON.
350 Commands INFO Reference Manual
MODE SET COND
MODE S
ET
C
OND [condition name] [
O
FF] [prog name]
[
O
FF]
[
A
LL] [prog name]
[
H
ELP]
to trap INTERRUPT conditions when the operating system raises the condition you have put in the table.
arguments
UNIX
VMS
PRIME
condition name is the name of the INTERRUPT you wish to trap. The available conditions are:
SIGHUP
SIGQUIT
SS$_CONTROLC
SIGINT
QUIT$
ERRTN$
SETRC$
ACCESS_VIOLATION$
ARITH$
BAD_PASSWORD$
BAD_NONLOCAL_GOTO$
BAD_RECORD_ADDRESS$
CONVERSION
DAMAGED_RAT$
DISK_READ_ERR$
FIXEDOVERFLOW
ILLEGAL_INST$
ILLEGAL_ONUNIT-RETURN$
ILLEGAL_SEGNO$
INVALID_REC_ADR$
LINKAGE_ERROR$
LINKAGE_FAULT$
ZERODIVIDE
NULL_POINTERS
NO_AVAIL_SEGS$
OUT_OF_BOUNDS
OVERFLOW
POINTER_FAULT$
RESTRICTED_INST$
R0_ERR$
STACK_OVF$
SVC_INST$
SIZE
STORAGE
STRINGSIZE
SUBSCRIPTRANGE
SYSTEM_STORAGE$
TRANSMIT
UII$
UNDEFINED_GATE$
UNDERFLOW
OFF will take out the condition name from the table or all the conditions if condition name is omitted.
ALL will add all available conditions to the table.
prog name is the name of the program that will be run when the condition is raised.
INFO Reference Manual Commands 351
MODE SET COND
HELP will show the available conditions INFO supports.
note
n
When any of the conditions are raised, INFO will close down all selected and related files. The system item
$CONDITION-NAME contains the name of the condition last raised.
352 Commands INFO Reference Manual
MODIFY
MOD
IFY [DF_name]
changes the template of an empty data file, changes the structure of the redefined area of a non-empty data file, or creates a new data file with the same template as the selected data file and then allows you to change the template of the new data file.
argument notes
[DF_name] is a valid INFO file name unique in your user area. INFO creates a new data file with no records but with the same template as the currently selected data file for you to modify.
n
An unqualified MODIFY command indicates that you want to change the template of the currently selected data file.
n
You cannot use MODIFY to add or change defined items in a data file that contains records. You can use MODIFY to add or change redefined items in a data file that contains records. However, be careful when working with redefined items, since modifying can cause a shift in item starting position (see MRED).
n
If you want to change the item characteristics in a data file that contains records, use the ALTER command.
However, you cannot add new items or change the internal width of an existing item (see CWID).
n
If you specify a new data file, that data file must have a unique 1- to 32-character name. The name can include any character except blanks and the current delimiter character.
n
INFO-Text only - you can use MODIFY to add or change the synonym file associated with a text file.
INFO Reference Manual Commands 353
Response
D [#]
P
I
MODIFY discussion
N [#]
When you issue an unqualified MODIFY command, INFO displays the template of the selected data file the same way the ITEMS LONG command does, and then prompts you with ENTER OPTIONS . You can add items to the data file, delete items, or change any characteristic of an existing item. See Table ITEMS-1 'Items display headings' in the ITEMS command for a description of item characteristics.
If the file is empty, INFO positions you before the first item in the file and you can modify any item. If the file is not empty, INFO positions you at the first redefined item in the file and you can modify only redefined items.
When you issue the MODIFY command and specify a new data file name, INFO copies the template, but not the records, of the selected data file to the new data file, displays the template, and prompts you with ENTER
OPTIONS> . The new data file becomes the selected data file and you can modify any item in that file.
Respond as follows to the ENTER OPTIONS> prompt:
Description
Delete item(s). Deletes the current item. If you specify n, where n is a positive integer, it deletes the next n items starting with the current item. INFO then displays the item characteristics of the new current item.
Insert item. Inserts new item(s) after the current item. INFO prompts you for the characteristics of the new item(s) as it does with the DEFINE command. If you insert an item at the top of the file, that item becomes the first item in the file.
Position to next item. Positions you to the next item in the file. If you specify n, where n is a positive integer, INFO positions you at the item that is n items down from the current item.
INFO displays the characteristics of that item.
Print. Displays the characteristics of the current item.
354 Commands INFO Reference Manual
MODIFY
(cont’d)
Response
Q
R
Description
Quit. Ends the modify session. You can also end the session by pressing <RETURN> as an option.
Replace item. Replaces the current item with a new item. INFO prompts you for the characteristics of the new item as it does with the DEFINE command. If you use R at the top of the file, the new item replaces the first item in the file.
For an empty data file:
examples
ENTER COMMAND >SELECT D.MASTER
0 RECORD(S) SELECTED
ENTER COMMAND >MODIFY
DATAFILE NAME: D.MASTER
12/ 1/1993
3 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC PROT KEY OCCRS INDX CNLV CC CN UN
1 LAST-NAME 10 10 C 4 -
11 FIRST-NAME
21 ADDRESS
10
10
10
10
C
C
-
-
4
4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
ENTER OPTIONS>N
1 LAST-NAME 10 10 C 4 -
ENTER OPTIONS>N
11 FIRST-NAME 10
ENTER OPTIONS>I
10 C 4 -
ITEM NAME>TITLE,4,C
ITEM NAME><RETURN>
ENTER OPTIONS>P
21 TITLE 4
ENTER OPTIONS>N
25 ADDRESS 10
ENTER OPTIONS>R
INFM NAME>ADD1,30,C
INFM NAME><RETURN>
4 C
10 C
ENTER OPTIONS>P
25 ADD1 30 30 C
ENTER OPTIONS><RETURN>
ENTER COMMMAND>
-
-
-
4
4
4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
INFO Reference Manual Commands 355
MODIFY
For a data file containing records:
ENTER COMMAND >SELECT D.MASTER
50 RECORD(S) SELECTED
ENTER COMMAND >MODIFY
DATAFILE NAME: D.MASTER
12/ 1/1993
3 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC PROT KEY OCCRS INDX CNLV CC CN UN
1 LAST-NAME
11 FIRST-NAME
21 ADDRESS
10
10
10
10
10
10
C
C
C
-
-
-
4
4
4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
** REDEFINED ITEMS **
11 F-INIT 1 1 C 0 -
RECORDS IN FILE. MODIFY REDEFINED ITEMS ONLY.
** REDEFINED ITEMS **
ENTER OPTIONS>N
END OF FILE
11 F-INIT 1 1 C 0 -
ENTER OPTIONS>
To create a new data file:
ENTER COMMAND >SELECT D.MASTER
50 RECORD(S) SELECTED
ENTER COMMAND >MODIFY CP.D.MASTER
DATAFILE NAME: CP.D.MASTER
12/ 1/1993
3 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC PROT KEY OCCRS INDX CNLV CC CN UN
-
-
-
-
-
-
-
-
-
-
-
-
1 LAST-NAME
11 FIRST-NAME
21 ADDRESS
10
10
10
10 C
10 C
10 C
-
-
-
4
4
4
ENTER OPTIONS>N
1 LAST-NAME 10 10 C
ENTER OPTIONS><RETURN>
0
ENTER COMMAND>SELECT CP.D.MASTER
0 RECORDS SELECTED
-
-
-
-
-
see also
CWID
MRED
356 Commands INFO Reference Manual
MOVE
MOV
E DF_item system_item system_variable string
TO
DF_item system_variable
takes the value of a data file item, system item, system variable, or character string and moves the value to a target area. The target area can be a data file item or a system variable.
arguments commandless syntax
DF_item | system_item | system_variable | string the object that contains the value to be moved into the target area.
TO indicates the location to which you are moving the specified value.
DF_item | system_variable the target area.
It is not necessary to include the command name
MOVE in the statement .
MOVE ‘ABC’ TO $CHR1 can be coded as
$CHR1 = ‘ABC’
notes
n
If you specify a string as the source value, you must enclose the string in single quotation marks. The string can be of any length that can fit on the MOVE command line, and can include any character. However, if you want to include a single quotation mark in the string, enter two consecutive single quotation marks. For example, you would enter the string 'Mum's the word.' as 'Mum''s the
word.'.
n
When a MOVE is performed from an item on a related file where there is a ‘NO-MATCH’, by default the target item is blank filled. This can be avoided by setting the system variable $MOVFLG to 1. If this is done the target item will be left intact if the source item has not been matched.
INFO Reference Manual Commands 357
MOVE discussion
Use the MOVE command to replace the value of a data file item or system variable with the value of another data file item, system item, or system variable or with a character string. MOVE does not change the value of the source item, variable, or string.
If the target area is longer than the source value, INFO puts blank spaces to the right of the value. If the target area is shorter than the source value, INFO truncates the value.
The MOVE command is a valid command in an interactive session, an odd-numbered program section, or an evennumbered program section.
In an interactive session or in an odd-numbered program section, the following considerations apply:
If the target area is a system variable, the move executes once, unless the source item is the same system variable, in which case the move executes once for each selected record.
If the target area is a data file item, the move executes once for each selected record.
example
ENTER COMMAND >SELECT D.MASTER
2 RECORD(S) SELECTED
ENTER COMMAND >LIST
$RECNO LAST-NAME
1
2
JONES
SMITH
FIRST-NAME DEPT
LARRY R & D
CATHY R & D
ENTER COMMAND >MOVE 'ENGINEERING' TO DEPT
ENTER COMMAND >LIST
$RECNO
1
2
LAST-NAME
JONES
SMITH
see also: $MOVFLG
FIRST-NAME DEPT
LARRY ENGINEERING
CATHY ENGINEERING
Moves a string to an item
358 Commands INFO Reference Manual
MRED
MRED
column #
modifies redefined items to bring them in line with modification of primary items.
arguments discussion examples
column column in which the first redefined item to be modified starts ('first' in the record, not first in the item list).
# number of columns by which the redefined items are to be moved.
This command will alter the starting column for all redefined items starting at or above 'column' by the amount specified in 'amount', which may be positive or negative. The command will not alter redefined item widths.
In the following example, a new item, HIRE-DATE, has been added to the PERSONNEL datafile template via the
MODIFY command, with the result that the redefined items BIRTH-DATE and PHONE-NO now have incorrect starting column values.
ENTER COMMAND >SEL PERSONNEL
0 RECORD(S) SELECTED
ENTER COMMAND >IT
DATAFILE NAME: PERSONNEL 2/1/96
4 ITEMS: STARTING IN POSITION 1
COL
1
21
31
ITEM NAME
NAME
SALARY
HIRE-DATE
39
47
BIRTH-DATE
PHONE-NO
** REDEFINED ITEMS **
21 DOLLARS
31
39
BIRTH-YEAR
AREA-CODE
7
4
3
WDTH OPUT TYP
20 20 C
10
8
10
10
N
D
8
12
10 D
12 D
7
4
3
I
I
C
—
—
—
—
—
2
—
N.DEC PROT KEY OCCRS INDX
— 4 — —
4
4
—
—
—
—
4
4
—
—
—
—
0
0
0
—
—
—
—
—
—
INFO Reference Manual Commands 359
MRED
In the example below, all redefined items starting at or after column 31 are repositioned forward by 8 characters: the two redefined items BIRTH-YEAR and PHONE-NO are now correctly aligned.
ENTER COMMAND >MRED 31 8
21
31
39
47
DATAFILE NAME: PERSONNEL 2/1/96
4 ITEMS: STARTING IN POSITION 1
COL ITEM NAME
1 NAME
WDTH
20
OPUT TYP
20 C
N.DEC
—
PROT KEY
4
OCCRS
— —
SALARY
HIRE-DATE
BIRTH-DATE
PHONE-NO
10
8
8
12
10
10
10
12
N
D
D
D
2
—
—
—
4
4
4
4
—
—
—
—
—
—
—
—
** REDEFINED ITEMS **
21 DOLLARS
39
47
BIRTH-YEAR
AREA-CODE
7
4
3
7
4
3
I
I
C
—
—
—
0
0
0
—
—
—
—
—
—
—
—
—
—
—
—
—
INDX
—
error responses
INVALID SYNTAX
The column and/or amount must be numeric constants.
WARNING: — ATTEMPT TO REDEFINE OFF START OF RECORD
WARNING: — YOU HAVE REDEFINED OFF THE END OF THE RECORD
360 Commands INFO Reference Manual
NAME
NAME
item-1 $name
can be used to rename internal variables in order to give them more descriptive names.
arguments note discussion
n
The user must have his/her own copy of the system items file (INFO9NIT) in his/her operating system directory.
The name from 1-16 characters given by the user will point to the same memory location that the named internal variable is pointing to. Its format will be identical to the format of the named internal variable.
examples
item-1 $NUM#, $CHR#, or $DAT# system variable from
1-40.
$name user-specified name preceded by a dollar sign.
NAME $NUM3 $ROW-COUNTER
NAME $DAT20 $BIRTH-DATE
NAME $CHR30 $EMPLOYEE-NAME
restrictions
A variable to be NAMEd must always be formatted previously. If an internal variable is re-formatted after the
NAME command, the NAMEd variable will not pick up the new format (i.e. the format is picked up when the NAME command is executed).
An internal variable must not be given the same name as a system item (e.g. $TIME, $TODAY, $IDX1, etc.).
Only one user in a system directory may use this command at any one time.
A name may be reused for another internal variable, in which case the original copy is erased.
INFO Reference Manual Commands 361
NAME errors
NO LOCAL SYSTEM ITEMS FILE
NEW NAME MUST START WITH $
INVALID SYNTAX item-1 is not an internal variable
NAME ALREADY IN USE
362 Commands INFO Reference Manual
NEWMAP
NEW
MAP
deselects the currently selected and related datafiles.
Additionally, if the file is ISAM, NEWMAP will delete the INFO bitmap and all set files associated with the selected ISAM file.
INFO Reference Manual Commands 363
NEXT
NEXT O
FF relate_# ... [
P
ARALLEL]
A
LL [label_name] relate_# ... [
N
EW] [label_name]
controls the positioning and processing of related data files. The
NEXT command is particularly useful for processing related data files that do not have a one-to-one correspondence between records. A single NEXT command can position up to nine related files.
arguments
[OFF] is used only in odd-numbered program sections and interactive sessions to end NEXT processing.
[relate_# ...] the relate number(s) of the file(s) to be processed.
[PARALLEL] is used only in odd-numbered program sections and interactive sessions to request parallel advancement of the related data files. If any one of the files fails to match, INFO ends processing of the currently selected record and begins processing the next selected record.
[ALL] is used only in even-numbered program sections and input forms to begin NEXT processing for all related data files in the even-numbered section.
[NEW] is used only in even-numbered program sections and input forms to instruct INFO to leave the related data file positioned to the currently related record — even if that record is not a correct match — after an unsuccessful attempt to reposition the related file. If you do not include the NEW option, INFO re-reads the previous related record after an unsuccessful NEXT.
INFO Reference Manual Commands 365
NEXT notes
[LABEL] label-name is used only in even-numbered program sections and input forms and must be the last parameter. On a match, control will be passed to this label
(see LABEL command), rather than to the first statement in the even-numbered program section or the following statement in the input form. If no match is detected control will be passed to the following statement in both evennumbered program sections and input forms.
n
An unqualified NEXT command uses NEXT processing on the first related datafile (RELNO 1) only.
n
If MODE SET EXACT (See MODE command) is on for a related file INFO will permit a partial key match determined by the value in the common related item.
When used with the FIRST and NEXT commands with blank in the selected record key, INFO positions to the first record in the related file(s) using FIRST, then can read the whole file(s) using NEXT. Using the same technique with a
‘B’ in the selected record key, INFO positions to the first record in the related file(s) whose relate item begins with
‘B’, then can read all the related records which also meet this criteria.
n
INFO performs NEXT processing differently in evennumbered program sections to that in odd-numbered sections and interactive sessions, as described below.
For NEXT to function properly, ensure that all related files are sorted in ascending sequence on the relate key item before you issue the NEXT command. See the RELATE command reference for information about relating data files.
Note that only the following commands use the NEXT matching procedure during processing, when the commands are preceded by a NEXT command in the command stream:
CALCULATE
CONCATENATE
DISPLAY
EXPAND
LIST
MOVE
REPORT
SPECIAL FORM
366 Commands INFO Reference Manual
discussion
NEXT in even-
numbered.
program
sections
NEXT
For each selected record processed by one of the above commands, INFO repositions the specified related file, looking for a record that matches the relate key item. If a no-match condition occurs in the related file, then INFO performs standard error processing. (See Section 2, the
RELATE command, for information about error handling for related data files.)
The NEXT command controls the processing and positioning of the records of up to nine related data files.
By default, INFO processes only the first related file record that matches a selected record. The NEXT command instructs INFO to read the next record in the related data file to see if that record also matches the selected record.
To process more than one related file, enter the relate number (defined in the RELATE command discussion) for the first file to be processed, followed by the relate number of the second file to be processed, and so on.
In even-numbered program sections, INFO executes the entire command sequence for each selected record.
The NEXT command first positions to the next record in each specified related data file and then examines the related record to see if it matches the selected record.
If the values of the related item match in the selected and related records, processing resumes at the first command in the even-numbered program section, unless the LABEL option is specified in which case processing proceeds to the specified label. If a related record fails to match, the command that follows the NEXT command is executed.
Be aware that INFO re-reads the previous related record
(that is, the matching record for that file) after a no-match condition is found. Specify the option NEW to bypass the re-read, leaving the mismatched record in the buffer. (See
also the FIRST command discussion for information about how to reposition to the first record for which the relate key item matches.)
INFO Reference Manual Commands 367
NEXT
NEXT in odd-numbered program sections and interactive use examples
In even sections and input forms the NEXT and FIRST commands may include a <label> as the last parameter.
Control will be passed to this <label> rather than, in the case of NEXT, to the first statement in the even section on a match. NEXT and FIRST within an Input Form, by default, simply drop through to the next statement, as in an even section on a no-match condition.
In odd-numbered program sections or interactive sessions,
INFO processes all selected records for each command before proceeding to the next command. Because of this, you can use the NEXT command to Instruct INFO how to process a related data file when more than one related record matches the selected record.
After processing a matched set of records, INFO advances the related file to the next record. If the next related record also matches, the new set of records is processed.
INFO continues in this manner until a no-match condition occurs. When a no-match occurs, INFO repositions the related file back to the first record in the group of matching records just processed, then obtains the next selected record and continues processing in the same manner.
If more than one related data file is named in the NEXT command, INFO processes each file, as described above, in the order specified. For example, the command NEXT
3 2 1 processes all records that match the relate key item in the third related file before positioning the second related file, then processes all records that match the relate key item in the second related file before positioning the first related file, as illustrated below.
To illustrate NEXT processing, consider a selected data file named FILEX and two other data files, FILEY and
FILEZ. These files are related by the relate key item,
KEY, and contain records with key values, as indicated below:
368 Commands INFO Reference Manual
NEXT
F I L E X F I L E Y F I L E Z
RECORD # KEY RECORD # KEY RECORD # KEY
1 A 1 A 1 A
2 B 2
3 B 3
B
B
2
3
A
B
4 C 4
5 D 5
C
D
4
5
C
C
By default, INFO processes the first related file record that matches a selected record. Results of a LIST are as follows:
ENTER COMMAND > LIST KEY,$1KEY,$2KEY
$RECNO KEY KEY KEY
1 A A A
2 B B B
3 B B B
4 C C C
NO MATCH IN RELATED DATAFILE 2 FOR RECORD 5
5 D D
The following list shows how INFO is matching the records
FILEX RECORD# FILEY RECORD# FILEZ RECORD#
1 1 1
2
3
2
2
3
3
4
5
4
5
4 unmatched
INFO Reference Manual Commands 369
NEXT
370
If the following sequence of commands executes using these three files, INFO uses the NEXT command to match the records as shown below.
SELECT FILEX
RELATE FILEY 1 BY KEY
FILEY is RELATE 1
RELATE FILEZ 2 BY $1KEY
FILEZ is RELATE 2
NEXT 2 1
LIST KEY,$1KEY,$2KEY
$RECNO KEY KEY KEY
1 A A A
1 A A A
2 B B B
2 B B B
3 B B B
3 B B B
4 C C C
4 C C C
NO MATCH IN RELATED DATAFILE 2 FOR RECORD 5
5 D D
The following list shows how INFO is matching the records.
FILEX RECORD# FILEY RECORD# FILEZ RECORD#
1 1 1
1
2
1
2
2
3
2
3
3
4
4
5
3
2
3
4
4
5
3
3
3
4
5 unmatched
If you include the PARALLEL option, INFO advances the related files together after it processes each set of matching records. When a no-match condition occurs on one or more of the related files, INFO reads the next selected record, performs standard positioning on the related files, then advances the related files in parallel until another no-match condition occurs. The same files
Commands INFO Reference Manual
NEXT
used in the above example would yield the following groups of records when processed by NEXT with the
PARALLEL option:
FILEX RECORD# FILEY RECORD# FILEZ RECORD#
1 1 1
2
3
2
2
3
3
4
5
4
5
4 unmatched
INFO Reference Manual Commands 371
NMVE
NMVE
item-1 [TO] item-2
moves any numeric field to a character field. Negative numbers are enclosed in parenthesis and zeros are replaced by a single right justified dash (-).
arguments discussion
item-1 Any INFO numeric item.
item-2 Any INFO character item. The width of this item must be at least one character greater than the width of the numeric item, and in practice should be one greater than the required output width of the numeric field.
NMVE moves the numeric item to the designated character field. If the source item is negative, the minus sign is replaced by an opening bracket, and a closing bracket is appended to the character field. If the source item is zero, the destination field is blank filled except for a right justified dash (-). The normal INFO rules concerning commas in numeric output fields are observed. For this purpose, the output width is taken as one less than the width of the destination field.
error responses
INVALID SOURCE item not numeric
INVALID DESTINATION item not character
DESTINATION ITEM TOO SHORT
Item width not at least one greater than source item width.
INFO Reference Manual Commands 373
NSELECT
NSE
LECT
simultaneously selects the currently unselected set and deselects the current working set.
notes example
When you narrow or add to your working set of records based on certain criteria, you do not have access to the records in the data file that do not meet that criteria.
NSELECT brings those records that did not meet the
RESELECT or ASELECT criteria into the working set and takes all other records out of the working set.
If you issue NSELECT again, it moves the records the first
NSELECT put into the working set into the unselected set and puts all the other records into the working set.
If you select all the records in a data file and then issue
NSELECT, there will be zero (0) records in the working set.
In the following command sequence, the NSELECT command works with the RESELECT command to separate records from the file INVOICES into two groups for reporting purposes.
First, RESELECT puts the records that have BALANCE-
DUE equal to zero into the working set of records. The report CLOSED-ITEMS processes the set. Then,
NSELECT removes the records that have BALANCE-DUE equal to 0 from the set and puts all of the rest of the records in the file into the set. The report OPEN-ITEMS processes these records.
INFO Reference Manual Commands 375
NSELECT
ENTER COMMAND >SELECT INVOICES
40 RECORD(S) SELECTED
ENTER COMMAND >RESELECT FOR BALANCE-DUE EQ 0
30 RECORD(S) SELECTED
ENTER COMMAND >REPORT CLOSED-ITEMS Y 60,
ENTER COMMAND >NSELECT
10 RECORD(S) SELECTED
INFO selects all records not selected by the
RESELECT.
ENTER COMMAND >REPORT OPEN-ITEMS Y 60,
see also
ASELECT
DSEL
RESELECT
SELECT
376 Commands INFO Reference Manual
INFO-Text
OPCL
OSE
closes the current INFO spool file.
discussion
OPCLOSE
This command closes the print output file. This will be either the default spool file (nsp) or the file specified in the most recent OUTPUT command.
INFO Reference Manual Commands 377
OUTPUT
OUTP
UT file_path [
A
PPEND]
[
I
NIT]
[
U
SER] [
N
OFTN]
names a file to receive output from INFO for subsequent printing.
arguments note discussion example see also
An unqualified OUTPUT command reverts to the default output file.
file_path the output file. The file_path may include external variables enclosed in ‘ % ’ characters.
APPEND adds subsequent output to the end of the named output file, instead of initializing the file. APPEND is the default.
INIT initializes the output file before writing to it.
USER appends a shortened form of the user’s process id to the named output file.
NOFTN (VMS only) creates an output file that does not contain FORTRAN-style carriage control information.
The pathname may include external variables enclosed in
‘ % ‘ characters.
The OUTPUT command closes (but does not delete) the default spool file or current previous output file, and creates an ASCII text file (if the specified file does not already exist) which will receive subsequent output from
INFO for future printing.
See the SPOOL command for information about printing an INFO spool or output file.
In the example below, the INFO user xxx specifies and initializes an existing ASCII text file called myrept.out to collect the output from two INFO reports and then issues a second OUTPUT command to direct the output back to the file xxx.nsp (the user's default INFO spool file). Unlike the spool file xxx.nsp, the file myrept.out is not cleared automatically the next time the INFO user xxx signs on.
$SEQ-REC-FORMAT (VMS only)
$SVIDEL (VMS only)
INFO Reference Manual Commands 379
OUTPUT
ENTER COMMAND >OUTPUT MYREPT.OUT INIT
ENTER COMMAND >REPORT R.SALES Y 54,
ENTER COMMAND >REPORT R.YTD.PAYROLL Y 54,
ENTER COMMAND >OUTPUT XXX.NSP
Resets the output file to the default INFO spool file.
380 Commands INFO Reference Manual
PASSWORD
PASS
WORD password_0 password_1 password_2 password_3
allows you to specify one of four passwords for a protected data file before you use that data file.
argument notes
password-# is a 1- to 4-character string.
discussion
n
When you use the PASSWORD command to specify an appropriate password (that was previously assigned using the DEFINE or PROTECT command), the level of access to the data file that you gain remains in effect until you issue another PASSWORD command or until you end your user session (with the QUIT command).
If you do not use the PASSWORD command before you select or relate a protected data file, INFO prompts you with ENTER PASSWORD > as you attempt the select or relate.
The PASSWORD command allows you to access data in those items that were defined for restricted use in a protected data file. The password you specify in a
PASSWORD command determines which data in a protected data file you can use. The PROTECT command assigns passwords to each protection level used by the items in a protected data file. See the 'Item protection levels' section of the DEFINE command for a description of the four types of data file protection.
When you create a data file with the DEFINE command, you can specify a protection level for each data file item.
With the DEFINE command you can also specify passwords for each level of protection you build into the data file's item definitions. Alternatively, you can use the
PROTECT command to specify a password for each level of protection used by the items in the data file after the data file is defined.
INFO Reference Manual Commands 381
PASSWORD
In order to use a protected data file, you provide a password with the PASSWORD command to specify which type of access you want to the data file (that is, which items in the data file you want to use in subsequent commands).
example
ENTER COMMAND >PASSWORD BOAT
BOAT is the owner
ENTER COMMAND >SELECT D.MASTER
level password for
10 RECORD(S) SELECTED
D.MASTER.
.
.
.
ENTER COMMAND >SELECT D.NEW.EMPS
3 RECORD(S) SELECTED
.
.
.
ENTER COMMAND >SELECT D.MASTER
You do not have to
10 RECORD(S) SELECTED
reissue the ownerlevel password to use this data file again.
see also
PROTECT
382 Commands INFO Reference Manual
PRIME
PH
ANTOM item-1 item-2
starts up an operating system Phantom.
PHANTOM arguments
item-1 character item or quoted literal string containing the name of the Phantom command file.
item-2 optional numeric item which will be returned as non-zero if the operation failed. If not present, an error message will be printed and program execution will be halted.
error response
INVALID SYNTAX — item-1 is not of type character
INFO Reference Manual Commands 383
POS
item-1
to position on the selected file to an absolute record number
POS argument notes
item-1 numeric, internal variable, datafile item or literal containing a positive integer indicating the record number to position to.
n
Even numbered program sections only n
Will position on the selected file to the absolute record number specified. If you POS to a record number below or above the $SETMIN and $SETMAX values of the currently selected set, you will get the error message ‘NO
RECORDS SELECTED IN THE SPECIFIED RANGE’ and will be left positioned on the currently selected record.
n
If the record number is within $SETMIN and $SETMAX but is not in the currently selected set, INFO will position to the nearest record number in the selected set above the specified number.
INFO Reference Manual Commands 385
INFO-Text POSTINGS
POST
INGS
Y
N
assigns or displays the value of the POSTINGS setting
argument
An unqualified POSTINGS command displays the current
POSTINGS setting.
Y or N sets the postings setting on (Y, the default) or off
(N).
notes discussion
n
If the RESELECT or ASELECT word expression matches several terms within an item that is not defined as concordable to the word level, then the OCCURRENCES count will not reflect the total number of occurrences for each of the several terms, but will rather be incremented only once for the given concordance level.
n
For example, if an item that is not concorded to the word level contains the text "MY FATHER AND YOUR FATHER
ARE FRIENDS", and if that item is searched during a
RESELECT or ASELECT command for a match on the word "FATHER", INFO-Text adds 1 to the occurrences count for the word "FATHER", even though the word appears twice in the text.
The RESELECT and ASELECT commands use the
POSTINGS setting to determine whether to display the results of a RESELECT or ASELECT command using a word expression as a search term. If the POSTINGS setting is on (Y), INFO-Text displays the individual words found as a result of each RESELECT or ASELECT command, in the format shown below. This is a valuable tool for determining which search word expressions narrow down the selected records most efficiently.
INFO Reference Manual Commands 387
POSTINGS
OCCURRENCES mmmmmm
example
TERM word
INFO-Text
ENTER COMMAND >POSTINGS Y
ENTER COMMAND >ASELECT SE\
ASEL (SETTING SERVICE SELECT)
100 RECORD(S) SELECTED
OCCURRENCES TERM
25 SETTING
15 SERVICE
135 SELECT
388 Commands INFO Reference Manual
PREVIOUS
PREV
IOUS relate_#
reads previous record in related datafile
relate_# related file number. Default is 1.
argument notes
n
Works on ISAM primary or secondary keys or DAM files.
n
Does no checking at all.
n
You get a blank record returned if any problem is encountered (including beginning of file).
INFO Reference Manual Commands 389
PRIF
PRIF
IF_name
writes a printable image of the screen display of an INFO input form to the current INFO spool or output file for documentation purposes.
argument notes
IF_name the name of an INFO input form file.
discussion
n
The PRIF command uses the OBJ file for the input form, the input form must therefore have been successfully compiled.
n
The PRIF command cannot be used with multi-screen input forms.
The PRIF command writes a printable image of the screen display of an INFO input form to the current INFO spool or output file. The image includes all literals and input fields
(identified as a series of periods) that make up the form.
INFO Reference Manual Commands 391
PRIME PRIM
PRIM
can be issued to enter the "pseudo" SYSTEM command mode where internal SYSTEM commands and external (CMDNC0) commands can be executed within INFO without affecting currently selected and related files.
discussion
After issuing this command, a user may execute any command that could normally be executed at SYSTEM command level, apart from DELSEG, RLS and CLOSE.
The user will be prompted with:
"OK" until an "X" is typed to return to INFO command level.
example
ENTER COMMAND >PRIM
*** ENTERING PSEUDO SYSTEM — TYPE "X" TO EXIT ***
OK >AVAIL
VOLUME DISK12
34476 TOTAL RECORDS (NORMALIZED)
4403 RECORDS AVAILABLE (NORMALIZED)
87.2% FULL
OK >STAT UN
USR=SC0001
File
Unit
1
8
9
10
File Open
Position
000000240
000000000
000000040
000000120
File mode Type RWlock Treename
RW
RW
DAM
SAM
NR&NW
NR-1Q
<DISK 12>INFOSYS>TETDR9
<DISK 12>INFOSYS>TETNSP
R
RW
DAM NR&NW <DISK 12>INFOSYS>INFO9NIT
DAM NR&NW <DISK 12>INFOSYS>MESSAGES
OK >X
ENTER COMMAND >
see also
SPAWN
SYSTEM
INFO Reference Manual Commands 393
PRI
NT [beg_rec_1,end_rec_1& beg_rec_2...] syntax cont’d
DF_item system_item system_variable string
#
T
#
X
*TAB
[#] [,...]
*X
[#]
*L
[#]
*W
[#]
*E
JECT
*A
row,column
*C
#
*CONT
EXT
*T
EXT syntax cont’d
[
,=
] [
NOLINE
CONT
EXT
T
EXT]
or
PRI
NT
=
sends to your spool file or current output file any combination of data file items, system items, system variables and literals. An unqualified PRINT command prints all item values for all selected records with each record printing on a new line.
arguments
[beg_rec_1,end_rec_1& beg_rec_2...] you can print ranges of records by specifying the beginning and ending record numbers. beg_rec_# and end_rec_# must be numeric literals.
DF_item an INFO data file item.
system_item an INFO system item.
INFO Reference Manual Commands 395
system_variable an INFO system variable.
string a character string enclosed with single quotes.
*TAB# or
#T specifies the column at which to position the next print item where # is the number of the column (1-
200, depending on the value of $PRINTER-SIZE; note that whatever you put in column 1 is treated as a carriage control character and does not print) unless you specify
'No Fortran' option. An unqualified *TAB positions the next print item seven spaces to the right of the current column. If you use #T, you must include the tab column value. The examples below print the LAST-NAME from records 1-3 and records 9-12, starting in column 25.
ENTER COMMAND >PRINT 1,3&9,12 *TAB25,LAST-NAME
or
ENTER COMMAND >PRINT 1,3&9,12 25T,LAST-NAME
*X# or #X specifies the spaces to insert before the next print item where # is the number of spaces (1-200, depending on the value of $PRINTER-SIZE). An unqualified *X inserts five spaces. If you use #X, you must include the space count value. The examples below print the LAST-NAME, 15 spaces, and then the DEPT for every record selected.
ENTER COMMAND >PRINT LAST-NAME,*X15,DEPT
or
ENTER COMMAND >PRINT LAST-NAME,15X,DEPT
*L# inserts the number of line feeds specified by n. The line count defaults to 1. To double-space, specify *L2.
The following example prints the LAST-NAME from the first 10 records using triple spacing:
ENTER COMMAND >PRINT 1,10 *L3,LAST-NAME
396 Commands INFO Reference Manual
*W# specifies the print width for the next print item. If the item is a character item and the # specified is less than the item's defined output width, INFO truncates the item value to the specified number of characters. If the item is numeric and the # is less than the item's defined output width, INFO prints blanks for the item. The following example prints the LAST-NAME from the first 10 records, using one character as the display width. As a result, only the first letter of each name will appear in a column.
ENTER COMMAND >PRINT 1,10 *W1,LAST-NAME
*EJECT performs a page break before the next print item.
The following command starts a new page before each
LAST-NAME value is printed for the first five records. As a result, you will have five screens of output with a single
LAST-NAME printed at the top of each screen.
ENTER COMMAND >PRINT 1,5 *E,LAST-NAME
*Arow,column takes the number of the row specified and prints the next print item that many rows below the last row printed and in the specified column. The example below prints LAST-NAME from the first selected record at row 5, column 10 and LAST-NAME from the second selected record at row 10, column 10.
ENTER COMMAND >PRINT 1,2 *A5,10,LAST-NAME
*C# prints a C-type data file item in a column where # specifies the width of the column. If # is less than the defined output width for the item, INFO truncates the item to # characters and wraps the remaining characters in the item to the next line of the same column. Each line of the column conforms to the # width specification. The example below prints the first three characters of LAST-
NAME on one line, prints the next three characters on the next line directly below the first three characters, and so on, until the number of characters defined in the output width is used up.
ENTER COMMAND >DISPLAY *C3,LAST-NAME
INFO Reference Manual Commands 397
INFO-Text only
INFO-Text only
INFO-Text only
INFO-Text only
*CONTEXT prints the specified or A-item in context, by including with the search text the two lines before and the two lines after the search text.
CONTEXT prints all A-items referenced in the command line in context, by including with the search text the two lines before and the two lines after the search text.
*TEXT prints the text portion of the specified A-item.
TEXT prints the text portion of all A-items referenced in the command line.
[,...] any of the previous options may be specified, each preceded by a comma, for a total of 16 specifications.
= an equal sign at the end of a print list prevents INFO from issuing a carriage return after data from each selected record is printed. Instead, INFO continues printing information from the next selected record on the same line, wrapping only at the end of the page width.
Subsequent PRINT commands always reset this effect. It is used most often to save space when printing one or two items. This option is not valid in even program sections.
= (equal sign) used as the only print specification (the second syntax description above) performs a page eject by sending a top-of-form print control character to the spool file.
NOLINE operates like the equal sign (=) when the equal sign is used at the end of a print list. This NOLINE effect does not carry over to subsequent PRINT commands.
This option is not valid in even program sections.
notes
n
By default, the PRINT command places output starting in column 2 to allow for fortran control characters. To force output to start in column 1, use PRINT 1T or PRINT 0X.
n
An unqualified PRINT command prints all item values for all selected records with each record starting on a new line.
398 Commands INFO Reference Manual
n
When printing a range of records, you can separate the beginning record number and end record number with either a comma (,) or a dash (-).
n
There cannot be more than 30 DF_items per PRINT command. The more formatting specifiers you use or the longer the literal in the PRINT command line, the fewer the number of display terms that can be included in the
PRINT command line.
discussion
INFO separates adjacent data file items in the PRINT output with a single space. You can instruct the system to leave more spaces by using either the *X or *TAB options.
Use PRINT = to force a page break in a file to be spooled.
INFO reserves the first print position in each line for a carriage control character. You can include any standard carriage control character in column one by using the
*TAB option followed by the control character.
examples
PRINT *TAB1,'+','_____' underlines the first four positions of the previous print line. (The carriage control character
'+' suppresses line spacing.)
The following sequence prints the value of the item SSN,
10 spaces, and then the value of the item EMPLOYEE-
NAME for each selected record.
ENTER COMMAND >SELECT D.EMP
2 RECORD(S) SELECTED
ENTER COMMAND >PRINT SSN,*X10,EMPLOYEE-NAME
ENTER COMMAND >SPOOL
The following lines appear on your print output:
018670158 JOHN DOE
424889765 BILL SMITH
INFO Reference Manual Commands 399
PROGRAM
PROG
RAM PG_name
PROG
RAM [SECTION] [section_number]
creates a new INFO program or starts a new section in an existing
INFO program.
arguments
PG_name the name of the program to be created.
[SECTION] [section_number] used within a program for documentation or ease of understanding (e.g., PROGRAM
SECTION TWO, PROG ODD or PROG EVEN.
notes
n
An unqualified PROGRAM statement is allowed only when you are writing the program. It takes you to the next program section.
discussion
Odd numbered program sections
n
Use the CHANGE or EDIT commands to change a program. See the COMPILE and RUN commands for information on executing a program.
An INFO program is a sequence of INFO commands stored in a file. INFO executes the commands when you run the program. The PROGRAM command creates the program file.
INFO programs contain one or more sequentially numbered sections. There are two types of sections: oddnumbered sections and even-numbered sections. Program section one is an odd-numbered section, program section two is an even-numbered section, and so on. The two types of sections function differently.
In an odd-numbered program section, INFO processes each command on the entire set of selected records before processing the next command. This is the same as issuing a series of commands in an interactive session. It is best to format and initialize system variables, select and relate data files, and report results (by running reports or special forms) of processing in odd-numbered program sections.
INFO Reference Manual Commands 401
PROGRAM
Even numbered program sections
Create a program
In an even-numbered program section, INFO executes all of the commands in the even section once for each selected record. If the program changes a record during an even section, INFO rewrites the record at the end ofthe even section before reading the next selected record. It is best to update data files and do repetitive reporting (using
FC or PRINT commands) and transaction processing in even-numbered program sections.
To create a new program, enter the PROGRAM command followed by a program name. The program name must be
1- to 32-characters long and be unique to your directory.
INFO starts program section one and displays:
10000 PROGRAM SECTION ONE >
At the prompt, enter a valid program command keeping in mind odd-numbered and even-numbered section processing differences. See 'Execution modes for INFO commands' to determine which commands are legal in which program section. If you enter a command that is invalid for the current program section, INFO issues an error message and prompts you for a new command.
Continue entering commands until you want to go to the next program section or end the program. To go to the next program section, enter the PROGRAM command at the > prompt. To end the program, enter <RETURN> at the > prompt. If you end a program on an even-numbered section, INFO generates a PROGRAM END statement after you compile the program.
INFO determines the odd/even-numbered section sequence by the placement of the PROGRAM commands.
For example, the first PROGRAM command starts program section one, the second PROGRAM command starts program section two, and so on.
INFO also numbers each line in the program in increments of one starting with 10000 for program section one, 20000 for program section two, and so on. However, you do not see these numbers, except for the number 10000, while you create the program. You see them when you display the program (using the TYPE command).
402 Commands INFO Reference Manual
PROGRAM
PROFILE and
WRAPUP
There are two special programs you can create, named
PROFILE and WRAPUP. After you enter an INFO user name at the ENTER USER NAME > prompt, and before you see the first ENTER COMMAND > prompt, INFO searches your user area for a program named PROFILE.
If INFO finds it, the PROFILE program is immediately executed; as it ends, you see the ENTER COMMAND > prompt to begin your INFO session. You can use
PROFILE programs to begin menu-driven applications.
When you enter the QUIT command, INFO searches your user area for a program named WRAPUP. If INFO finds it, the WRAPUP program is immediately executed; as it ends, your INFO session ends, and you see either the
ENTER USER NAME > prompt or you return to operating system level if you included STOP with the QUIT command. The PROFILE and WRAPUP facilities are useful for doing routine maintenance of the files in your user area at the start and end of your INFO sessions.
INFO programming notes
n
Format any system variable you use before you reference it.
n
To reduce system overheads, avoid selecting and relating the same data files more than once in a program.
n
Cancel data file relationships when you no longer need them. This also reduces system overheads.
n
If you do not expand the command line for a report or a special form to include where to send the output and other execution options, the report is sent to your screen.
INFO Reference Manual Commands 403
PROGRAM examples
Creating a program:
ENTER COMMAND >PROGRAM P.PAYROLL
10000 PROGRAM SECTION ONE
>SELECT D.PAYROLL
>RESELECT FOR PAY-STATUS = 'E'
>FORMAT $NUM1,12,N,2
>CALCULATE $NUM1 = 0
>PROGRAM SECTION TWO
>IF DEPT LT 9000
> CALCULATE $NUM1 = $NUM1 + NET
> MOVE '*' TO PAY-STATUS
>ENDIF
><RETURN>
see also
The program after you compile and run it:
ENTER COMMAND >TYPE P.PAYROLL
PROGRAM NAME: P.PAYROLL 10/ 8/96
10000 PROGRAM SECTION ONE
10001 SELECT D.PAYROLL
10002 RESELECT FOR PAY-STATUS = 'E'
10003 FORMAT $NUM1,12,N,2
10004 CALCULATE $NUM1 = 0
20000 PROGRAM SECTION TWO
20001 IF DEPT LT 9000
20002 CALCULATE $NUM1 = $NUM1 + NET
20003 MOVE '*' TO PAY-STATUS
20004 ENDIF
99999 PROGRAM END
CHANGE
EDIT
COMPILE
RUN
DECODE
404 Commands INFO Reference Manual
PROTECT
PROT
ECT [password_0 [password_1 [password_2 syntax cont’d
[password_3]]]]
assigns, modifies, or deletes passwords associated with a protected data file. The PROTECT command operates on the selected data file.
argument notes
password_# is a 1- to 4-character string.
discussion
n
An unqualified PROTECT command removes all protection from the selected data file. If the data file is protected, you must select it using the control-level password (password-0) before using the PROTECT command in this way.
n
You cannot specify ' ' (four blank spaces) as a password.
Passwords protect a data file against unauthorized access.
With the PROTECT command, you can assign from one to four passwords to a protected data file. Each password you specify corresponds to a type, or level, of restricted access to the data file. See the 'Item protection levels' section of the DEFINE command for information about data file item protection levels.
Once you assign passwords for the respective protection levels on the data file, you must enter the password for the appropriate level before you can access the data file.
Password-0 gives you owner or control level access, password-1 gives you level 1 and level 4 access, password-2 gives you level 2 and level 4 access, and password-3 gives you level 3 and level 4 access. Level 4 means that there are no restrictions for using that item.
If less than four passwords are defined for a data file,
INFO accepts <RETURN> as the response to the ENTER
PASSWORD> prompt and gives you an access level equal to the lowest level omitted in the PROTECT command.
INFO Reference Manual Commands 405
PROTECT
For example, if you issue a PROTECT command that provides only control and level 1 passwords for a data file and then you select the file and respond with a
<RETURN> to the ENTER PASSWORD> prompt, INFO gives you level 2 and level 4 access to the file.
examples
ENTER COMMAND >SELECT D.PAY.MASTER
2070 RECORD(S) SELECTED
ENTER COMMAND >PROTECT DOG BIRD DUCK CAT
ENTER COMMAND >SELECT D.PAY.MASTER
ENTER PASSWORD><RETURN>
INVALID PASSWORD - TRY AGAIN
ENTER COMMAND >
Not allowed.
The INFO command sequence below removes protection from this same file:
ENTER COMMAND >SELECT D.PAY.MASTER
ENTER PASSWORD>DOG
2070 RECORD(S) SELECTED
ENTER COMMAND >PROTECT
ENTER COMMAND >SEL D.PAY.MASTER
2070 RECORD(S) SELECTED
Owner access.
No longer prompted for password.
see also
PASSWORD
406 Commands INFO Reference Manual
PURGE
PURG
E [
Y]
[
N
]
permanently deletes all currently selected records.
arguments
An unqualified PURGE command permanently deletes all selected records from the selected datafile and selects all the previously unselected records.
Y (INFO-Text only) purges all text files for A-type items.
In an interactive session, PURGE Y suppresses the
DELETE TEXT ITEM FILES ? prompt.
N (INFO-Text only) does not purge text files for A- type items. In an interactive session PURGE N suppresses the
DELETE TEXT ITEM FILES? prompt.
notes
n
If you use the PURGE command in a program, INFO deletes the selected records without prompting you to verify the request.
n
When you use the PURGE command interactively, INFO issues the following prompt(s):
DELETE TEXT ITEM FILES? (Y OR N)>
INFO-Text only
THIS COMMAND WILL DELETE SELECTED RECORDS. OK?>
This allows you to check your purge request before INFO executes the purge. Respond as follows:
Y (Yes) to perform the purge.
<RETURN> or any character except 'Y' to return immediately to the ENTER COMMAND> level without executing the purge.
n
The existing file protections are maintained.
INFO Reference Manual Commands 407
PURGE
ISAM files
When records from a ISAM set are purged, then that set is packed and all other sets, including SET 1 (the NDX file) are deleted. The file relationships are always retained on the current set regardless of the set number.
Where a record(s) is locked by another user on an ISAM file and default record locking is being used, if a user attempts to purge, the message 'RECORD LOCKED DO
YOU WANT TO TRY AGAIN?' appears. If the user responds with 'N' or the record remains locked, then this record(s) will not be removed from the current set.
The variables $SETMIN and $SETMAX, $NOSEL and
$NOREC are set correctly to the number of records remaining in the set following the attempted purge. By checking the value of $NOSEL immediately after a purge, it will be possible to determine whether all records were successfully deleted or not.
To summarize: n
PURGE on SET 1 removes all sets apart from the current one, but leaves the current one compacted.
n
PURGE on SET > 1 removes all sets apart from the current one and set 1. Set 1 contains zero records and the current set is compacted.
In all cases existing read-write lock settings will be maintained on compacted set files.
example
ENTER COMMAND >SELECT D.EMP.MASTER
267 RECORD(S) SELECTED
ENTER COMMAND >RESELECT FOR STATUS = 'T'
13 RECORD(S) SELECTED
ENTER COMMAND >PURGE
THIS COMMAND WILL DELETE SELECTED RECORDS. OK?Y
254 RECORD(S) SELECTED
see also
$PURGE-LOCAL
RESELECT BY
SET
408 Commands INFO Reference Manual
QUIT
Q
UIT [
STOP
]
[user name] [program name]
ends the current user session, after which you can specify another
INFO user name in which to use INFO.
argument
STOP ends the entire INFO session and returns to the operating system level.
user name opens a new user session in the specified
INFO directory.
program name runs the specified program.
notes discussion
n
An unqualified QUIT command ends processing for the current user name. INFO then prompts for the next user name. Specifying STOP as the next user name will also end the INFO session.
n
If an INFO program named WRAPUP exists in your user area when you issue a QUIT command, INFO automatically executes the WRAPUP program before the user session ends. See the PROGRAM command for a description of the WRAPUP feature.
n
When specifying an INFO user name and a program name as arguments, if an INFO configuration file (info.cfg or text.cfg) exists, it will be executed first, followed by the
PROFILE program if it exists in the specified user name.
The QUIT command ends the use of INFO under the current user name. After the QUIT command is processed, you can specify another user name under which you can continue to use INFO.
Alternatively, you can include the STOP option to the
QUIT command to end the INFO session entirely.
INFO Reference Manual Commands 409
QUIT example
ENTER COMMAND >QUIT
Terminates only the current user session.
ENTER USER NAME>LMG
Enter another INFO user name.
or or
ENTER COMMAND >QUIT STOP
Ends the INFO session.
ENTER COMMAND >QUIT ABC
Exits current INFO directory and goes into ABC INFO directory.
or
ENTER COMMAND >QUIT ABC MENU
Exits current INFO directory and goes into ABC INFO directory and runs program MENU (N.B. If an INFO configuration file (info.cfg or text.cfg) exists, it will be executed first, followed by the PROFILE program if it exists in user ABC.)
NB. If an Info configuration file (info.cfg or text.cfg) exists, it will be executed first, followed by the PROFILE program if it exists in user ABC.
410 Commands INFO Reference Manual
RECA
SE DF_item system_item system_variable
recases the contents of the specified item or variable.
RECASE arguments
DF_item | system_item | system_variable the item or variable name to be recased.
note discussion
n
When the specified data file item, system item, or system variable includes a word or sequence of letters in which the strings “ MC ” or “ O’ ” are found, the RECASE command leaves the first letter following such strings capitalized to cater for family names of Scottish and Irish origin.
The RECASE command scans the specified charactertype data file item, system item, or system variable for a word or a sequence of letters, containing capital letters. If the string contains one or more capital letters, the first character is left unchanged and the following characters are converted to lowercase.
Any other sequence of characters found in the specified item, system item, or system variable is not changed.
If the item, system item, or system variable is not a character type, INFO displays an error message and does not change the item, system item, or system variable.
INFO Reference Manual Commands 411
RECASE example
ENTER COMMAND >DISPLAY $CHR1,$CHR4
EDISON, THOMAS ALVA MCRABBIT, PETER
ENTER COMMAND >RECASE $CHR1
ENTER COMMAND >RECASE $CHR4
ENTER COMMAND >DISPLAY $CHR1,$CHR4
Edison, Thomas Alva McRabbit, Peter
ENTER COMMAND >DISPLAY $CHR10
HELLO Hello hello hElLo HeLlO
ENTER COMMAND >RECASE $CHR10
ENTER COMMAND >DISPLAY $CHR10
HELLO Hello hello hello Hello
412 Commands INFO Reference Manual
REDEFINE
RED
EFINE
starts a dialog through which you can redefine items in the selected data file.
notes discussion
n
You cannot use the REDEFINE command to change characteristics of existing defined items or the overall record length of the data file. See the ALTER command for information about changing item characteristics and the
MODIFY and CWID commands for information about changing the width of existing items.
n
When you enter multiple redefined item characteristics, the total line length is restricted to 200 characters including commas. If required characteristics remain for which you have not entered a response, INFO prompts for the remaining information.
n
If you enter a redefined item characteristic in error, INFO displays a message and prompts again for a corrected response.
n
Redefined items are permanently added to the structure of the data file.
The REDEFINE command allows you, to redefine any portion of the data file record as an item. These portions, or redefined items, can be parts of existing items or can overlap item boundaries. The data found in a redefined item can be part of two different items.
Redefined items can serve as:
An alternate name for a previously defined or redefined item.
An item that is a subset of a previously defined or redefined item.
INFO Reference Manual Commands 413
REDEFINE
An item that combines several contiguous items, previously defined or redefined.
Once you have entered the REDEFINE command, INFO prompts for redefined item definitions. The prompt sequence is the same as that used by the DEFINE command with the following exceptions:
An additional prompt, ITEM STARTING COLUMN, is the first prompt for each item.
The protection level for all redefined items defaults to the control level instead of level 4 as for defined items.
example
ENTER COMMAND >SEL CUSTOMER.PHONE.DATA
0 RECORD(S) SELECTED
ENTER COMMAND >ITEMS
DATAFILE NAME: CUSTOMER.PHONE.DATA
3 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC ALTERNATE NAME
1 CUSTOMER.NUMBER
6 CUST.NAME
41 CUSTOMER.PHONE
5
35
10
5
35
10
I
C
C
-
-
-
ENTER COMMAND >REDEFINE
ENTER DATAFILE DEFINITION
ITEM STARTING COLUMN>41
ITEM NAME >CUST.AC
ITEM WIDTH >3
ITEM OUTPUT WIDTH >3
ITEM TYPE > C
ITEM STARTING COLUMN>44,CUST.EXCH,3,C
ITEM STARTING COLUMN>47,CUST.LIST,4,C
ITEM STARTING COLUMN><RETURN>
414 Commands INFO Reference Manual
REDEFINE
ENTER COMMAND >ITEMS
DATAFILE NAME: CUSTOMER.PHONE.DATA
3 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC ALTERNATE NAME
1 CUSTOMER.NUMBER
6 CUST.NAME
5
35 35 C
41 CUSTOMER.PHONE
10 10 C
** REDEFINED ITEMS **
5 I -
-
-
41 CUST.AC
44 CUST.EXCH
47 CUST.LIST
3 3 C
3 3 C
4 4 C
-
-
-
ENTER COMMAND >LIST
$RECNO CUSTOMER.NUMBER CUST.NAME CUSTOMER.PHONE
1 23114 JACK SPRAT BEAN COMPANY 3128884455
2 32876 MOTHER GOOSE BOOKS INC. 4013338734
3 87334 SNOW WHITE EMPLOYMENT INC. 3547763412
ENTER COMMAND >DISPLAY CUST.NAME,'(',CUST.AC,')',1X,CUST.EXCH,'-'
,CUST.LIST
JACK SPRAT BEAN COMPANY (312) 888-4455
MOTHER GOOSE BOOKS INC. (401) 333-8734
SNOW WHITE EMPLOYMENT INC. (354) 776-3412
INFO Reference Manual Commands 415
REFORMAT
REFO
RMAT
reformats all internal variables back to their default formats.
discussion
Each internal variable's format is reset to a width of eight, output width of sixteen, data type of floating point (F), and number of decimal places two.
INFO Reference Manual Commands 417
RELATE
REL
ATE DF_name relate_# [BY] DF_item syntax cont’d
[WITH] [
A
PPEND]
[
F
ILL [
O
RDERED]]
[
I
NIT]
[
L
INK]
[
O
RDERED
[
S
EQUENTIAL]
[
T
ABLE]
[
N
UMERIC] [
R
O]
establishes a relationship between the specified data file and the selected data file, or a previously related data file, through a common data file item definition.
arguments
DF_name the name of the INFO data file to be related to the selected file.
[relate_#] if the number (from 1 to 9) of the related file, is not specified, its value defaults to 1.
[BY] is used only for documentation or clarification.
DF_item the name of the INFO data file item that exists in both the selected and the related file.
[WITH] is used only for documentation or clarification.
[APPEND | FILL [ORDERED] | INIT | LINK | ORDERED |
SEQUENTIAL | SUMMARY | TABLE] options that control how INFO processes the related records.
APPEND writes a new record to the end of the related data file for every selected record. In the new record, the value of the relate item is duplicated; all other fields are filled with the appropriate null value. The new records are generated when you issue an active command after the
RELATE command.
INFO Reference Manual Commands 419
RELATE
420
FILL writes a record to the related data file for each selected record that does not have an existing match on the relate item in the related data file. Each new record duplicates the value of the relate item in the selected data file; all other fields are filled with the appropriate null value. If a record with a match on the relate item already exists in the related data file, then INFO is left positioned on this record.
This is the only RELATE option available for adding records to an ISAM file.
N.B. Be careful if using the FILL options on a non-ISAM file: for each selected record, INFO will read each record on the related file until it either finds a match or reaches the end : this can be a very slow procedure on larger files.
FILL ORDERED functions exactly as the FILL option except that it indicates that the related data file is sorted in ascending sequence by the relate item. INFO performs a binary search to determine a no-match condition. Any records created in this relate session are added to the end of the related datafile and searched sequentially. The related datafile must then be sorted on the relate item for
FILL ORDERED to work in future sessions.
INIT purges all records from the related data file immediately and then writes one new record for every time the value of the relate item changes as the selected file is read. For example, if the selected data file has three contiguous records with the same relate item value, INFO writes only one record to the related data file. INFO does not write new records to the related data file until an active command references the selected data file.
LINK uses the value of the relate item to determine the record number of the desired record within the related data file. For example, a relate item value of 4 causes INFO to go to the fourth record in the related data file. Note that for this option, the relate item can be either an item in the selected or previously related data file or a system variable. It must be a B- or I-type item.
ORDERED indicates the related data file is sorted in ascending sequence on the relate item before you issued the RELATE command. Therefore, INFO can perform a
Commands INFO Reference Manual
RELATE
binary search through the related data file for a record that matches the relate item. If more than one record in the related data file matches a particular relate item value,
INFO matches the first record found.
SEQUENTIAL indicates that both the data file being related and the selected or other related data file are sorted in ascending order by the relate item. In processing the next active command, INFO searches the related data file sequentially for a matching record, stopping when it finds either a matching record or the first record with a higher value for the relate item.
SUMMARY functions exactly as the INIT option except that INFO does not purge existing records before writing new records to the related data file.
TABLE indicates that the related data file is an ordered table of values that contains the absolute minimum and maximum values for the relate item. During processing, when INFO does not find an exact match in the related data file for a selected record, it positions the related data file to the record with the next higher value for the relate item and uses that record as a match record.
[NUMERIC] indicates that the relate item is numeric, but not in identical formats. For example, the relate item may be defined as a B-type item (binary) in the related data file and a P-type item (packed) in the selected or previously related data file. In order for the FILL ORDERED,
ORDERED, SEQUENTIAL (UNIX only) and TABLE options to perform properly on B-, F-, or P-type items, you must include the NUMERIC option.
[RO] indicates read-only access to the data file is required. If you do not include the RO option, the access you have to the related data file depends on the value of the system item $AS described in Appendix D 'System items'.
The RO option cannot be used with the APPEND, FILL,
FILL ORDERED, INIT and SUMMARY options because those options cause records to be written to the related data file during processing.
INFO Reference Manual Commands 421
RELATE notes discussion
n
References to items in related data files should be prefixed with $#, where # is the relate number. For example, $3CUST identifies the item CUST in the third related data file.
n
The relate number defaults to 1. Items in a data file related this way still must be referred to as $1item.
n
The combined total record length of the selected and all related data files must not exceed 4,096 bytes.
n
When using the INIT and SUMMARY options, if the selected data file is not sorted on the relate item, INFO can find the same value for the relate item in noncontiguous records in the selected data file and thus write more than one record per value of the relate item to the related data file.
n
You cannot relate a data file whose name contains only numeric characters. There must be at least one nonnumeric character in the file name.
n
The only valid options for use with Isam files are : unqualified RELATE
RELATE WITH FILL
RELATE WITH TABLE
Up to nine data files can be related to a selected data file concurrently, by a common item on either the selected file or on a previously related file; the latter is known as a treerelate. This provides the ability to create complex data structures during processing.
eg. SEL FILE-A
REL FILE-B 1 BY ITEM-X
REL FILE-C 2 BY $1ITEM-Z
422 Commands INFO Reference Manual
RELATE
In this example, ITEM-X is a field common to both FILE-A and FILE-B, while ITEM-Z is a field common to both FILE-
B and FILE-C.
The data file relationship established by the RELATE command exists until you issue either a SELECT, an unqualified RELATE, a RELATE that specifies only the relate_# or a NEWMAP command.
The various options for the RELATE command control how INFO performs the related data file search and whether new records are written to the related data file when the relate item value changes in the selected record.
INFO positions the related data files as needed for data access, rather than when selected data file records are read. INFO repositions only those related files in which items are referenced. In situations in which the selected records must be read, but data from some or all related data files is not needed, the unneeded data files are not accessed. INFO's deferred positioning avoids superfluous positioning and unnecessary updates.
As INFO performs an active command, INFO determines for each selected record whether (and if so, how) to process the related data file, based on the RELATE option specified in the command line, as follows:
If you include the APPEND, FILL, FILL ORDERED, INIT, or SUMMARY option, INFO searches the related data file sequentially (except in the case of FILL ORDERED), in order by its relate number (if there are multiple related data files), looking for a record whose relate item value matches the value of the same item in a previous record
If you include any other option or include no options with the RELATE command, INFO searches the related data file only when you issue a command that specifically references a field in the data file (such as MOVE or
CALCULATE)
The options APPEND, FILL, SUMMARY and INIT force
INFO to add new records to the related data file. This record addition occurs in two steps. In the first step, you set up the condition by executing the RELATE command with its option. In the second step, INFO adds the records.
INFO Reference Manual Commands 423
RELATE
This second step is deferred, that is, it does not occur until you enter an active command.
An active command is one that causes INFO to read the selected data file records. For example, a LIST or
DISPLAY command makes INFO read the records in order to extract the information to be displayed. Similarly, any command referring to a data item, or a command with the same system variable either side of the = sign will read the entire working set of records.
$NM system item
e.g. CALC $NUM1 = $NUM1
When issuing INFO commands, refer to items in related data files by prefixing the item name with $#. For example, $2CUST-NO refers to the item name CUST-NO in the second related data file.
The access to a related data file depends on the current value of the system item $AS (described in Appendix D
'System items') and whether or not you use the RELATE
RO option. If you do not use the RO option and the value of $AS is 1, INFO seeks read/write access to the related data file; if the value of $AS is 7, INFO seeks read-only access to the data file with the same processing limitations described for the RO option. If you include the RO option,
INFO gives you read-only access to the data file, regardless of the value of $AS.
The system item $NM controls whether or not INFO issues an error message when a no-match condition is found while processing a related data file (that is, when no related data file record exists that matches the value of the relate item in the selected record). $NM can be 0, 1, or 2, as follows:
If $NM is set to 0 (the default), INFO displays the following message whenever a no-match condition is detected:
NO MATCH IN RELATED DATAFILE relate_# FOR RECORD rec_# where relate_# identifies the related data file and rec_# is the number of the record in the selected or other related data file just processed.
424 Commands INFO Reference Manual
RELATE
If $NM is set to 1, INFO suppresses the display of these messages entirely.
If $NM is set to 2, INFO displays the following message in addition to the NO MATCH IN RELATED DATAFILE message for a no-match condition:
NO MATCH IN related_file_name FOR relate_item=value where related_file_name is the name of the related file in which the no-match condition is detected, relate_item identifies the item by which the file is related, and value is the value of that item for which no match is found.
A no-match does not stop an INFO command from processing, but those selected records without a related file match will contain a null value.
examples:
The following examples show the results when the various record-creating RELATE options are used.
FILE-A
KEY,4,C
FILE-B
KEY,4,C
DATA,10,C
NUM,4,I
DATA,10,C
NUM4,I
The contents of FILE-A are :
C
A
A
B
A
A
B
B
KEY
A
A
DATA
Record 1
Record 2
Record 3
Record 4
Record 5
Record 6
Record 7
Record 8
Record 9
Record 10
8
9
6
7
10
NUM
1
2
3
4
5
FILE-B is empty
INFO Reference Manual Commands 425
RELATE
SELECT FILE-A
RELATE FILE-B BY KEY WITH relate-option
$1DATA = DATA
$1NUM = $1NUM + NUM
SELECT FILE-B
LIST
The resultant contents of FILE-B would be :
relate-option
APPEND
A
A
B
A
B
B
C
KEY DATA
A Record 1
A
A
Record 2
Record 3
Record 4
Record 5
Record 6
Record 7
Record 8
Record 9 9
Record 10 10
7
8
NUM
1
2
3
4
5
6
INIT
A
B
A
KEY DATA
A Record 3
B
C
Record 5
Record 6
Record 8
Record 9
NUM
6
9
6
15
9
Record 10 10
SUMMARY
A
B
A
KEY DATA NUM
A Record 3 6
B
C
Record 5
Record 6
9
6
Record 8
Record 9
15
9
Record 10 10
FILL
KEY DATA NUM
A Record 10 31
B
C
Record 9
Record 6
18
6
Note that in the above example, the SUMMARY relate option would give identical results to the INIT option.
426 Commands INFO Reference Manual
RELATE
FILE-A
B
C
A
A
B
A
KEY
A
A
A
B
In the following examples, FILE-B contains 3 records before it is related :
FILE-B
DATA NUM
Record 1 1
Record 2 2
Record 3 3
Record 4 4
Record 5 5
Record 6 6
Record 7 7
Record 8 8
Record 9 9
Record 10 10
KEY DATA NUM
A XXX 1
C
D
ZZZ
QQQ
2
3
SELECT FILE-A
RELATE FILE-B BY KEY WITH relate-option
$1DATA = DATA
SELECT FILE-B
LIST
The resultant contents of FILE-B would be : relate-option
APPEND INIT SUMMARY FILL
KEY DATA NUM KEY DATANUM KEY DATA NUM KEY DATA NUM
A
A
B
B
A
C
D
A
C
A
A
B
A
XXX
ZZZ
QQQ
Record 1
Record 2
Record 3
Record 4
Record 5
Record 6
Record 7
Record 8
Record 9
Record 10 10
6
7
8
9
1 A
2 B
3 C
1 A
4
5
2 B
3 A
Record 3 6
Record 5 9
Record 6 6
Record 8 15
Record 9 9
Record 10 10
B
C
A
B
A
A
C
D
A
XXX
ZZZ
QQQ
Record 3
Record 5
Record 6
Record 8 15
Record 9 9
9
6
Record 10 10
1 A
2 C
3 D
6 B
Record 10 32
Record 6 8
QQQ
Record 9
3
18
INFO Reference Manual Commands 427
RELATE see also
FILES
FILL
FIRST
MODE SET EXACT
NEXT
XREL
$CHECK-NOMATCH
$FORCE-WRITE
$ISAM-AS-DAM
$NM
428 Commands INFO Reference Manual
REMARK
REM
ARK [text]
allows you to provide comments within an interactive session, program or input form.
note alternatives example
n
You can include any number of remarks within a program.
In an interactive session, you can use the REMARK command to make comments that appear in the INFO session log. See the COMOUTPUT command for information about creating a log file to record terminal prompts and responses during an INFO session.
Blank lines and lines beginning with /* or // can be used as alternatives to the REMARK statement.
Here is an example of the REMARK command used at the beginning of an INFO program named P.UPDATE.CUST
to describe what the program does when it is executed:
ENTER COMMAND >TYPE P.UPDATE.CUST
10000 PROG SECTION ONE
10001 REM *-----------------------------------------*
10002 REM * *
10003 REM * P.UPDATE.CUST: This program selects *
10004 REM * the master control datafile and *
10005 REM * relates to it the customer datafile. *
10006 REM * It updates 3 items in the master *
10007 REM * datafile with values from the *
10008 REM * related datafile if the corresponding *
10008 REM * item values are not equal. *
10009 REM * *
10010 REM *-----------------------------------------*
10011 REM
10012 SEL MASTER.DATA
99999 PROGRAM END
INFO Reference Manual Commands 429
REN
AME internal_name [identifier]]
changes the name of an entry in the INFO directory.
RENAME arguments
internal_ name is the first six characters of the internal file name of any INFO file. You may also give all nine characters.
identifier is the new name of the INFO entry.
notes example
n
When you enter an unqualified RENAME command, INFO prompts you for the INFO internal file name of the file you wish to rename and for a new file name.
n
You can enter the internal_name and INFO will prompt for the new name, or you can specify both the internal_name and the new file name on the RENAME command line.
n
All programs that reference the entry which has had its name changed will need to be recompiled.
Here is an example of the use of an unqualified RENAME command:
ENTER COMMAND >DIRECTORY
TYPE NAME INTERNAL NAME NO. RECS LENGTH EXTERNL
DF CUST.PHONE.DATA PKS003DAT 3 50
DF TRANS.MASTER PKS004DAT 3 72
DF CUSTOMER.DATA PKS005DAT 5 146
ENTER COMMAND >RENAME
ENTER INTERNAL NAME>PKS005
CUSTOMER.DATA
ENTER NEW DIRECTORY NAME >CUSTOMER.INFO
ENTER COMMAND >DIRECTORY
TYPE NAME INTERNAL NAME NO. RECS LENGTH EXTERNL
DF CUST.PHONE.DATA PKS003DAT 3 50
DF TRANS.MASTER PKS004DAT 3 72
DF CUSTOMER.INFO PKS005DAT 5 146
INFO Reference Manual Commands 431
REPLACE
REPL F
IRST item-1 [
I
N] item-2 [
B
Y item-3] [
T
O item-4]
A
LL
L
EADING
replaces occurrences of one substring with another or with null.
arguments
FIRST replace the first occurrence of item-1 in item-2.
ALL replace all occurrences of item-1 in item-2.
LEADING replace item-1 if it starts in the first character positions of item-2.
item-1 a system variable or literal string containing the substring to be replaced.
item-2 a datafile item or system variable to be modified..
item-3 a system variable or literal containing the replacement substring. Null if omitted. Maximum of 50 characters.
item-4 a datafile item or system variable to be modified.
If omitted, item-2 is modified. Maximum of 1000 characters.
notes discussion
n
Item-1 and Item-3 may be one or more characters (they do not need to be the same length). Result will be truncated or space filled at right if necessary.
n
Only character literals allowed.
In effect REPLACE is MOVE with replacement, and therefore mimics MOVE interactively and in odd/even program sections.
INFO Reference Manual Commands 433
REPORT
REP
ORT [RP_name [
L
ONG]]
REP
ORT RP_name [
Y
N
[
/W
]]
[lines-per-page [,spacing]
,G
]
Syntax cont’d
or
Syntax cont’d
or
Syntax cont’d
or
Syntax cont’d
[,
BREAK
[line-count] [
PAGE
]]
[,
EJECT
[brk-level [,...]
ALL
GRAND
]
]
[,
SUMM
ARY [brk-level] ]
Syntax cont’d
[,
SUPP
RESS [
B
REAK [brk-level]
ALL
GRAND
]
[
B
REAK [brk-level]] [...]
initiates a report definition dialog or runs an existing report. An unqualified REPORT command initiates a report definition dialog, but does not save the report in your INFO directory at the end of the definition session. You can, however, execute the report immediately after definition.
arguments
[LONG] prompts you during the report definition dialog for the number of title lines, column header lines and maximum report width for the report.
[Y] sends the report output to your spool file. This is the same as responding Y to the OUTPUT TO PRINTER (Y
OR N)?> prompt at the end of the report definition dialog.
[N / W] displays the report output at your terminal.
INFO Reference Manual Commands 435
REPORT
N this is the same as responding N to the OUTPUT TO
PRINTER (Y OR N)?> prompt at the end of the report definition dialog.
/W causes the display of your report to pause the first time your terminal screen is full. This is used only with the
N option. When you use the /W option, INFO gives you a
MORE? prompt at the bottom of your screen. There are three possible responses:
<RETURN> to display the next screen of the report. The display stops when the screen is full and INFO prompts you with MORE? again.
Y to display the rest of the report with no pauses.
N to find the report with no further display and return you to the ENTER COMMAND> level.
[lines_per_page] specifies the number of lines to be displayed or printed per page. The default value is 23 if you display the report at your terminal and 57 if you print the report. Take into consideration that INFO uses four of these lines: one for the date/page number line, one for a blank line before the title, one for a header line and one for the first report line.
[spacing] indicates the line spacing in the report. You can specify spacing as 1 or 2, where 1 requests single-spacing
(the default) and 2 requests double-spacing.
[G] suppresses the listing of grand totals when totaling is in effect (see the T option). You can also use the
SUPPRESS GRAND command line argument when executing the REPORT.
[BREAK line_count] forces break processing at the lowest break level defined for the report after printing the number of detail lines specified by line_count.
[BREAK PAGE] forces break processing at the lowest break level defined for the report at each page break in the report.
436 Commands INFO Reference Manual
REPORT
[BREAK line_count PAGE] forces break processing at the lowest break level after printing the number of lines specified by line_count and at the next higher break level at each page break in the report.
[EJECT brk_level] performs a page eject both before and after printing summation lines such as averages, totals, and counts at the specified break level(s).
[EJECT ALL] performs a page eject at all breaks in the report.
[EJECT GRAND] performs a page eject before printing grand summation lines.
[SUMMARY brk_level] prints a summary report suppressing all detail lines and printing only those summation lines that are generated at the specified break level. If you do not include the break_level specification,
INFO summarizes the report at the highest defined break level. If you specify a break level that is not the highest level defined for the report, INFO suppresses any higher break levels.
For example, if you specify SUMMARY 3 for a report defined with 5 break levels, INFO suppresses processing of break levels 4 and 5. If the report contains a report item defined with the SUMMARY option, INFO processes the
SUMMARY request associated with the highest break level for the report.
[SUPPRESS [BREAK] brk_level] suppresses the printing of summations such as averages, totals and counts at the specified break level(s).
[SUPPRESS ALL] suppresses the printing of summation lines at all breaks in the report.
[SUPPRESS GRAND] suppresses the printing of grand summation lines.
If you specify both the SUPPRESS and EJECT options for the same break level, INFO performs a page eject each time it processes the break, but does not print any summation lines.
INFO Reference Manual Commands 437
REPORT notes
n
An unqualified REPORT command initiates a report definition dialog, but does not save the report in your INFO directory at the end of the definition session. You can, however, execute the report immediately after definition.
n
Before beginning a REPORT definition or executing an existing report, be sure to take the following steps:
1
)
) F o r r m a t t t t h e s y s t t e m v a r r i i a b l l e s $ C H R # ,
,
$ D A T # a n d $ N U M
# t t o c o r r r r e s p o n d t t o t h e i r r u s e i i n t t h e r r e p o r r t t .
S e e t t h e F O R M A T c o m m a n d d i i s c u s s i i o n f f o r r i i n s t t r r u c t t i i o n s t t o d o t t h i i s .
.
2
)
) S e l l e c t t a n d r r e l l a t t e a l l l l d a t t a f f i i l l e s i i n t t h e o r r d e r r n e e d e d t t o e x e c u t t e t t h e r r e p o r r t t .
n
You can avoid prompts completely when executing an existing report by specifying in the command line: Y or N for the OUTPUT TO PRINTER> prompts, the number of report lines displayed (or printed) per page and at least one comma.
ENTER COMMAND >REPORT MY-REPT N/W 22 ,
discussion
If you produce a report as part of a program and do not expand the command line with responses to the OUTPUT
TO PRINTER (Y OR N) >, LINES PER PAGE> and
REPORT OPTIONS> prompts, the report is sent to your screen, 23 lines per page, with no report options.
A report contains formatted information from selected and related records and can specify totals, averages, control breaks for subtotals, calculations and text fields. It can include column headers, page numbering and titles as well as the detailed information. When you define or execute a report, you can route the report to your spool file for printing or to your terminal for display.
438 Commands INFO Reference Manual
Defining a new report
REPORT
When you specify REPORT with a new report name, or without a name if the report is not to be saved, INFO initiates a dialog that prompts you for a description of the report's page layout. Specifically, this description includes information about what data appears on the report page, where that data appears, and what, if any, page titles, column headers and special options INFO provides for the report.
To initiate a report definition dialog, enter the command
REPORT with the name of the new report. If you include the LONG option, INFO first issues a series of prompts for the number of title lines, number of header lines and maximum report width, allowing you to go beyond the default values for these specifications, and then prompts you for individual report items. If you do not include the
LONG option, INFO immediately prompts you for individual report items and uses the default values for the title lines, header lines and report width specifications.
The prompts for the LONG option are:
NUMBER OF TITLE LINES. In response to this prompt, enter the number of title lines (0—5) you want in the report. Enter <RETURN> to direct INFO to use the default value of 1.
NUMBER OF HEADER LINES. Enter the number of header lines for the report (0—5). Enter <RETURN> to direct INFO to use the default value of 2.
MAXIMUM REPORT WIDTH. Enter a number for the report width (16—200). Note that any specification greater than 132 is valid only if your printer can accommodate that many print positions and if $PRINTER-SIZE is set accordingly. See Appendix D, System items for information about the system item $PRINTER-SIZE.
Respond with <RETURN> to use the default value of 132.
For each report item, INFO prompts as follows: column_number ENTER COLUMN CONTENT> where column_number identifies the next available column position. The first column starts at 2.
INFO Reference Manual Commands 439
REPORT
INFO determines column position by adding the widths of each column defined. For example, if your first report item is 10 characters long, the next available column position is 12 (2 + 10 = 12). INFO determines the report item length for a data file item by adding 1 to the defined output width for that item. The report item length of a string is the actual length of the string.
In response to the ENTER COLUMN CONTENT> prompt, enter one of the following:
Data file item name.
System item name.
String (limited by the 200-character maximum command length).
Arithmetic expression.
#X, where # is the number (1—200) of spaces to insert before the next report item. INFO includes this number in its column position calculations.
#T, where # is the number (1—200) of the column at which to position the next report item. INFO includes this number in its column position calculations.
=, to end the current report line and start a new line in column 2. To generate multiple blank lines, respond to successive ENTER COLUMN CONTENT> prompts with =, one for each blank line.
If you enter a data file item name, a string, or an arithmetic expression for a report item, you can specify options to generate special report features, such as breaks, totals, averages, summary reporting and print suppression. You can include these option specifications at the end of the content line or you can wait for INFO to prompt you for the options. If you include options with the content, INFO accepts the options and gives you the next report prompt. If you do not include options with the content, INFO prompts you with:
ENTER REPORT OPTIONS>
440 Commands INFO Reference Manual
REPORT
See Table REPORT-1 for a description of the report options you can specify here or after the content specification. Note that the A, B, N, P, R, and T options are mutually exclusive; you can specify only one for an individual report item. Also, you cannot specify the TEXT option for a report item defined with an A, T, or N option.
In any one report, you can determine the maximum number of report items that can have an A, N, R, or T option by using the following calculation:
maximum_number_of_items =
64/(number_of_break_levels + 1)
For example, if you specify two B-type breaks and one Ptype break in a report, the maximum number of items that can have an A, N, R, or T option is 64/(3 + 1), or 16.
To suppress the ENTER REPORT OPTIONS> prompt altogether, end the column content specification with a comma.
If you are defining the first line of the report, that is, you have not used the equal sign (=) to request a new report line, INFO follows the ENTER REPORT OPTIONS> prompt with the following request for column heading information:
ENTER COLUMN HEADINGS>
Respond with the literal text you wish to appear over the current column. The text is right justified unless the report item is a string or C-type data file item, in which case,
INFO truncates the text, if necessary, to fit the column width. Note that the total number of characters specified for all column headings must not exceed the maximum command width for your operating system. Respond with a <RETURN> to the first ENTER COLUMN HEADINGS> prompt to suppress headings for this column.
INFO Reference Manual Commands 441
REPORT
To use the content specification itself as a column heading, respond to the heading prompt with a plus sign
(+). To specify a fill-character for a column heading, respond to the prompt with an equal sign (=) followed immediately by the character to be used for the length of the field. For example, if you enter =$, a line of dollar signs prints for the width of the column.
If you include the LONG option with the REPORT command, INFO prompts you for as many heading lines as you specify in the initial report prompts. If you do not include the LONG option, INFO prompts you for two heading lines. You can specify multiple column headings in the same response by separating each heading with a comma. To suppress additional column heading prompts, end the current column heading definition with a comma.
Enter <RETURN> at any succeeding prompt to end the column heading definition for the current report item.
To end the definition dialog, respond with a <RETURN> after any ENTER COLUMN CONTENT> prompt. If you respond with a <RETURN> after the first ENTER
COLUMN CONTENT> prompt, INFO returns you to command-level processing and does not save the report.
When you end the column definition dialog, INFO prompts you with:
ENTER REPORT TITLE>
In response, enter the title of the report, using any combination of DISPLAY specifications : data file item name, system item name, system variable name, string,
#X (space count) and #T (tab column). The use of these display specifications allows you to generate titles comprising items, variables, and strings with spacing and tabbing capability.
INFO centers each title line over the longest report line defined. You can override the automatic centering by beginning the title definition with a tabbing or spacing specification that does not begin in column 2.
442 Commands INFO Reference Manual
Single-detail sub-totals
Page break
REPORT
For example, 40T,'SALES REPORT' forces the title to begin in column 40.
If you include the LONG option with the REPORT command, INFO prompts you for as many title lines as you specify in the initial dialog. If you do not include the
LONG option, INFO prompts you for one title line.
After you define the title, INFO prompts you with:
DO YOU WISH TO EXECUTE THIS FORM (Y OR N)>
Enter Y (yes) or <RETURN> to begin executing the report.
Respond with N (no) to return to command-level processing.
REPORT by default generates a sub-total break even if there is only one value at that break level. To suppress the sub-total in these cases, set the variable $SINGLE-
DETAIL = 1
NB. To emulate pre - 9.6 processing, where the values of
$SINGLE-DETAIL were reversed, set the variable
$SWITCH-DEFAULT = 1
Where the last detail line of a page or screen would naturally be the last line before a control break, the line is not printed but is carried forward to the next page.
INFO Reference Manual Commands 443
REPORT
Table REPORT-1 Report options
Option
B[#]
(Break)
P[#]
(Page Break)
A
(Average)
T
(Total)
Description
Applies to item content only. Produces a line break each time the item value changes. At each break,
INFO produces a summation line of averages, totals, counts, and text for all items reported using the A, N, R, T and TEXT options. INFO assigns break levels, that is, assigns the order in which breaks are processed, in the order the breaks are defined. You can assign break priorities by including a value for
#
to assign a specific break level to the item. You can specify a maximum of 5 breaks per report. The 5 breaks can be all B-type breaks, all P-type breaks, or a combination of B- and P-type breaks. You cannot use both B and P on one item.
Applies to item content only. Generates a page break each time the item value changes. At each page break,
INFO produces a summation line of averages, totals, counts, and text for items reported using the A, N, R, T and TEXT options. Specify
#
as the optional break level for the item, as discussed for the B option. You can specify a maximum of five breaks per report.
The five breaks can be all B-type breaks, all P-type breaks, or a combination of B- and P-type breaks.
You cannot use both B and P on one item.
Applies to numeric items only. Averages the item at each B- or P-type break and prints the sub average in the item column on the break summation line before processing the break. The final average is printed at the end of the report unless otherwise suppressed.
Applies to numeric items only. Totals the item at each
B- or P-type break and prints the subtotal item column on in the break summation line before processing the break. The grand total is displayed at the end of the report unless otherwise suppressed.
444 Commands INFO Reference Manual
REPORT
Table REPORT-1 Report options (cont’d)
Option Description
R[#]
(Running Total)
[,start_value]
N
(Number)
C
(Clear)
S
(Suppress) width,decimals
Applies to numeric items only. Maintains a running total for the report item. The total is reset after every # B- or
P-type breaks.
For example, if there are three breaks defined for the report and you specify R2, the running total is printed on the break summation line and reset each time the second break item value changes. Enter start_value as a value, item, or arithmetic expression whose value is used to initialize the running total each time it is reset. If
#
is not specified, the running total is never reset.
Maintains a count of the items processed and prints the total number, right-justified in the item column on the break summation line, at each B- or P-type break.
Displays the column contents only at a B- or P- type break or at the beginning of a page. Should not be used with the totaling options A, N, R, or T.
Suppresses column display. Use this option for items that you do not want displayed with the detailed report, but that you want to use as break items This option causes INFO.
to bypass the ENTER COLUMN HEADINGS> prompt for the corresponding item.
Overrides the default output width and decimal positions for an item. The defaults for literal and arithmetic expression content are 12 positions with 2 decimal positions. You cannot override decimal positions for 0and T-type items. Specify this option with the following syntax: width,[decimals] width and decimals specify the output width and number of positions for the report item. For date items, you must include a display width, followed by a D specification.
INFO Reference Manual Commands 445
REPORT
Table REPORT-1
Option
TEXT
Report options (cont’d)
Description
Otherwise INFO displays the result as the number of days since 1/1/1801. For example, specify
$TODAY,8,D
to display today's date in 8-position date format (the century is omitted).
Prints specified text in the column on the summation line for the associated B- or P-type break. Specify this option with the following syntax:
,TEXT <brk_level_1[, ...] | ALL | GRAND> <content> [; TEXT ...] brk_level
ALL
GRAND displays the text at the specified break level(s).
displays the text at all report breaks.
displays the text for grand summations only.
Content is any combination of items and strings. Use the
DISPLAY/PRINT command syntax to specify content.
None of the asterisk options operate as part of a TEXT option.
If you do not include a break_level specification, INFO defaults to the break level of the item being defined. If that item does not have a break level assigned to it and you do not include a break level with the TEXT option, no text appears.
You can include multiple TEXT specifications for the same column by separating each with a semicolon (;). However, you cannot specify the same break level to multiple TEXT options for the same column. If you specify a content that is wider than the column width, it can be overlaid by the contents of a subsequent column's summation line when
INFO produces the report.
446 Commands INFO Reference Manual
Executing an existing report
REPORT
You can execute a report immediately following its definition or at any other time by entering the REPORT command with the name of an existing report and any appropriate run-time options.
If you do not include the Y or N options when you issue the
REPORT command, INFO prompts you with:
OUTPUT TO PRINTER (Y OR N?>
Respond to this prompt as follows:
<RETURN> to display the entire report output at your terminal without pause.
Q (quit) to abort report execution and return to the
ENTER COMMAND> level.
Y (yes) to write the report output to your spool file. You can include the G option (i.e., Y,G) if you want to suppress the listing of grand totals when totalling is in effect (see the
T option).
N (no) to display the report output at your terminal. You can include the G option (i.e., N,G) if you want to suppress the listing of grand totals when totaling is in effect (see the
T option). You can also include the /W option (i.e., N/W or
N/W,G) to cause the display of the report to pause the first time your terminal screen is full. When the screen is full,
INFO gives you a MORE? prompt at the bottom of your screen.
If you respond Y, N, or <RETURN>, INFO prompts you with:
LINES PER PAGE?>
Respond using the following format: lines_per_page[,spacing]
INFO Reference Manual Commands 447
REPORT example
Enter the number of lines INFO is to include before issuing a page break for printed reports or to display at your terminal before prompting MORE?.
Spacing is an integer 1 or 2 referring to single- or doublespacing. The default value is 1 for single-spacing.
INFO displays the REPORT OPTIONS> prompt. You can enter any combination of the execution options BREAK,
EJECT, SUMMARY, and SUPPRESS. See the syntax description for information about these options.
If displaying the report on your screen, respond to the
MORE? prompt by entering Y (yes) to display the rest of the report without pause; N (no) to end the display and return you to command level; or <RETURN> to request
INFO to display the next screen of the report and repeat the MORE? prompt.
The following example demonstrates the defining of a report that uses the averaging and totaling features. You must select the data file that contains the data file items which are referenced in the report before you define the report.
ENTER COMMAND >SELECT D.SHIPPING.LIST
10 RECORD(S) SELECTED
ENTER COMMAND >ITEMS
DATAFILE NAME: D.SHIPPING.LIST 12/ 1/96
5 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC ALTERNATE NAME
1 PART-NO 10 10 C -
11 DATE 8 10 D -
19 SUPPLIER 10 10 C -
29 COST 8 8 N 2
37 QTY 9 9 I -
448 Commands INFO Reference Manual
REPORT
ENTER COMMAND >LIST
$RECNO PART-NO DATE SUPPLIER COST QTY
1 A101 5/ 3/1996 ACME 4.25 50
2 A101 5/ 4/1996 ACME 4.25 25
3 A101 5/ 1/1996 ACME 4.50 100
4 A101 5/ 5/1996 ACME 4.50 10
5 A101 5/ 9/1996 ACME 4.75 10
6 A101 5/ 4/1996 JONES & CO 4.75 100
7 A101 5/ 6/1996 JONES & CO 450.00 100
8 A101 5/18/1996 SMITH INC 3.99 50
9 B0200 5/24/1996 ACE TOOL 1028.72 15
10 B0200 5/10/1996 ACME 1094.82 73
ENTER COMMAND >REPORT R.SHIP.LIST
2 ENTER COLUMN CONTENTS>PART-NO
ENTER REPORT OPTIONS>B
ENTER COLUMN HEADINGS>PART,NUMBER
12 ENTER COLUMN CONTENT>' RECEIVED'
ENTER REPORT OPTIONS>TEXT ALL 'SHPS RCVD'; TEXT GRAND ' TOT SHPS'
ENTER COLUMN HEADINGS><RETURN>
.
.
.
67 ENTER COLUMN CONTENT>COST
ENTER REPORT OPTIONS>A,8,2
ENTER COLUMN HEADINGS>AVERAGE,COST
76 ENTER COLUMN CONTENT><RETURN>
ENTER REPORT TITLE>'AVERAGE PRICE REPORT'
DO YOU WISH TO EXECUTE THIS FORM ( Y OR N ) >Y
OUTPUT TO PRINTER (Y OR N)?>N
LINES PER PAGE?>24
ENTER REPORT OPTIONS><RETURN>
INFO Reference Manual Commands 449
REPORT
AVERAGE PRICE REPORT
PART DATE SUPPLIER PURCHASE VALUE AVERAGE
NUMBER RECEIVED NAME PRICE ON HAND COST
A101 REC’D 5/ 3/1996 ACME 4.25 212.50 4.25
A101 REC’D 5/ 4/1996 ACME 4.25 106.25 4.25
------------ AAAAAAAA
SHPS RCVD 2 4.25 318.75 4.25
.
.
.
B0200 REC’D 5/24/1996 ACE TOOL 1028.72 15,430.80 1028.72
B0200 REC’D 5/10/1996 ACME 1094.82 79,921.86 1094.82
------------ AAAAAAAA
SHPS RCVD 2 95,352.66 1061.77
============ AAAAAAAA
TOT SHPS 10 141,888.41 260.45
ENTER COMMAND >TYPE R.SHIP.LIST
FORM NAME: R.SHIP.LIST 12/ 1/1996
PART-NO,B,
PART,NUMBER,
' RECEIVED',TEXT ALL 'SHPS RCVD'; TEXT GRAND ' TOT SHPS',
3X,DATE,N,
DATE,RECEIVED,
SUPPLIER,B,
SUPPLIER,NAME,
COST,B,
PURCHASE,PRICE,
COST * QTY,T,
VALUE,ON HAND,
COST,A,8,2,
AVERAGE,COST,
'AVERAGE PRICE REPORT
see also
$REPDAT
450 Commands INFO Reference Manual
RESELECT
RES
ELECT FOR logical_expression [...]
BY
RES
ELECT
BY
RES
ELECT
BY
key_logical_expression [...] word_expression [...]
narrows the current working set of records.
arguments
An unqualified RESELECT command reduces the working set to zero records.
FOR directs INFO to search the current working set. FOR is used only for documentation or ease of understanding.
BY on non-ISAM files, directs INFO to process the
RESELECT command by performing a binary search on the current working set. The file must be sorted in ascending order on the item specified in the logical expression.
BY on ISAM files, directs INFO to produce a SET of records based on the logical expression, the first of which must refer to a key item and cannot be an inequality.
logical_expression the statement that INFO evaluates before narrowing the current working set. See Building
Expressions in the introduction
word_expression (INFO-Text only) See Building
Expressions in the introduction.
notes
n
Up to 8 logical or word expressions may be combined using Boolean operators.
n
INFO is unable to process a RESELECT BY command on an Isam file where a logical-expression-2 contains the keyfield used in a logical-expression-1, and logicalexpression-2 contains an inequality operator, for example:-
ENTER COMMAND> RESEL BY KEY1 GT 100 AND KEY1 NE 999
ERROR ON ISAM KEY CONDITIONS(S) SPECIFICATION -
UNABLE TO PROCESS THIS RANGE
INFO Reference Manual Commands 451
RESELECT discussion
n
RESELECT BY command on an Isam file cancels the effect of a LIMIT command.
The RESELECT command narrows the working set of records to match the criteria found in the specified logical or word expression. Records that meet the criteria of the expression remain selected. INFO removes other records from the working set. Unselected records are not changed and not processed, and remain unselected until an
ASELECT, NSELECT or SELECT command is performed on that datafile. If you do not specify any criteria, INFO removes all records from your current working set.
The reselect criteria take on the form of one or more logical or word expressions that are combined using logical connectors (AND, OR and XOR). The form of logical and word expressions is described in the Building
Expressions chapter in the introduction.
When the selected records are sorted in ascending sequence (non-ISAM files only) you can use the BY option to direct INFO to perform a binary search of the selected records, using the sort item as the one and only logical expression. This results in more efficient processing.
RESELECT BY command for ISAM files:
INFO searches the entire ISAM file, not just the previously selected records and creates a SET of records.
Subsequent RESELECT BY commands will create further
SETs.
The syntax for multiple logical expressions is the same as that used by the LIMIT command.
The RESELECT BY command will ignore any set of records established by a previous LIMIT command. (See the LIMIT command discussion for information about search criteria for an ISAM file and the SET command discussion for more information about using RESELECT with ISAM files).
452 Commands INFO Reference Manual
RESELECT examples
ENTER COMMAND >SEL NON-ISAM-FILE
300 RECORD (S) SELECTED
ENTER COMMAND >RESELECT FOR NAME = ‘SMITH’
17 RECORD (S) SELECTED
ENTER COMMAND >RES FOR DEPT = ‘SALES’
3 RECORD (S) SELECTED
the following gives the same result
ENTER COMMAND >ASEL
300 RECORD (S) SELECTED
ENTER COMMAND >RES FOR NAME =‘SMITH’ AND DEPT = SALES’
3 RECORD (S) SELECTED
ENTER COMMAND >SEL NON-ISAM-FILE
300 RECORD (S) SELECTED
this will give correct results only if the file is in ascending order on NAME
ENTER COMMAND >RES BY NAME = ‘JONES’
2 RECORD (S) SELECTED
ENTER COMMAND >SEL ISAM-FILE DYNAMIC
0 RECORD (S) SELECTED
ENTER COMMAND >RES BY KEY GT 1000 AND VALUE = 99
SET 2
5 RECORD (S) SELECTED
ENTER COMMAND >RES BY KEY GT 100 AND KEY LT 2000
SET 3
45 RECORD (S) SELECTED
INFO Reference Manual Commands 453
RESELECT INFO-Text
Using RESELECT with Word Expressions
You can use word expressions in a RESELECT command only when the selected datafile is extended.
The RESELECT BY word_expression syntax is available only with ISAM files. In this case, a new set is created based on the concordance, and not the current working set. This is very similar to RESEL BY key_logical_expression in respect to ignoring the current working set. RESEL word_expression will operate on the current working set and reduce it to the records matching or containing the word_expression. The word_expression can include values in C-type items and in
ASCII documents referenced in A-type items. The data file must have been concorded first using CONCORD.
When the RESELECT command specifies one or more word expressions, the expressions are also considered context
expressions for subsequent commands (CONTEXT and
DISPLAY, LIST and PRINT using the CONTEXT option) that depend on a previous search term. When you use one of these commands, the individual words found that match the word expression are highlighted when displayed at your terminal.
special
The RESELECT command requires that the first operand
considerations of a logical expression must be a datafile item. If you include the BY option, the operator must be EQ, GE, LE, LT or BW.
You can include only one logical expression in a RESELECT
BY command, except when the selected datafile is associated with a ISAM file (see the chapter ISAM considerations), and your datafile must be sorted in ascending order on the item specified in the logical expression.
You can include up to ten simple logical expressions in a complex logical expression with RESELECT.
You can include as many simple word expressions as fit the
200 byte command buffer when using complex word expressions with a RESELECT command.
If you want to search the text files in the selected extended datafile for occurrences of the words BY, FOR, or other
INFO-Text reserved words, surround the specified word with single quotes in the RESELECT word expression.
454 Commands INFO Reference Manual
INFO-Text RESELECT
In the following example, the RESELECT command searches the working set sequentially and removes each record from the set that does not have either a value for the item ED.YRS that is less than or equal to 4 or a value for the item PAY-RATE that is greater than 17:
ENTER COMMAND >SELECT EMPLOYEE.MASTER
250 RECORD (S) SELECTED
ENTER COMMAND >RES FOR ED.YRS LE 4 OR PAY RATE-RATE GT 17
75 RECORDS(S)
In the following example, RESELECT is used with a complex word expression to find records containing both
RESEARCH and a form of ANALYSIS in their concorded items. The variations of analysis are provided by the wildcard character ! at the end of ANALY!.
There are more instances of the terms than there are reselected records. This is because terms can be duplicated in a record, such as two occurrences of research in a given record.
ENTER COMMAND >SELECT EMPLOYEE.MASTER
250 RECORD(S) SELECTED
ENTER COMMAND >RESELECT RESEARCH AND ANALY!
RES RESEARCH AND ( ANALYSE ANALYSES ANALYSIS ANALYZED )
27 RECORD(S) SELECTED
OCCURRENCES TERM
2 ANALYSE
17 ANALYSES
13 ANALYSIS
19 ANALYZED
39 RESEARCH
Word
Expressions
Word expressions specify character strings that are searched for in the concordable items of the selected
(INFO-Text only)
extended datafile. Word expressions represent string literals, words, or phrases that INFO attempts to locate in the specified concordable items when you reselect extended datafile records, or list or print extended datafile records.
INFO Reference Manual Commands 455
RESELECT INFO-Text
Word expressions must conform to the following syntax: word string
[W [.]#-of-words word [@DF-item-1[,DF-item-2[...]]]]
[words-before,words-after string
*synonym-list [SENTENCE synonym-member* [PARAGRAPH match-word
*synonym-list synonym-member* match-word
word can include any characters except blanks, the current DELIMITER character, punctuation characters, and the special characters \ (backslash) and % (percent sign).
string represents any string literal enclosed in single quotes.
synonym-list represents the name of a synonym list.
synonym-member represents the name of a member of a synonym list.
match-word represents a combination of characters valid for a word and including the special characters
\(backslash) or % (percent sign). The backslash, also called the truncation character, indicates any prefix, suffix, or infix string in a word, as illustrated in the following
examples
ALPHA\
\ALPHA
\ALPHA\
Matches all words that begin with the string 'ALPHA'.
Matches all words that end with the string
'ALPHA'.
Matches all words that contain the string 'ALPHA'.
ALP\\A Matches all words that begin with the string 'ALP' and end with the string 'A'.
The percent sign represents a character position in a word which can take any value, as illustrated below:
%%A
A%%%%
Matches any 3-character word that ends with the character 'A'.
Matches any 5-character word that begins with the character 'A'.
456 Commands INFO Reference Manual
INFO-Text RESELECT
You can combine the backslash and percent sign in the same match word.
A list of alternate prefix, suffix, or infix strings enclosed in square brackets ([ and ]) can also represent the literal string or character portion of a match word. For example
[A,B,D]!
Matches any word that begins with the characters 'A', 'B', or 'D'.
[A,B]%%%% Matches any 5-character word that begins with the characters 'A' or 'B'.
W means "within" and is required for word expressions that have a textual context for the specified word term.
#-of-words directs INFO to search for a word that matches the word term preceding WITHIN and appears within the specified number of words of the word-term that follows.
For example, 'APPLES W 2 PEARS' requests INFO to find occurrences of the word 'APPLES' that appear within 2 words of the word 'PEARS'. When #-of-words immediately follows a period, INFO searches for occurrences of the word that match the preceding word term and that appear exactly within the specified number of words
For example, 'APPLES W .2 PEARS' tells INFO to find occurrences of the word 'APPLES' that occur exactly 2 words away from the word 'PEARS'.
words-before,words-after directs INFO to search for a word that matches the preceding word term and appears either the specified number of words before or the specified number of words after the word term that follows. For example, 'APPLES W 2,3 PEARS' tells INFO to find occurrences of the word 'APPLES' that appear within 2 words before or within 3 words after the word 'PEARS'.
SENTENCE directs INFO to search for a word that matches the preceding word term and that appears in the same sentence as the word term that follows. For example, 'APPLES W S PEARS' requests INFO to find occurrences of the word 'APPLES' that appear in the same sentence as the word 'PEARS'.
INFO Reference Manual Commands 457
RESELECT connectors in word expressions see also
INFO-Text
PARAGRAPH directs INFO to search for occurrences of a word that match the preceding word term and that appear within the same paragraph as the word term that follows.
For example, 'APPLES W P PEARS' tells INFO to find occurrences of the word 'APPLES' that appear in the same paragraph as the word 'PEARS'.
@ directs INFO to limit its search to only the item or items specified. You can specify a list of any subset of the A-, or concordable C-type items in the selected extended datafile, limited only by the 200-character length of the
INFO command buffer. If you do not include the @ option, INFO searches all concordable items in the selected extended data file for occurrences of text that match the specified word term.
You can form compound word expressions by using the INFO logical connector keywords AND, OR, and
XOR (described above in the Logical Expressions section). You can use these words in word expressions only if you specify them as surrounded by single quotes and if they are not found in the applicable extended datafile's stopword file.
ASELECT
CCHR
DSEL
LIMIT
NSELECT
POSTINGS
SET
XRES
Introduction, Building Expressions
458 Commands INFO Reference Manual
RGET
RGET
relation-number file_path [
R
O]
GETs an operating system file temporarily into a related data file.
arguments
relation_number related file number 1 - 9
file_path the name of the operating system file to be gotten. Can include external variable names enclosed in
‘%’ characters.
RO opens copy file in read only mode
The COPY parameter is not permitted on RGET.
restriction error message
ILLEGAL RELATIONSHIP NUMBER
INFO Reference Manual Commands 459
RUN
RUN
PG_name [
LI
ST] [
LIN
K]
[
PR
INT]
executes the named INFO program.
arguments notes
PG_name the INFO program.
LIST displays each program statement as it is processed by the RUN command.
PRINT sends the program listing to the spool file. If INFO must compile the program, all messages related to the compile are also directed to the spool file. Messages related to a specific statement precede that statement directly; other messages fall at the beginning and ending of the compile display or listing. Refer to the COMPILE command for more information about messages displayed by the compiler.
LINK is valid only when you issue the RUN command in an odd-numbered program section. It instructs INFO to run the named program and then return control to the statement that follows the RUN...LINK command. You can nest up to 50 programs using RUN...LINK statements.
That is, a program can issue a RUN...LINK to another program that issues a RUN...LINK, up to 50 times. If a called program has not been compiled, INFO issues an error message and terminates processing.
$LISTON When a program is run LIST/PRINT, the list/print option is not switched off when another RUN or
RUN LINK or IPF statement is encountered, but only when dropping out to ENTER COMMAND level. It has to be explicitly turned off by setting the systems item $LISTON
= 0.
n
Without the LINK option, INFO automatically compiles a called program if it has not been compiled.
INFO Reference Manual Commands 461
RUN discussion examples
n
If an END statement, or a RUN command without the
LINK option, is encountered in a program called by the
RUN...LINK command, INFO cancels the LINK request to return control to the calling program and continues to process as though the LINK was never issued.
If you have never compiled or run the program, or you have changed or decoded it since its last compilation or execution, INFO compiles the program before running it.
(See the COMPILE command for information about the compilation process.)
When a RUN statement is encountered in a program during execution, INFO terminates processing of the current program and begins processing the program named on the RUN statement. If the called program is not compiled, INFO compiles it before execution, unless the called program is run with the LINK option, in which case
INFO will issue an error message and return to ENTER
COMMAND>.
When a called program ends, INFO does not return control to the calling program automatically, unless you include the LINK option. The called program can issue a RUN statement for the calling program name (or any other program name), but INFO treats the named program as any other called program, beginning execution at its first statement; that is, INFO will not return to the statement following the RUN in a calling program unless the RUN statement includes the LINK option.
To execute the named program:
ENTER COMMAND >RUN P.UPDATE.MASTER
462 Commands INFO Reference Manual
RUN
The odd-numbered section below contains, in line 10004, a RUN command with the LINK option. The program named in the RUN command is executed, after which the command in line 10005 is executed, and so forth.
ENTER COMMAND >TYPE P.LINK.SAMPLE
PROGRAM NAME: P.LINK.SAMPLE 12/01/1996
10000 PROGRAM SECTION ONE
10001 TERMINAL ANSI
10002 LCHAR ;
10003 SEL MASTER.DATA
10004 RUN P.SET.UP.MASTER LINK
Executes P.SET.UP.MASTER, then returns control to next command of
P.LINK.SAMPLE
10005 RESELECT DATE.OF.BIRTH LE 10/4/73
see also
COMPILE
DECODE
EXECUTE
$LISTON
INFO Reference Manual Commands 463
PRIME RWLK
RWLK
lock filename [ufd-pathname]
allows the user to set the read/write lock on any SYSTEM file to which he/she has access.
arguments lock
2
3
0
1
SYSTEM DEFAULT (default).
1 reader or 1 writer.
N readers and 1 writer.
N readers and N writers.
ufd-pathname Defaults to current ufd.
error message
INVALID SYNTAX will occur if lock is not in the range 0-3.
INFO Reference Manual Commands 465
SAVE
SAVE
file_path [
C
OMPRESS] [
I
NIT] [
EXT
]
writes a copy of the currently selected records to a binary or ASCII file.
arguments note
file_path the full pathname of the file, or the file name if it is in the current working INFO directory. The file_path may include external variables enclosed in ‘%’ characters.
COMPRESS writes all selected records to the specified
ASCII text file. If your selected records contain type B, F, or P items, do not use this option.
INIT writes the selected records to an existing file. It directs INFO to initialize (delete all existing records) the file before saving the selected records.
EXT directs INFO-Text to write the selected records saved to a sequential file and to include the 5-byte extension to each record.
n
If you don't specify the COMPRESS option, the file is saved as a fixed-length, binary file.
discussion example see also
The SAVE command instructs INFO to write a copy of all selected records to the named file. If the file does not already exist, INFO creates the file and copies the selected records to the file. If the file already exists, INFO appends a copy of the selected records to the file.
The following command entry writes all currently selected records in the selected data file to a file called SAVEIT:
ENTER COMMAND >SAVE SAVEIT
$SEC-REQ-FORMAT (VMS only)
$SVIDEL (VMS only)
INFO Reference Manual Commands 467
SCI
SCI
item-1 item-2 item-3 [item-4]
converts any type of numeric data to a character string in scientific notation, with an option to show "small" numbers in decimal.
arguments note
item-1 INFO numeric item: number to be converted.
item-2 INFO numeric item: no. of output decimal places.
item-3 INFO character item (not literal): output character string in scientific notation.
item-4 INFO numeric option: limit of order of magnitude for showing numbers in decimal. If omitted, then all numbers shown in scientific. If value 4 (say), then all numbers in range 0.0001 to 9999 shown in decimal, others in scientific. Decimal point aligned.
n
The number of decimal places must be explicitly specified in item-2 (SCI ignores the number of decimal places defined for item-1). Be aware that the number of decimal places means the number of significant digits after the decimal point in scientific notation, e.g.:
120
.1234
.0001
=
=
=
2
3
0
(1.20E02)
(1.234E-01)
(1.0E-04) n
The width of item-3 must be at least 7 greater than the maximum value of item-2.
n
The maximum value for item-4 is 7.
example see also
SCI 12345.6789 9 $CHR1 =
SCI -0.000012 6 $CHR1 =
SCI 27.8 2 $CHR1
SCI 98.7 1 $CHR1 3
=
=
SCI 0.001 0 $CHR1
SCI 0.001 0 $CHR1 3
=
=
Appendix S “Data Entry”
$SCIENTIFIC-DISP
1.234567890D+04
-1.200000E-05
2.78E+01
9.87
1.0E-03
0.001
INFO Reference Manual Commands 469
SCPY
470 Commands INFO References Manual
SCPY
SCPY
item-1 [TO] item-2 [FROM] item-3 [FOR] item-4
copies a substring from a character variable to another character variable.
arguments discussion
item-1 character item containing the source string.
item-2 character item to receive the sub-string.
item-3 numeric item or constant giving the position of the sub-string in item-1.
item-4 numeric item or constant giving the length of the sub-string to be copied.
The specified substring will be copied from item-1 to item-
2. If item-2 is shorter than the value in item-4, the copied string will be truncated on the right. If item-2 is larger than the value in item-4, then item-2 will be space filled on the right.
example
ENTER COMMAND >MOVE'ABCDEFG' TO $SCHR1
ENTER COMMAND >SCPY $CHR1 TO $CHR2 FROM 4 FOR 3
ENTER COMMAND >DIS $CHR2
DEF (Contents of $CHR2)
error messages
INVALID STRING item-1 not type C
INVALID SUB-STRING item-2 not type C
FROM FIELD NOT NUMERIC
FOR FIELD NOT NUMERIC
INFO Reference Manual Commands 471
SELECT
SEL
ECT DF_name [
D
YNAMIC] [
R
O] [
V
IA ISAM-key]
[
M
AP]
[
N
EWMAP]
[
RE
BUILD]
establishes the data file that is currently selected or available for processing. The records in the selected data file become the selected and working set of records.
arguments
DF_name is the name of an existing data file.
DYNAMIC (for ISAM datafiles only) causes the specified file to be selected, but with no records in the working set.
INFO selects records and builds a bitmap for the datafile only as you operate on individual records during subsequent active commands.
MAP (for ISAM datafiles only ) directs INFO to use the existing bitmap or, if no bitmap exists, to build a new one.
This is the default option if the specified datafile is ISAM.
NEWMAP (for ISAM datafiles only ) directs INFO to delete any existing bitmaps and build a new one.
REBUILD (INFO-Text only) this directs INFO-Text to rebuild the logical record number file for the specified extended datafile. The file will then need to be concorded.
RO indicates that you wish read-only access to the specified datafile once it is selected.
VIA (for ISAM datafiles only) establishes a secondary key as the primary key for accessing the datafile. The ISAM key must have a key level greater than or equal to zero
(0). INFO accesses the datafile in ascending sequence using the specified key. The specified ISAM-key remains in effect until changed by a LIMIT command or another
SELECT command.
INFO Reference Manual Commands 473
SELECT discussion
The SELECT command opens the data file that is to be used for subsequent commands. INFO deselects any data file named in a previous SELECT command and cancels all links to related data files.
If the data file is protected, INFO prompts ENTER
PASSWORD> and waits for you to enter a valid protection key for the file. To avoid this prompt, see the
PASSWORD command for information about entering a protection key before issuing the SELECT.
If you select an extended datafile, and no synonym file was associated with that datafile when it was defined,
INFO-Text immediately prompts SYNONYM FILENAME>.
You can supply the name of an existing synonym file that you want to use with the selected extended datafile for querying purposes. If you press <RETURN> instead, no synonym file is chosen and that datafile remains selected.
If you select an extended datafile with the RO option, you cannot update the records in the datafile. You cannot concord an extended datafile selected with the RO option.
The access that you have to the selected data file depends on the current value of the system item $AS and whether or not you include the SELECT command RO option. If you do not include the RO option and the value of $AS is
1, you have read and write access to the selected data file; if the value of $AS is 7, you have read-only access to the data file. If you include the RO option, INFO gives you read-only access to the file, regardless of the value of
$AS.
474 Commands INFO References Manual
see also
SELECT
At the end of SELECT processing, immediately before returning to the ENTER COMMAND > prompt, INFO displays the message:
# RECORD(S) SELECTED where # is the number of records selected by the SELECT command.
$AS
$AR
$NOREC
$NOSEL
ASELECT
DSEL
MODE SET HOF
NEWMAP
NSELECT
RESELECT
XSEL
INFO Reference Manual Commands 475
SET
SET
#
the set command gives you access to the selected set of ISAM records established by a previous SELECT or RESELECT BY command.
argument
# the number of the set that you want as your selected set of records
notes
n
The set command uses a set file, or file containing the bitmap which represents the ISAM datafile records selected at one point in time.
n
Each time you issue the RESELECT BY command for an
ISAM file, INFO displays a number assigned to the set of records selected. You can use this number in a subsequent SET command to select that set of records again, as illustrated below.
n
INFO can keep track of up to 16 sets for an ISAM file.
n
The NEWMAP command will delete all SET and LIM files associated with the selected ISAM file.
example
ENTER COMMAND>SELECT ISAM-FILE
949 RECORD (S) SELECTED
This is Set 1, by default
ENTER COMMAND>RESELECT BY ISAM-KEY GE ‘JAMES’
SET 2
Set number 2 is assigned
654 RECORD (S) SELECTED
ENTER COMMAND>RESELECT BY ISAM-KEY = ‘PAUL’
SET 3
10 RECORDS SELECTED
.
Set number 3 is assigned.
Return to set number 2.
ENTER COMMAND>SET 2
654 RECORD (S) SELECTED
.
.
INFO Reference Manual Commands 477
SET
After issuing a RESELECT BY command for a an ISAM file, you can further restrict the set by issuing one or more
RESELECT FOR commands, as illustrated in the following example. The set of records selected by the last
RESELECT FOR command remains in effect until you issue an ASELECT or another SELECT command. Note that when you issue an unqualified ASELECT command in this instance, INFO adds all records in the subgroup established by the initial RESELECT BY command to your selected set, not to all records in the current file.
ENTER COMMAND>SELECT ISAM-FILE
949 RECORDS(S) SELECTED
ENTER COMMAND>RESELECT BY ISAM-KEY GE ‘JAMES’
SET 2
654 RECORD(S) SELECTED
ENTER COMMAND>RESELECT FOR OPTION EQ 2
329 RECORD(S) SELECTED
.
.
.
ENTER COMMAND>SET 2
329 RECORD(S) SELECTED
ENTER COMMAND>ASELECT
654 RECORD(S) SELECTED
To rebuild sets, you can select Set 1 again and issue new
RESELECT commands, as illustrated in the following sequence.
ENTER COMMAND>SET 1
949 RECORD(S) SELECTED
ENTER COMMAND>RES BY MIDAS-KEY LT ‘MARY’
SET 2
233 RECORD(S) SELECTED
478 Commands INFO References Manual
SETUP
SETU
P IF_name
RP_name
SF_name
to select and relate files for a report, special-form or input-form.
arguments note
IF_name | RP_name | SF_name the INFO file to be processed.
n
To use this command the INFO command
‘FILES IF_name | RP_name | SF_name SAVE’ must have been issued while the necessary files were selected and related. When SETUP command is issued these saved files will be selected and related ready for the report or form to be executed.
error message see also
NO FILES SAVE WAS DONE FOR THIS ENTRY
FILES
INFO Reference Manual Commands 479
SHIFT
SHIF
T item-1 [TO] item-2 item-3 [item-4]
shift the contents of an item by the specified number of bits
arguments notes
item-1 any INFO item (not literal)
item-2 any INFO item (not literal)
item-3 number of bits to shift
item-4 fill character. Default is blank.
n
The shift command moves item-1 to item-2 offset by the number of bits specified by item-3. If item 3 > 0 then the shift is to the right. If item-3 < 0 then the shift is to the left.
Item-2 is truncated or filled at left or right as necessary.
n item-3 specifies the number of bits to shift: a positive value (the default) will move to the right, a negative value to the left.
n
There are 8 bits to 1 byte (character). Therefore to move an item 2 characters to the right, item-3 should be set to
16.
examples
SHIFT LASTNAME TO LASTNAME 16
The contents of LASTNAME will be moved 2 characters to the right.
SHIFT LASTNAME TO $CHR1 –8.
The contents of LASTNAME will be moved to $CHR1 with the 1 st
character truncated.
INFO Reference Manual Commands 481
SKIP
SKIP
item-1
repositions on the working set in any direction
arguments notes
item-1 numeric internal variable, datafile item or literal containing a positive or negative integer indicating how many records to skip, forwards or backwards respectively.
n
Even numbered program sections only.
n
If item-1 takes it beyond the working set, it will position on the last or first record of the working set.
INFO Reference Manual Commands 483
SLEEP
SLEE
P #
instructs INFO to pause for the specified number of CPU seconds.
argument discussion
# specifies the number of CPU seconds INFO pauses before processing another command.
Use SLEEP immediately after a message display during program processing, to provide enough time for you to read the message before processing continues.
example
ENTER COMMAND >SLEEP 3
Causes the terminal to pause 3 CPU seconds before prompting for or processing another INFO command.
INFO Reference Manual Commands 485
SORT
SO
RT [ON] DF_item_1 [(
D
)] [,DF_item_2...] [
F
AST]
orders the selected records using up to 16 items in the selected or related data file(s) as sort items.
arguments notes
ON is used for documentation or ease of understanding.
DF_item_1 is the item used as the primary sort item.
(D) directs INFO to sort the named field in descending order. If (D) is not specified, the field is sorted in ascending order.
,DF_name_2... item or items used as secondary sort items.
FAST If the "FAST" option is specified and the number of record pointers times the width of the key values do not exceed 10,000 bytes the Small File Sort Utility will be executed.
n
The SORT command orders selected records according to the values of up to 16 specified record items. Each item can be sorted in ascending (the default) or descending order. You can sort on any data item from the currently selected and related datafiles.
n
If two or more records have the same value for the specified item(s), INFO leaves those records in their original order.
n
If a sort item is a C-type, the following maximum item widths apply:
Unix 4096
VMS 255
Primos 2196 or 3331 for SORT FAST.
n
If you sort reselected records, that is, if a subset of all of the records in a data file, and then either use the
ASELECT or SELECT commands, INFO puts the reselected records into the positions that the reselected records came from. The positions are noted by the record numbers of the reselected records. The reselected records are replaced inthe file in the order in which you sorted them, not their original order.
INFO Reference Manual Commands 487
SORT example
n
When sorting an ISAM file, it is the INFO bitmap which is sorted, not the actual data.
n
When sorting a data file, INFO creates one or more scratch files. The number of scratch files required depends on the size of the data file and the number of fields you sort. If the SORT command does not finish, you may have to delete these files. See Appendix F INFO
Internal Files.
n
Since a sort is actually carried out in a scratch file and then copied back into the original data file, if your computer system crashes during a sort, the original data file is preserved unchanged and unsorted.
n
Should a system crash cause actual damage to your data file, the DIRECTORY command displays a D in the
EXTERNL column. In that case, you must restore the file before you can access it.
n
The existing file protection status is maintained after
SORT.
ENTER COMMAND >SELECT NAME.LIST
5 RECORD(S) SELECTED
ENTER COMMAND >LIST
$RECNO L.NAME F.NAME
1 ROSEN HESTER
2 DARCY JOAN
3 ASTOR JOHN J.
4 GRAHAM MARTHA
5 PAINTER THEODORE
ENTER COMMAND >SORT ON L.NAME
ENTER COMMAND >LIST
$RECNO L.NAME F.NAME
1 ASTOR JOHN J.
2 DARCY JOAN
3 GRAHAM MARTHA
4 PAINTER THEODORE
5 ROSEN HESTER
488 Commands INFO Reference Manual
SOUNDEX
SOUN
DEX item-1 item-2
produce soundex code from an INFO character item for matching similar sounding names
arguments
item-1 character_item containing the string to be
SOUNDEXed
item-2 character_item to receive the code. (must be four characters wide)
discussion
The SOUNDEX command is used where there is need to retrieve names that sound similar, e.g. Smith and Smythe.
Typically the SOUNDEX code will be generated at data input time. At enquiry time the required name will be
‘SOUNDEX’ and the generated SOUNDEX code used to reselect for matches on the SOUNDEX code in the data file e.g.
IPF some-input-form
SOUNDEX SURNAME SOUNDEX-NAME
FORMAT $CHR1,25
FORMAT $CHR40,4
DIS ‘enter required name>=
ACCEPT $CHR1
SOUNDEX $CHR1 $CHR40
RES FOR SOUNDEX-NAME = $CHR40
When defining the datafile containing an item to be matched by SOUNDEX, be sure to add a four-character item to store the SOUNDEX value.
INFO Reference Manual Commands 489
SPAW
N [item-1] [item-2]
Issue an operating system command from within INFO
SPAWN arguments note
item-1 character item or quoted literal containing the operating system command to be executed. May be a file variable in a program even section.
item-2 optional numeric internal variable to return an error code
0 =
1 = command successfully invoked and run.
command not successfully invoked
2 = command successfully invoked but terminated with an operating system error
If both parameters are omitted the command defaults to the
•
command n
This command can be used to issue operating system internal or external commands from within INFO programs. If item-2 is not included the INFO program will terminate if the command fails.
INFO Reference Manual Commands 491
SPECIAL FORM
SPEC
IAL FORM SF_name
Y
SF N
[
/W
]
creates a new special form or runs an existing special form.
arguments
SF_name the name of a special form file.
Y sends the form output to the spool file. This is the same as responding Y to the OUTPUT TO PRINTER (Y
OR N)?> prompt at the end of the form definition dialog.
N displays the form output at your terminal. This is the same as responding N to the OUTPUT TO PRINTER (Y
OR N)?> prompt at the end of the form definition dialog.
/W causes the display of your form to pause the first time your screen is full. This is used only with the N option.
When you use the /W option, INFO gives you a MORE?
prompt at the bottom of your screen. Responses to the
MORE? prompt are:
<RETURN> to display the next screen of the special form.
The display stops when either the screen is full or you come to the end of a form. INFO prompts you with MORE?
again.
Y (yes) to display the rest of the report with no pauses.
N (no) to file the report with no further display and return you to the ENTER COMMAND> level.
note discussion
n
An unqualified SPECIAL FORM allows you to create a special form that will not be saved.
n
INFO produces one page of output for each selected record, formatted as specified in the special form.
n
INFO-Text A-type items cannot be specified in special form definitions.
With this command, you can create customized forms for each selected record. A special form describes a page of displayed or printed information that comprises items, literals, or the results of arithmetic expressions. You define
INFO Reference Manual Commands 493
SPECIAL FORM
Defining a special form
the size of the page during the definition dialog, along with information about executing an existing form. Separate discussions for defining and executing a special form follow below.
When you specify SPECIAL FORM, INFO initiates a dialog that prompts you for a description of the page layout for the form. This description includes information about the size of the page, what data is to appear on the page, and where it is to appear.
To begin a special form definition dialog, enter the command SPECIAL FORM with the name of the new form or without a form name. If you do not include a name for the special form, INFO does not save the form when the command is finished. To establish the size of the page for the special form, INFO returns with the following prompt:
LINES PER PAGE>
COLUMNS PER LINE>
Respond to the LINES PER PAGE> prompt with a number from 1 to 1200. Respond to the COLUMNS PER LINE> prompt with a number from 1 to 200.
For each special form line, INFO prompts:
ENTER LINE DEFINITION>
Respond to these prompts by entering line definitions. To end the definition dialog, enter <RETURN> after any
ENTER LINE DEFINITION> prompt. A <RETURN> after the first such prompt returns you immediately to ENTER
COMMAND > level.
To define a special form line, enter definitions in the following format:
line,column,content [,width [,decimals]]
,D
Line and column identify the position at which the content appears on the page.
494 Commands INFO Reference Manual
SPECIAL FORM
Specifically, line can be a value from 1 to the value you gave in response to the LINES PER PAGE prompt, with 1 corresponding to the top-most line on the page, and the value you gave corresponding to the last line of the form.
Column can be a value from 1 to the value you gave as
COLUMNS PER LINE, with 1 corresponding to the leftmost position on the page, and the value you gave corresponding to the right-most position.
Both line and column specifications can take the form of a constant (eg. 4), a data item name (eg. COL-CONTROL), or a system variable (eg. $NUM2).
Content defines the information to be located at the specified line and column. Content can be specified as a literal, an arithmetic expression, or an item, as described below:
1) A 'literal' appears on the page exactly as defined. Specify a literal as text enclosed in single quotes. To embed a quote within the text, use two successive quotes (e.g.,
'YESTERDAY''S PRICE').
2) An 'arithmetic expression' evaluates to a value at runtime that is to be displayed on the page. (See 'Building
Expressions' for a complete discussion of the rules for constructing a valid expression.)
3) An 'item' refers to data item, system item, or system variable whose value is displayed on the page at the line, column location. You can use any data item from a currently selected related file.
Width defines the ouput width of the content field. The default for this field is the default or formatted OUTPUT
WIDTH for the item or system variable; or 12 spaces for an arithmetic expression.
INFO Reference Manual Commands 495
SPECIAL FORM
Executing a special form
Decimals is an integer that defines the number of decimal places for the associated content. It applies only for numeric contents and requires the preceding width specification. Its default value is 2 for calculated values, and the defined or formatted DECIMAL PLACES characteristic for other items..
D formats the content into a date (D-type) and is valid only when the content is an arithmetic expression involving dates. When processing a date, INFO-Text assumes the result is a numeric value (a number of days) unless you include the D option to specify a date result. When D is specified, the content-width is required and is generally specified as 5, 8, or 10.
When you end the line definition dialog, INFO prompts:
DO YOU WISH TO EXECUTE THIS FORM (Y OR N)>
Respond with Y (yes) to begin execution of the form.
Respond with N (no) or <RETURN> to save the special form if named and return to ENTER COMMAND > level.
You can execute a special form immediately following its definition as described above, or at any other time by entering a SPECIAL FORM command, the name of an existing form and any appropriate run-time options. INFO produces one page of output for each selected record, as specified in the special form.
If you do not include the Y, N, or N/W option when you issue the SF command, INFO prompts you with:
OUTPUT TO PRINTER (Y OR N)?>
Respond with Y (yes) to direct INFO to send the output of the special form to your spool file. Respond with N (no) to display the output of the form at your terminal. You can also include the optional specification /W to cause the terminal display to pause when the screen is full.
496 Commands INFO Reference Manual
UNIX SPOOL
SP
OOL [filename] [lpr -option] [
-NOFTN
]
an unqualified SPOOL command prints the current INFO spool or output file and once this file has been printed, INFO empties it.
arguments notes
filename is a 1- to 255-character name of the INFO spool file or the operating system file that you want to print.
-NOFTN will not treat Fortran control characters as such, but as printable characters. e.g. 1 in column 1 will print as
1 rather than advancing to a new page.
lpr -option is any valid lpr option.
n
There are two environment variables that can be used in conjunction with the SPOOL command :
_INFOSPL When set to a Unix command, it will replace the default Unix command lp. It could be set, for example, to the more command for generating screen reports.
_INFOSPLEX Used in conjunction with _INFOSPL, it can be set to any filter commands that come after the filename. For example if _INFOSPL were set to the unix cat command, you could subsequently set _INFOSPLEX to "> /tmp/tempfile.”.
INFO Reference Manual Commands 497
VMS SPOOL
SPOO
L [filename] [/
AFTE
R
=
time
[/[
NO
]
BURS
T
[/
CHAR
ACTERISTICS ]
[/
COPI
ES
=
n ]
]
]
[/[
NO
]
DELE
TE
[/
DEVI
CE=device-name ]
]
[/[
NO
]
FEED
]
[/[
NO
]
FLAG
_PAGE ]
[/
[/[
FORMS=
NO
] type
HEAD
ER
[/[
NO
]
HOLD
[/[
NO
]
IDEN
TITY ]
]
]
]
[/
JOB
_COUNT
=
# ]
[/[
NO
]LOWERCASE
[/
NAME=
job-name ]
[/[
NO
]
NOTI
FY
[/
PAGE
_COUNT
=
# ]
[/
PRIO
RITY
=
#
[/
QUEU
E=queue-name[:] ]
]
[/
REMO
TE
[/[
NO
]
SPAC
E
]
]
]
]
prints the current INFO spool or output file, or prints the specified file. An unqualified SPOOL command prints the current INFO spool or output file and once this spool or output file has been printed, INFO deletes the file.
arguments
file_name is a 1- to 32-character name of the INFO spool file or the system file that you want to print.
/AFTER specifies to print the file at the specified time of day.
INFO Reference Manual Commands 499
SPOOL VMS
/BURST includes a burst page in the output listing.
/CHARACTERISTICS specifies one or more print attributes for the spool file.
/COPIES specifies the number of copies of the file that you want printed.
/DELETE requests that the file be deleted after printing.
Use NODELETE to save the file.
/DEVICE requests that the file be queued for printing on a specified device. Logicals enclosed in ‘%’ characters may be used in the device name.
/FEED requests that an automatic form-feed be inserted at the end of each page.
/FLAG_PAGE requests that a flag page be generated preceding the file output.
/FORMS requests that the file be printed on a specified special form.
/HEADER requests that the name of the file be printed at the top of each output page.
/HOLD requests that the spool request be held until explicitly released for printing.
/IDENTIFY requests that the system display a message indicating the job number of the print job and the name of the queue in which the job is entered when the job is queued successfully.
/JOB_COUNT requests that the file be printed a specified number of times.
/LOWERCASE requests that the file contains both uppercase and lowercase characters and that the file must be printed on a printer that can print both uppercase and lowercase characters.
/NAMES specifies a name that identifies the print job.
/NOTIFY requests that the system send a message to the terminal at which you are logged on to notify you that the print job has been completed or aborted.
500 Commands INFO Reference Manual
VMS SPOOL
/PRIORITY specifies the priority of the print job.
/QUEUE requests that the file be printed on a specified device.
/REMOTE requests that the file be printed on a remote node.
/SPACE requests that the printed output be doublespaced.
notes
n
An unqualified SPOOL command prints the current INFO spool or output file to the default printer (SYS$PRINT).
Once the file has been printed, INFO deletes it.
n
The SPOOL command instructs INFO to print the current spool file or output file, or a specified VMS file, and delete its contents. You can include one or more of the operating system print options described above.
n
The arguments to the SPOOL command are also documented under the PRINT command in the VAX/VMS
Command Language User's Guide.
example
ENTER COMMAND >SELECT D.MASTER
25 RECORD(S) SELECTED
ENTER COMMAND >LIST PRINT
Send output to the current
ENTER COMMAND >SPOOL
spool file.
Send the current spool file to the printer.
see also
$NODEL-NO-REOPEN
INFO Reference Manual Commands 501
PRIME SPOOL
SPOO
L [file_name] [
-AS
header_file_name]
[
-AT
printer]
[
-COP
IES
#
]
[
-DEF
ER hh:mm]
[
-FORM
form_name]
[
-FTN
]
[
-HOM
E ]
[
-LNU
MBERS]
[
-NOF
ORMAT]
[
-NOH
EADER]
[
-OPE
N]
[
-PRI
MOS]
[
-SAV
E]
prints the current INFO spool or output file, or prints the specified file. An unqualified Spool command prints the current INFO spool or output file. Once the file has been printed, INFO empties it.
arguments
file_name is a 1- to 32-character name of the INFO spool file or the system file that you want to print. The file name may include external variables enclosed in ‘%’ characters.
-AS header_file_name requests that the specified header file be included in the header page of the printed spool file.
If you do not include this option, the name of the spooled file is included on the header page.
-AT printer requests that the file be sent to the specified printer. Otherwise, the file is sent to the system's default printer. You cannot use this option with the -HOME option.
-COPIES #] requests n copies of the file be printed. n can be between 1 and 99. By default, one copy is printed.
INFO Reference Manual Commands 503
SPOOL notes
PRIME
-DEFER hh:mm requests that printing of the file is delayed until the time specified by hh:mm. hh is hours 0-
24 and mm is minutes 0-60. Otherwise, the file is printed as soon as the printer is available.
-FORM form_name requests the name of a special paper form available on your system. The default form is a 66line page.
-FTN directs the operating system to utilize FORTRAN formatting characters in the spooled file. You cannot include this option with the -LNUMBERS, or -NOFORMAT options. -FTN is the default format, but can be overridden.
-HOME directs the operating system to print the file on the default printer. You cannot use this option with the -AT option.
-LNUMBERS requests that sequential line numbers be added in the left margin of the output. The numbers run from 1 to 999999999 without leading zeros. You cannot include this option with the -FTN option.
-NOFORMAT requests that no format control (that is, header page or pagination) be used when printing the file.
You cannot use this option with the -FTN option.
-NOHEADER requests that no header or trailer pages be included with the printed output. If you do not specify this option, the output includes default header and trailer pages.
-OPEN requests that the operating system open the print file for writing on logical unit 4. You cannot include this option if you named a system file to be spooled.
-SAVE requests that the spool file not be deleted after it is printed. This is the default if you spool a text or binary file.
n
An unqualified SPOOL command prints the current INFO spool or output file. Once the file has been printed, INFO empties it.
504 Commands INFO Reference Manual
PRIME SPOOL
n
When you enter the SPOOL command, INFO does not return to the ENTER COMMAND > level until the entire file is sent to the system spool queue.
n
The operating system does not insert a form feed between the header page and the contents of the spool file unless directed.
n
Spool has been enhanced to allow some of the extra options available under PRIMOS Revision 21.0. However, there are some limitations, and if issuing a multi-option spool command, the SPAWN command should be used to execute it at PRIMOS level.
example
ENTER COMMAND >SELECT D.MASTER
25 RECORD(S) SELECTED
ENTER COMMAND >LIST PRINT
Send output to the current spool
ENTER COMMAND >SPOOL
file.
Send the current spool file to the printer.
INFO Reference Manual Commands 505
SRCH
SRCH
item-1 [FOR] item-2 [FROM] item-3 [TO] item-4
search a character string for a sub string
arguments
item-1 string to be searched : character_item
item-2 sub-string to be located : character_item
item-3 starting column or 0 to search whole string :
numeric_item
item-4 located position : numeric_item
notes discussion
n
If item-2 is a character variable trailing spaces will be stripped before starting the search. If you need to search for spaces item-2 must be a literal.
This command searches item-1 for the sub-string in item-2 starting at the column given in item-3. If the sub-string is located, the position is returned in item-4. If it is not located, item-4 is returned as zero.
example
FO $CHR1,8
FO $CHR2,2
FO $NUM40,2,I
$CHR1 = ‘ABCDEFGH’
$CHR2 = ‘DE’
SRCH $CHR1 FOR $CHR2 FROM 0 TO $NUM40
DISPLAY $NUM40
4
INFO Reference Manual Commands 507
STAT UN
STAT UN
[
NW
] [
PR
]
displays the relationship between INFO logical file units and their corresponding physical operating system file units.
arguments discussion
NW if more than one screen of information is to be displayed this option avoids the ‘MORE’ prompt.
PR writes the information to the currently open spool file.
STAT UN displays the following information.
The logical file units used by INFO.
The physical operating system file unit which is mapped to the logical unit.
The INFO file name used with the logical file unit.
The full operating system file-path open on the physical unit.
INFO Reference Manual Commands 509
STOP
STOP
terminates an INFO session completely.
discussion example
Enter this command only in response to the ENTER USER
NAME>
prompt. You end the current user session by issuing the QUIT command before you issue STOP. See the QUIT command for information about ending a user session.
To end an INFO session from within an INFO program, you must use the commands QUIT STOP on the same command line.
ENTER COMMAND >QUIT
ENTER USER NAME>STOP
INFO Reference Manual Commands 511
INFO-Text STOPWORD
STOPW
ORD stopword
adds the specified word to a list of words not to be concorded and removes that word from the dictionary
argument
stopword word to be removed from dictionary and added to list of words not to be-concorded.
notes
n
INFO-Text treats a stopword as a word during searches based on a word expression that contains the within (w) operator to search a text item. For example, the word expression ‘APPLES W 3 BASKET’ directs INFO-Text to search for the word APPLES exactly three words apart from the word BASKET. The text ‘APPLES IN THE
BASKET’ would satisfy the search criteria, even though IN and THE are stopwords.
n
To reinitialize the stopword file, the datafile must be reconcorded with the command CONCORD NEW, at which time INFO-Text displays the prompt:
DO YOU WISH TO RETAIN THE EXISTING STOPWORDS? (Y OR N)
discussion
If you answer N (no) to this prompt, INFO-Text deletes all stopwords not found in the INFO-Text default stopword file from the list of current stopwords.
The STOPWORD command instructs INFO-Text to add the named word to the list of stopwords for the selected datafile. INFO-Text also removes all references for the specified word from the current dictionary.
If an extended datafile has not been concorded, you can add any word to the stopword list for the file. Once an extended datafile has been concorded, you can only specify as a new stopword a word that already exists in the dictionary associated with the datafile.
INFO-Text automatically includes the following standard set of stopwords for each extended datafile.
INFO Reference Manual Commands 513
STOPWORD
A
AN
BE OR
IN THAT
AND IS THE
ARE NOTTHIS
AT OF TO
W
WILL
XOR
INFO-Text
INFO-Text maintains the default list of stopwords in the
INFO-Text internal file INFOSTP. You may use this list of stopwords or your own list. For information about using your own stopword file, see Appendix G Controlling Default
Assignments.
example
In the example below, the word CABINET will be flagged in the datafiles dictionary as a stopword: the word will not be concorded in future and if a text reselect is performed on the word, INFO-Text will give the following error message:
WARNING! SEARCH TERM IS A STOPWORD
ENTER COMMAND>STOPWORD CABINET
OCCURS REC’S INDEX TERM
10 3 CABINET
ALL REFERENCES WILL BE DELETED
DO YOU WISH TO CONTINUE (Y OR N )?>Y
514 Commands INFO Reference Manual
STRIP
STRI
P item-1 [TO] item-2 item-3
strips a character field of any characters not appearing in a given set.
arguments discussion note
item-1 the source character_item
item-2 the target character_item
item-3 Set of valid characters:character_item
In effect STRIP is MOVE with stripping, and therefore mimics MOVE used interactively and in odd/even program sections.
n item-1 and item-2 can be the same item.
eg. STRIP PART-NO TO PART-NO ‘AB1234567890’
INFO Reference Manual Commands 515
SUFFIX
SUFF
IX
wildcard-name entryname return-code [pathname]
returns entries in an operating system directory
arguments
wildcard-name character item or literal
entryname character variable for returned entryname.
Set to spaces if return code = 1.
return-code
INPUT 1 = return first entryname
INPUT 0 = return subsequent entryname
OUTPUT 2 = no more entrynames
OUTPUT 0 = entryname returned
[pathname] character item or literal containing a valid directory pathname: Unix and Prime only.
note
n
When specifying a directory pathname, the following rules apply:
Unix: the directory pathname may appear either as part of the wildcard-name or as the last argument [pathname] e.g. SUFFIX ‘/home/examples/*.dr9’ $CHR1 $NUM40 or
SUFFIX ‘*.dr9’ $CHR1 $NUM40 ‘/home/examples/’
VMS: the directory pathname must be part of the wildcardname.
e.g. SUFFIX ‘[EXAMPLES]*.DR9’ $CHR1 $NUM40
Prime: the directory pathname must be entered as the
[pathname] argument e.g. SUFFIX ‘@@DR9’ $CHR1 $NUM40 ‘EXAMPLES’
INFO Reference Manual Commands 517
SUFFIX examples
SUFFIX ‘*.BIN’ $CHR1 $NUM40 will find files with the suffix ‘BIN’.
SUFFIX ‘*X*.*’ $CHR1 $NUM40 will find files with an ‘X’ anywhere in the filename.
A program to display all files ending in dr9:
FORMAT $CHR1,8
FORMAT $NUM40,4,1
$NUM40 = 1
DO WHILE $NUM40 NE 2
SUFFIX ‘*dr9’ $CHR1 $NUM40
IF $NUM40 NE 2
DISPLAY $CHR1
ENDIF
DOEND
518 Commands INFO Reference Manual
INFO-Text SYNFILE
SYNF
ILE [file-name]
creates a synonym file
notes discussion
n
The SYNFILE command can only be used to create a synonym file. To change an existing synonym file, you must select the synonym file with the SELECT command and update it using the ADD or UPDATE commands.
n
After making additions or updates to a synonym file and before continuing to process, you must sort the file using the syntax: SORT ON SYN-LIST-NAME, MEMBER.
n
If you include a blank as part of a member-name, when you list the contents of the synonym file, INFO-Text displays that member-name's value enclosed in single quotation marks.
The SYNFILE command allows you to create a synonym file and define one or more named lists of words
(synonyms) to store in the file. The synonym file created can eventually be associated with an extended data file for use in performing synonym-based free-text queries.
The synonym facility allows you to define classes, or categories, of words for INFO-Text to use when searching text in extended data files. See the Word Expressions section of the chapter 'Building Expressions' for more information about the INFO-Text synonym facility.
When you first enter the SYNFILE command, you have the option of specifying the name of a synonym file for
INFO-Text to create. If you do not specify a name for the synonym file or if you specify the name of an existing file,
INFO-Text prompts:
ENTER SYNFILE NAME>
Respond with the name of the synonym file you wish to create. If a file by the specified name does not exist,
INFO-Text creates a synonym file with that name.
INFO Reference Manual Commands 519
SYNFILE INFO-Text
If a file with that name already exists, INFO-Text displays an error message and the ENTER SYNFILE NAME> prompt again.
Once you have established the name of the synonym file,
INFO-Text prompts:
INITIAL SYNONYM FILES>
Respond as follows:
To cause INFO-Text to copy the contents of an existing synonym file into the file being created, enter the name of an existing synonym file. INFO-Text copies the existing synonym file into the new file and displays the INITIAL
SYNONYM> prompt again to allow you to copy another synonym file. You can copy multiple synonym files into the new file in this manner.
Should INFO-Text find a duplicate synonym name when copying a synonym file, INFO-Text displays a warning message to that effect. INFO-Text includes both synonyms in the new file, but does not access the second synonym during later synonym processing.
To avoid or to terminate copying existing synonym files, enter <RETURN> after any INITIAL SYNONYM> prompt.
INFO-Text next prompts you to enter synonym data into the new synonym file. INFO-Text first prompts:
SYN-LIST-NAME>
In response to this prompt, enter a 1- to 15-character synonym list name. The synonym list name can be any combination of characters excepting the space and comma, and it must start with a letter (A-Z or a-z). You can later refer to all synonyms on the list that will follow by using the synonym list name. If a word you specify already exists, INFO-Text issues a warning message and again displays the SYN-LIST-NAME> prompt.
520 Commands INFO Reference Manual
INFO-Text SYNFILE
INFO-Text then prompts you for members of the list with the following prompt:
MEMBER>
Enter a member of the synonym list. INFO-Text again prompts MEMBER>. To end a synonym list, enter
<RETURN>. INFO-Text prompts for another SYN-LIST-
NAME>.
To terminate the SYNFILE command, enter <RETURN> to the SYN-LIST-NAME> prompt. You can save an empty synonym by entering <RETURN> to the first SYN-LIST-
NAME> prompt.
You cannot specify a member with the same name as a synonym that exists in the current synfile; otherwise,
INFO-Text cannot distinguish between the synonym name and the member name during a text search. You can, however, specify the same member in more than one synonym list in the same synonym file.
When entering a synonym member, be aware of the case sensitivity defined for items that may be searched using the synonym. If the items are defined to distinguish between uppercase and lowercase during concording, you must enter the synonym list member in the appropriate case (that is lowercase to search lowercase text or uppercase to search uppercase text). If the items are not defined as requiring case concordance, you can enter the synonym member in either case.
see also
DEFINE
MODIFY
RESELECT
SYNONYM
Word expressions in Building Expressions in Introduction
INFO Reference Manual Commands 521
SYNFILE example:
INFO-Text
ENTER COMMAND>SYNFILE
ENTER SYNFILE NAME>ANIMALS
SYNONYM LIST NAME>CATS
MEMBER>CAT
MEMBER>KITTY
MEMBER>TABBY
MEMBER>LION
MEMBER>
SYNONYM LIST NAME>DOGS
MEMBER>ALSATION
MEMBER>COLLIE
MEMBER>CORGY
MEMBER>DINGO
MEMBER>‘FLEA BAG’
MEMBER>SNOOPY
MEMBER>
SYNONYM LIST NAME>
ENTER COMMAND>SYNONYM
SYNONYM LIST NAME
CATS
DOGS
MEMBER
CAT
KIITY
TABBY
LION
ALSATION
COLLIE
CORGY
DINGO
‘FLEA BAG’
SNOOPY
ENTER COMMAND>SELECT PETS
ENTER SYNONYM FILE NAME>ANIMALS
48 RECORDS SELECTED
ENTER COMMAND>RESELECT *DOGS
RESELECT (ALSATION COLLIE CORGY DINGO ‘FLEA BAG’
SNOOPY)
20 RECORD(S) SELECTED
522 Commands INFO Reference Manual
INFO-Text
SYNO
NYM *list-name member-name*
PR
displays or prints synonym file data.
INT arguments discussion
SYNONYM
An unqualified SYNONYM command displays the members of all synonym lists defined in the synonym file associated with the selected data file.
*list-name is an optional specification that specifies the name of a synonym list. INFO-Text displays only the members of the specified list. Synonym list names can be a maximum of 15 characters long and cannot include spaces.
member-name is an optional specification that specifies the name of a synonym member. INFO-Text displays all members for each synonym that contains the specified member.
is an optional keyword that requests a printed list of the requested synonym data, instead of a display at your terminal. The listing will be routed to your spool file. If you do not include the PRINT keyword, INFO-Text displays the file at the terminal.
The SYNONYM command instructs INFO-Text to display or print synonym file data at your terminal or to your INFO-
Text spool or output file. This command requires that there be a selected data file with an associated synonym file.
INFO-Text uses the associated synonym file when processing the SYNONYM command. If there is not a selected data file when the SYNONYM command is issued, INFO-Text displays an error message and returns to the ENTER COMMAND> prompt.
INFO Reference Manual Commands 523
SYNONYM example
INFO-Text
The following example illustrates a SYNONYM request for all members of the synonym list CATS:
ENTER COMMAND >SYNONYM *CATS
SYNONYM LIST NAME MEMBER
CATS CAT
KITTY
TABBY
LION
see also
DEFINE
SYNFILE
524 Commands INFO Reference Manual
UNIX SYSTEM
SYST
EM [operating_system_command]
allows the user to execute an operating system command and to return to the INFO environment without losing the current INFO settings or altering the current INFO select/relate states.
arguments
operating_system_command is a complete command in native syntax. For operating systems which let commands execute without disrupting the user environment, the operating_system_command is optional. For INFO programs, the operating_system_command is required. An unqualified command will create a sub-process at unix level. Entering exit or CTRL-D will return to the INFO session.
examples
ENTER COMMAND >SYSTEM ls *dr9
The above will list all files on the current unix directory ending in dr9
see also
ENTER COMMAND >SYSTEM
Sub-process created. Type exit to return to INFO
<unix prompt>
•
SPAWN
INFO Reference Manual Commands 525
VMS SYSTEM
SYST
EM [operating_system_command]
allows the user to execute an operating system command and to return to the INFO environment without losing the current INFO settings or altering the current INFO select/relate states.
arguments
operating_system_command is a complete command in native syntax. For operating systems which let commands execute without disrupting the user environment, the operating_system_command is optional. For INFO programs, the operating_system_command is required.
An unqualified command will create a sub-process at VMS level. Entering LO will return to the INFO session.
examples
ENTER COMMAND >SYSTEM dir *dr9
The above will list all files on the current VMS directory ending in dr9
see also
ENTER COMMAND >SYSTEM
Sub-process created. Type LO to return to INFO
<VMS prompt>
•
SPAWN
INFO Reference Manual Commands 527
PRIME SYSTEM
SYST
EM [operating_system_command]
allows the user to execute an operating system command and to return to the INFO environment without losing the current INFO settings or altering the current INFO select/relate states.
arguments
operating_system_command is a complete command in native syntax. For operating systems which let commands execute without disrupting the user environment, the operating_system_command is optional. For INFO programs, the operating_system_command is required.
An unqualified command will create a sub-process at
Primos level. Entering X will return to the INFO session.
examples
ENTER COMMAND >SYSTEM LD @@DR9
The above will list all files on the current unix directory ending in DR9
ENTER COMMAND >SYSTEM
*** ENTERING PSEUDO PRIMOS - TYPE "X" TO EXIT ***
OK>
see also
•
SPAWN
INFO Reference Manual Commands 529
TAKE
TAK
E [FROM][
REV8
] [
DATA
] user_name file_name_1 [,...]
[
REV9
]
*
[
ARC7
]
copies data files, reports, programs, or forms from another INFO user area into your current INFO user area.
arguments notes
FROM is used only for documentation or ease of understanding.
REV8 specifies that the source INFO directory is in INFO revision 8 format.
REV9 specifies that the source INFO directory is in INFO revision 9 format.
ARC7 specifies that the source INFO directory is in INFO
ARC7 compatible format.
DATA copies the data as well as the template of the specified data file.
user_name the 3 to 8-character name of the other user area.
file_name_1,... you can specify one or many files to be copied, or all files.
* copies all files from the named INFO user directory into your INFO user directory.
n
Do not confuse TAKE with the COPY or MODIFY commands; COPY duplicates only an existing INFO nondata file within a user area and renames it. MODIFY copies only the template of a data file to another file in your user area and assigns it a new name.
n
If the INFO user name specified is not in your current system directory, use the ADIR command to assign the proper system directory before issuing the TAKE command. See the ADIR command for information about changing the ADIR setting.
INFO Reference Manual Commands 531
TAKE discussion example
n
If you wish to TAKE files from an INFO user name resident in another system directory, but that INFO user name also exists in your current system directory, you will need to temporarily rename the local INFO DR9 file.
With the TAKE command, INFO copies data file templates, reports, forms or programs into your current user area from another INFO user area.
In the case of data files, only the template is copied unless you include the DATA option to copy the records also.
(See the GET and EXTERNAL commands for more information about accessing data from another user's data file.) If a data file is protected, you must provide the control-level password before INFO copies that data file.
See the PROTECT and PASSWORD commands for information about providing passwords for protected files.
If the name of a file requested from the other user area already exists in your INFO user area, INFO does not take the file, but issues an error message and continues processing any remaining files specified in the TAKE command.
The following example copies the data file D.EMPS with its records, the program P.EMPS, and the input forms
I.EMPS from an INFO directory associated with the user
PKS into your INFO directory.
ENTER COMMAND >TAKE FROM DATA PKS D.EMPS,
P.EMPS, I.EMPS
532 Commands INFO Reference Manual
TERMINAL
TERM
INAL [terminal_type] [rows,columns]
changes or displays the current INFO terminal type setting. An unqualified TERMINAL command displays the value of the INFO terminal setting.
argument notes
terminal_type display terminal.
discussion
n
Note that there are two special terminal types for hard copy terminals: NONE and HARD. NONE is used for hard copy terminals that have no form-feed capability.
HARD is used for hard copy terminals that do have formfeed capability.
Table TERMINAL-1 below lists the terminal types recognized by INFO.
When your terminal setting agrees with your actual terminal type, INPUT FORM and other commands that can clear the terminal screen or position the terminal screen cursor execute correctly.
If you want to change the default TERMINAL setting, see
Appendix G Controlling Default Assignments for more information.
For sites with multiple terminal types, either hard-wired or connected via a communications port contention unit, terminals can be specified in the USERTERMS file. they can be entered either explicitly by terminal type and user number, or as terminal type VARIABLE and user number, in which case the user will be prompted each time INFO is invoked, or as a terminal type LOGICAL, in which case the terminal type will be resolved to the INFOTERM external variable.
Note: For this option to work, the Doric Terminal option must have been selected when INFO was installed. For unix, see INFO invoking options in ‘starting INFO’ in the
Introduction.
INFO Reference Manual Commands 533
TERMINAL examples
ENTER COMMAND >TERMINAL
THE CURRENT TERMINAL TYPE IS ANSI
ENTER COMMAND >TERMINAL SORO
This new setting remains in effect until the user terminates INFO or issues another TERMINAL command.
If you type in an invalid terminal type, INFO displays a list of valid terminal types.
ENTER COMMAND >TERM BOBO
TERMINAL TYPE NOT SUPPORTED!
ACT-IV ACT5A ADDS ADM1 ADM3 ANSI ANSIW
AREG BEEH CONCEPT CYBERNEX DGRX DMED HARD
HONW HP2621 I304 IBM1 LYNW NEWB NONE
OWL PST100 SEIKO SOROC TVI924 VCR6 VT52
SUN
ENTER COMMAND >
Table TERMINAL-1
Type
ACT-IV
ACT5A
ADDS
ADM1
ADM3
ANSI
ANSIW
AREG
BEEH
CONCEPT
CYBERNEX
DGRB
DGRX
DMD3
DMED
HARD
INFO supported terminal types
Model supported
Microterm ACT-IV
Microterm ACT5A
ADDS Consul
Lear Siegler ADM-1 and ADM-31
Lear Siegler ADM-3A and ADM-45
VT100 in ANSI-compatible mode
ANSI-compatible 132 character width mode
ADDS Regent 20,25,40,60,100,200 (also TELERAY)
Beehive, PT-45
Human Design Systems Concept 108
Cybernex
Datagraphics 132B
Datagraphics 132A
Datamedia Elite 3000 series
Datamedia Elite 1521
Any hard copy with form feed
534 Commands INFO Reference Manual
Table TERMINAL-1
Type
HAZE
HONW
HP2621
IBM1
I100
I400
I304
LYNW
NEWB
NONE
OWL
PST100
SEIKO
SORO
TVI924
VCRG
V414
VT52
TERMINAL
INFO supported terminal types (cont'd)
Model supported
Hazeltine 1510
Honeywell VIP 7200
Hewlett-Packard 2621
IBM 3101
Infoton 100
Infoton 400
Informer 304
Lynwood
Newbury
Any hard copy terminal without form feed
Perkin Elmer, OWL, FOX, BANTAM
Prime PST-100
Seiko Graphics Terminal
Soroc, Televideo 920, 925
Televideo 924
Volker-Craig 404
Volker-Craig 414
Decscope VT52
INFO Reference Manual Commands 535
TIME
TIM
E
turns the display of the current time-of-day at each ENTER
COMMAND > prompt on or off.
note discussion
n
In programs, the TIME command displays various timings of the process (dependent on platform) but not the current time of day. See $TIME.
The TIME command turns on or off the display of the current time-of-day at each ENTER COMMAND > prompt.
The TIME command changes the value of the system item
$TIME-FLAG, which can have a value of 0 or 1. When
$TIME-FLAG is 0, no time-of-day display occurs at each
ENTER COMMAND > prompt. When $TIME-FLAG is 1, the time-of-day display accompanies each ENTER
COMMAND > prompt.
You can turn on or off the time-of-day display using the
CALCULATE command. CALCULATE $TIME-FLAG = 1 turns on the time-of-day display; CALCULATE $TIME-
FLAG = 0 turns off the time-of-day display. The default is zero.
The TIME command also displays the elapsed time since the last TIME command was issued.
INFO displays the time in the following format, where hh represents hours; mm, minutes; and ss, seconds. (Precise output will differ between hardware systems.)
Elapsed hh:mm:ss CPU hh:mm:ss
INFO Reference Manual Commands 537
TIME example
ENTER COMMAND >TIME
ELAPSED 00:00:05 CPU 00:00:00
11:10:46 ENTER COMMAND >SELECT MASTER
31 RECORD(S) SELECTED
11:11:00 ENTER COMMAND >TIME
ELAPSED 00:00:15 CPU 00:00:00
ENTER COMMAND >
538 Commands INFO Reference Manual
TOP
will reposition to the first record in the working set
notes
n
Even numbered program sections only.
TOP
INFO Reference Manual Commands 539
INFO-Text
TXCL
OSE
to close a text item after a partial read with TXGET
TXCLOSE discussion
If TXCLOSE is used to read only part of an A-type item subsequent calls to TXGET for an item in the next selected record will continue to return text from the previous record. TXCLOSE should be used in the same program section as TXGET if partial reading of text items is required. The command closes the currently open Atype item.
INFO Reference Manual Commands 541
INFO-Text TXGET
TXGET
[FROM] item-1 [INTO] item-2 item-3
retrieve text from an A-type item one line at a time
argument discussion
item-1 A-type item to be read
item-2 Character item to receive the line of text. The item should be wide enough to receive the whole line or text will be lost
item-3 Numeric item to receive the return code:-
1 Text item file not successfully opened
0 O.K
-1 End of file detected.
This command enables the user to achieve controlled output of text items by setting lines of text one at a time into a character variable. The line can then be transferred to a Forms Control form, or DISPLAYed or PRINTed as required. The end of the text item file is detected by the command so that the user can insert page throws etc.
when needed.
The command does not allow reformatting of the text into shorter lines and if this is attempted line ends will be lost.
If TXGET is not repeatedly called until all the text in an item has been read then TXCLOSE must be used to close the text item file before continuing with the program.
INFO Reference Manual Commands 543
INFO-Text TXLINES
TXLI
NES [FROM] item-1 [INTO item-2 item-3
determine number of Text Lines in an A-type item
argument discussion
item-1 A-type item to be read
item-2 numeric item to receive number of lines of text.
item-3 Numeric item to receive the return code:-
1 Text item file not successfully opened
0 O.K
When formatting reports containing free text it is frequently desirable to know how many lines of text to expect. This command provides that capability.
INFO Reference Manual Commands 545
TYPE
TY
PE IF_name
PG_name
RP_name
SF_name
[
PR
INT]
displays or prints a program, report, special form, or input form.
arguments discussion
IF_name | PG_name | RP_name | SF_name the file to be displayed.
PRINT sends the program, report, or form to your spool file and does not display it.
The TYPE command allows you to display a non-data file on your terminal screen or to send the non-data file to your spool file. When you use the TYPE command without the
PRINT option, INFO displays the program, report, or form on your terminal screen. If the program, report, or form is longer than 23 lines, INFO fills the screen with the first 23 lines then gives you the prompt MORE?. Respond as follows:
Response
<RETURN>
Y
Description
Continues the display in 23-line increments, prompting
MORE? after each 23 lines.
Displays the rest of the file continuously, without stopping after each 23 lines, and returns to ENTER COMMAND > when the last line has been displayed.
Ends the display and returns ENTER COMMAND >.
The following example displays the program PROFILE:
N example
ENTER COMMAND >TYPE PROFILE
PROGRAM NAME: PROFILE 12/ 1/1993
10000 PROGRAM SECTION ONE
10001 CALCULATE $CASE-FLAG = 2
10002 DISPLAY =
10003 DISPLAY AT 10,20$TIME,10X,$TODAY
10004 DISPLAY AT 13,20,'WELCOME TO INFO'
INFO Reference Manual Commands 547
UBOX
UBOX
from_cursor_coordinates to_cursor_coordinates
remove a box previously painted by the BOX command
arguments from_cursor_coordinates to_cursor_coordinates
A previously-painted box will be removed from the screen.
discussion notes
n
This command is for ANSI terminals only
example
UBOX 10,10,20,60
INFO Reference Manual Commands 549
UPDATE
UPDA
TE [DF_item_1 [,DF_item_2.]] [
BY
DF_item [
ORDE
RED
]] syntax cont’d
[BY DF_item [
ORDE
RED]] [PROMPT] [,
S
]
UPDA
TE [
B
Y DF_item [
ORDE
RED]] [WITH IF_name [
AL
AY
[
NC
]
LN
[
NC
]
NC
]]
allows you to change individual item values within selected records in the selected data file and to optionally update records using an input form.
arguments
DF_item_1 [,DF_item_#...] the name of the item or items whose values will be changed.
[BY DF_item] identifies an item whose values are the basis INFO uses to determine which selected records are chosen for updating.
[ORDERED] specifies that the selected records are sorted on the item specified in the BY option.
[PROMPT] When PROMPT is specified, INFO issues a separate prompt for each item whose values are being updated, for each record located for updating.
[,S] suppresses the initial display of the item values in the record located for updating. If used following the
PROMPT or ORDERED option, the S option must be preceded by a comma.
WITH IF_name [AL | AY [NC] | LN [NC] | NC] you can use an input form to display the values for each record that you want to update. Options for suppressing the prompt and clearing the screen are available. See the
INPUT FORM command for more information about executing an input form.
INFO Reference Manual Commands 551
UPDATE
WITH IF_name identifies the input form that INFO uses to display each record and to accept new item values for that record. The form must exist in your INFO user area.
AL (Automatic Leave) suppresses the IS THIS RECORD
ACCEPTABLE? prompt and automatically accepts the item values in the record just displayed or updated, but does not clear the screen at the end of the record.
AY (Automatic Yes) suppresses the IS THIS RECORD
ACCEPTABLE? prompt, assumes a response of Y and clears the screen after you finish viewing or updating a record, unless the NC option is included. You cannot use the AY option when the first field of an input form is defined as forced (F subcommand).
LN displays the IS THIS RECORD ACCEPTABLE?
prompt and waits for a response of L or N (leave or not accept). If you enter Y or <RETURN>, INFO assumes a response of L. If you enter Q, INFO displays an error message and reissues the prompt.
NC (No Clear) does not clear the screen after the item values in the record have been displayed or updated, regardless of the response to the message IS THIS
RECORD ACCEPTABLE? If the WITH option specifies a multi-screen input form, INFO displays the first screen of the form after each record is entered.
note discussion
n
An unqualified UPDATE command causes INFO to prompt you for the record number of each record you wish to update. Specify the record number of the record you wish to update. INFO displays the current values of every item in the record being updated. You may change the value of any item in that record.
The UPDATE command allows you to change individual item values in selected records. INFO prompts you to identify individual records to be updated. You identify records either by specifying a record number or by specifying a particular item value that a record has.
552 Commands INFO Reference Manual
UPDATE
Updating by record number
Updating by item value
If you use the UPDATE command without options, INFO prompts you with RECNO?> to enter the record number of the record you want to update. When you enter a record number, INFO displays the values of every item in the record or of every specified item for that record. INFO then displays the prompt ?> and waits for you to enter a new value for any item in the items list. You specify a new item value as follows:
>?DF_item=value
DF_item is the item name of the item whose value you want to change, and value is the new item value assigned for that individual record.
When you have completed changing item values in a particular record, enter <RETURN> at the ?> prompt.
INFO prompts you again with RECNO?>. You can enter another record number and update another record. When there are no more records that you want to update, enter
<RETURN> at the RECNO?> prompt. You then return to
ENTER COMMAND > level
If you use the BY option in the UPDATE command, INFO displays the prompt BY_item?> (where BY_item is the item specified in the BY option) and waits for you to enter an item value. INFO searches the selected records for the next record that has that item value. When such a record is found, INFO displays all the current item values or only the values specified in the items list for that record, displays the prompt ?> and waits for you to specify a new value for an item in that record. You specify a new value for an item as shown above.
When you have completed changing item values in a particular record, enter <RETURN> at the ?> prompt.
INFO then prompts you again with BY_item?>. You can specify another value to use in locating another record for updating. When you update all the records you want, enter <RETURN> at the BY_item?> prompt. You then return to ENTER COMMAND > level.
INFO Reference Manual Commands 553
UPDATE
Features when updating by record number or by item value
In the UPDATE command line, if you accompany the BY option with the ORDERED option, INFO assumes that the selected records are sorted on the BY_item and uses a binary search to locate the next record for updating.
If you include the PROMPT option in the UPDATE command, INFO prompts separately for each item or each item in the items list. That is, INFO displays the name of the item being updated instead of the ?> prompt. Respond to each DF_item> prompt by entering only a value, not
DF_item=value.
If you include the S (suppress) option in the UPDATE command, INFO does not display the current item values before the prompt. However, at the next RECNO?> or
BY_item?> prompt, you can specify that the item values be displayed in the next record located for updating.
Follow the record number or item value response with the current delimiter character and the letter D as follows:
RECNO?>3,D
or
CUSTOMER>JONES,D where a comma (,) is the current DELIMITER character.
If you include both the PROMPT and S options in the
UPDATE command line and you include a D as part of your response to the RECNO?> or BY_item?>, INFO prompts you for new item values according to the operation of the PROMPT option.
At the RECNO?> prompt, if you specify the record number of a data file record that is not selected, INFO locates the next selected record whose record number is greater than
554 Commands INFO Reference Manual
UPDATE
the record number you specified. For example, if you specify record 1 for updating and only records 5 through
10 are selected at the time you enter the UPDATE command, INFO locates and displays record 5 for updating.
At the RECNO?> prompt, specify = to retrieve the next selected record for updating.
At the BY_item?> prompt when the BY_item is C-type, you can specify a partial value. INFO searches the C-type
BY_item in the records for a match based on the partial item value.
Once you have specified a value at a BY_item?> prompt, if you specify = at a subsequent BY_item?> prompt,
INFO locates the next selected record that matches the value originally specified.
At the ?> or BY_item?> prompt, you can enter the CCHR setting's BACKTAB character to display the previous item value allowing you to re-enter a value.
At the ?> prompt, specify = to repeat the display of the record's item values.
At the ?> or BY_item?> prompt, to update more than one item value using one entry, separate DF_item=value entries with the current DELIMITER character. For example, when the slash (/) is the current DELIMITER character:
?>PART-NUM=1234/CUSTOMER=JONES
At the ?> prompt, when updating the value of a C-type item, type the value immediately after the equal sign (=).
Any blank spaces are included as part of the new item value.
INFO Reference Manual Commands 555
UPDATE
Updating using an input form
Updating A type Items
Another way to use the UPDATE command is to specify that an INFO input form be used to control which items are updated. This is most useful when the records being updated were originally entered using an input form, so that similar data validation procedures (or even the same input form) must be used when updating those records.
If you specify the WITH option, INFO clears the screen and prompts you with RECNO?> or BY_item?> on line 1.
For each record that you update, INFO executes the named input form once, displaying the current value of each item named in the input form. Note that INFO ignores any S (Store) subcommands in the input form when displaying the current item values for a particular record. Once the input form is executing:
To preserve an item value, enter an equal sign (=) or the
TAB character in response to the prompt for that value
To change an item value, enter the new value
For complete information about using input forms, see
'Executing an existing form' in the INPUT FORM command.
Updating A-type items divides into two catagories
— changing the name of the text file the record points to, and changing the text in the text file. INFO-Text allows you either capability. You access A- type items just as you access other datafile items to be updated — using either the reselect dialog or the WITH input form option.
You can change the name of the text file mentioned in an
A-type item only by redefining the item as a C-type item and then updating the file name as a C-type item. INFO-
Text then references the new file as part of the record.
See the REDEFINE command for details.
To update the text file, either from a ?> prompt or as part of the processing of an input form, enter a space and press <RETURN>. INFO Text puts the text file into the editor for you. Make the desired changes. When finished, press the <FILE> key and then the REFILE option on the menu. INFO-Text saves the file as changed, and returns you to the UPDATE dialog or to the input form.
556 Commands INFO Reference Manual
UPDATE
To avoid saving the changes, select the NOSAVE option.
INFO-Text returns you to the update dialog or to the input form.
example
ENTER COMMAND >SELECT D.EMPS
5 RECORD(S) SELECTED
ENTER COMMAND >UPDATE S
RECNO?>3
?><RETURN>
RECNO?>3,D
L.NAME
F.NAME
TITLE
SSN
ADDRESS.1
?>SSN=888888888
RECNO?><RETURN>
Suppresses the initial display of the item values for each record you update.
Display this one only.
3
=DOLITTLE
=ELIZA
=SPEECH THERAPIST
=999999999
=LONDON UK
INFO Reference Manual Commands 557
UPF
UPF
IF_name [
AL
]
[
AY
[
NC
]]
[
LN
[
NC
]]
[
NC
]
allows you to execute a screen entry form defined using the
INPUT FORM command to update records within an evennumbered program section.
arguments
IF_name — the name of the INFO input form file.
AY | AL | LN | NC options for suppressing the IS THIS
RECORD ACCEPTABLE? prompt and clearing the screen.
AY (Automatic Yes) suppresses the IS THIS RECORD
ACCEPTABLE? prompt, assumes a response of Y and clears the screen after each record is entered, unless the
NC option is included.
AL (Automatic Leave) suppresses the IS THIS RECORD
ACCEPTABLE? prompt, automatically accepts the record, but does not clear the screen at the end of each record.
LN displays the IS THIS RECORD ACCEPTABLE?
prompt and waits for a response of L or N (leave or not accept). If you enter a Y (yes) or <RETURN>, INFO assumes a response of L. If you enter a Q (quit), INFO displays an error message and reissues the prompt.
NC (No Clear) does not clear the screen after each record is entered, regardless of the response to the message IS
THIS RECORD ACCEPTABLE?. If you are executing a multiple-screen input form, INFO displays the first screen of the form after each record is entered.
INFO Reference Manual Commands 559
UPF notes example
n
This command operates exactly as the INPUT FORM command when used to execute an existing input form, except that the UPF command can be used only in an even-numbered program section to update existing records in selected or related data files.
n
See the INPUT FORM command reference, the section
'Executing an existing form', for detailed instructions about updating a data file record using an input form in an evennumbered program section.
The following program section requests that the selected data file be updated using the existing input form
I.UPDATE.STATUS:
.
.
.
20020 IF PAYMNT-STATUS EQ 'LATE'
20030 UPF I.UPDATE-STATUS LN
20040 ELSE
20050 MOVE PAYMNT-STATUS TO $2CUST-STATUS
20060 ENDIF
.
.
.
see also
INPUT FORM (IPF)
560 Commands INFO Reference Manual
USER
return a user’s process id in $NUM40
example
ENTER COMMAND >USER
ENTER COMMAND >DIS $NUM40
37.00
USER
INFO Reference Manual Commands 561
WHO
WHO
display the current process id, LOGIN name, and current location
pathname
INFO Reference Manual Commands 563
INFO-Text XDIC
XDIC
item-1 item-2
executes a DICTIONARY command whose parameters are held in a character variable.
arguments
item-1 Character item containing the DICTIONARY parameters
item-2 Numeric item to receive the returned error code:-
0 = DICTIONARY successful
1 = DICTIONARY not successful
error messages
INVALID SOURCE ITEM item-1 must be type C
ITEM NAME OR LITERAL MUST BE SPECIFIED item-1 or item-2 has been omitted
example
The example below checks if there are any terms beginning with Omega in the dictionary of the selected extended text file:
FORMAT $CHR1,10,C
FORMAT $NUM30,1,I
$CHR1 = ‘Omega\’
XDIC $CHR1 $NUM30
IF $NUM30 NE 0
DISPLAY ‘No matching results for DICTIONARY command’
DISPLAY $CHR1
ENDIF
see also
DICTIONARY
INFO Reference Manual Commands 565
XGET
XGET
item-1 item-2
executes a GET command whose parameters are held in a character variable.
arguments
item-1 Character item containing the GET parameters
item-2 Numeric item to receive the returned error code:-
0 = GET successful
1 = GET not successful
error messages
INVALID SOURCE ITEM item-1 must be type C
ITEM NAME OR LITERAL MUST BE SPECIFIED item-1 or item-2 has been omitted
example see also
FORMAT $CHR2,40,C
FORMAT $NUM30,1,I
GVSET ‘path_variable’ ‘/home/accounts/’
$CHR2 = ‘%path_variable%abc002dat COPY’
SEL FILE-A
XGET $CHR2 $NUM30
IF $NUM30 NE 0
DISPLAY ‘** ERROR : BAD GET:’,$CHR2
GOTO TRY_AGAIN
ENDIF
LIST
GET
INFO Reference Manual Commands 567
XRELATE
XREL
ATE item-1 item-2
executes a RELATE command whose parameters are held in a character variable.
arguments
item-1 Character item containing the RELATE parameters
item-2 Numeric item to receive the returned error code:-
0 = RELATE successful
1 = RELATE not successful
notes
n
If XREL is used in a program, then an INFO template of the same description must be included, as a non-executing statement, for the program to compile and execute correctly.
example
FO $CHR1,80
FO $CHR11,32
FO $CHR15,16
FO $NUM40,1,I
SEL FILE-A
REM
non-executing RELATE so that program will compile
IF 1 NE 1
RELATE FILE-B-DUMMY BY ITEM
ENDIF
$CHR11 = ‘FILE-B’
$CHR15 = ‘ORDERED’
$CHR1 = ‘RELATE ’,$CHR11,‘ BY ITEM ’,$CHR15
XRELATE $CHR1 $NUM40
IF $NUM40 NE 0
DIS ‘RELATE failed’
GOTO END
ENDIF
INFO Reference Manual Commands 569
XRELATE error messages see also
INVALID SOURCE ITEM item-1 must be type C
ITEM NAME OR LITERAL MUST BE SPECIFIED item-1 or item-2 has been omitted
ILLEGAL RELATIONSHIP NUMBER
RELATE
570 Commands INFO Reference Manual
XRES
XRES
item-1 item-2
to execute a RESELECT command
arguments notes
item-1 Character item containing the RESELECT command including the word RESELECT or RES
item-2
Numeric item to receive the returned error code:-
0 = RESELECT successful
1 = RESELECT not successful n
The syntax within item_1 should be as detailed in the
RESELECT command.
example
FO $CHR1,16
FO $CHR3,8
$IDX2 = 1
$CHR1 = ‘NAME’
$CHR3 = ‘SMI’
SEL FILE-A
$WORK-BUFF = ‘RES BY ’,$CHR1,‘ BW ’,$CHR3
XRES $WORK-BUFF $NUM40
IF $NUM40 NE 0
DIS ‘ERROR IN RESEL’
GOTO ERROR
ENDIF
error messages see also
INVALID SOURCE ITEM item-1 must be type C
ITEM NAME OR LITERAL MUST BE SPECIFIED item-1 or item-2 has been omitted
RESELECT
INFO Reference Manual Commands 571
XRGET
XRGE
T item-1 item -2
to execute RGET with error return parameter
arguments
item-1 Character item containing the RGET parameters
(see RGET)
item-2 Numeric item to receive the returned error code:-
0 = RGET successful
1 = RGET not successful
error messages example
see also
INVALID SOURCE ITEM item-1 must be type C
ITEM NAME OR LITERAL MUST BE SPECIFIED item-1 or item-2 has been omitted
ILLEGAL RELATIONSHIP NUMBER
The example below establishes a temporary link between the INFO template FILE-C and the operating system file
/home/accounts/jan1996.sav:
FORMAT $CHR2,40,C
FORMAT $NUM30,1 I
GVSET ‘path_variable’ ‘/home/accounts/’
$CHR2 = ‘2 %path_variable%jan1996.sav
SEL FILE-A
REL FILE-B 1 BY COMMON-ITEM
REL FILE-C 2 BY OTHER-ITEM
XRGET $CHR2 $NUM30
IF $NUM30 NE 0
DISPLAY ‘**ERROR : BAD RGET:’,$CHR2
GOTO TRY_AGAIN
ENDIF
LIST
RGET
INFO Reference Manual Commands 573
XSELECT
XSEL
ECT item-1 item-2
to execute SELECT command
arguments
item-1 Character item containing the SELECT parameters
item-2 Numeric item to receive the returned error code:-
0 = SELECT successful
1 = SELECT not successful
error messages see also
INVALID SOURCE ITEM item-1 must be type C
ITEM NAME OR LITERAL MUST BE SPECIFIED item-1 or item-2 has been omitted
SELECT
INFO Reference Manual Commands 575
Appendices
Appendices
Appendix A
Appendix B
Appendix C
Appendix D
Appendix E
Appendix F
Appendix G
Appendix H
Appendix I
Appendix J
Appendix K
Appendix L
Appendix M
Appendix N
Appendix O
Appendix P
Appendix Q
Appendix R
Appendix S
Appendix T
Appendix U
Appendix V
INFO Item Types
Command execution modes for INFO
System Variables
System Items
Screen Attribute Settings
INFO Internal Files
Controlling Default Assignments
INFO Commands By Function
INFO Reserved Words
ISAM Considerations
Record Matching
Functions
Using The Help Facility
Application Mode
External Variables
IMPORT/EXPORT File Formats
Configuration Files
Dossier Utility
Data Entry
Dates
Printing
Terminal Drivers
Page
A-73
A-75
A-79
A-81
A-91
A-97
A-109
A-113
A-3
A-5
A-11
A-15
A-49
A-67
A-121
A-125
A-135
A-137
A-157
A-165
A-167
A-169
INFO Reference Manual Appendices A-1
Appendix A
Item type
A
B
(Binary)
C
(Character)
D
(Date)
INFO Item Types
INFO item types
Internal width Description
9-32 bytes
(ASCII)
Contains the name of a file which holds free-text in ASCII format.
1-4 bytes Number stored as binary integer.
No decimal positions allowed.
1-8 bytes (VMS only) Number stored as binary integer.
Can have implied decimal point.
1-4096 bytes Character field.
F
(Floating)
I*
(Integer)
L*
(Lead-fill
Number)
N*
(Number)
O*
(Overpunch on Output)
8 bytes
4-8 bytes
Date field, stored internally as
YYYYMMDD See the DFMT command discussion for information about date formats.
Number stored in floating-point format.
1-16 bytes
(digits)
1-16 bytes
(digits plus decimal point)
Integer item. No decimal positions are allowed.
Number that will be left-padded on output with the current LCHAR.
Can have up to 16 characters, including the decimal point.
1-16 bytes
(digits plus
Number with decimal places. Can have up to 16 characters, including decimal point) the decimal point.
1-16 bytes
(digits)
Number stored with the last digit overpunched and with an implied decimal. Can have up to 16 decimal positions.
INFO Reference Manual Appendices A-3
INFO item types
Item type
P*
(Packed)
T*
(Trailing Sign,
Zero Fill)
V*
(Zero Fill)
Appendix A
INFO item types (cont’d)
Internal width
1-8 bytes
(packed digits)
1-16 bytes
(digits plus sign)
1-16 bytes
(digits)
Description
Number stored in packed decimal format with trailing sign. Byte 1 holds one digit. Each subsequent byte holds up to 2 additional digits.
Can have up to 15 decimal positions with the decimal point implied.
Number with decimal places and a trailing sign. Zero-filled on output
Can have up to 14 decimal positions with the decimal point implied.
Number with an implied decimal.
Zero - filled to the left. Can have up to 14 decimal positions.
*INFO maintains precision to 12 significant positions.
A-4 Appendices INFO Reference Manual
Appendix B
Command execution modes
The following list includes all INFO commands and indicates whether each is valid in an interactive session, odd-numbered program section and even-numbered program section.
Odd-numbered Even-numbered Command
•
ACC EPT
ADD
ADDR ECS
ADIR
ALT ER
ARE T
AS ELECT
ATOE
BOTM
BOX
BROFF
BRON
CA LCULATE
CAT ALOG
CCAS E
CCCT
CCHR
CH ANGE
CHEC K
CLAC
CLEA R
CNAM E
CO MINPUT
COMO UTPUT
COMP ILE
CON CATENATE
CONCORD
CONT EXT
COPY
CPL
CREA TE
CUR SOR
CWID
Interactive
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
INFO Reference Manual Appendices A-5
Command execution modes
Appendix B
Interactive
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
(cont’d)
Command
DAY
DEC ODE
DEF INE
DELE TE
DELI MITER
DEXT
DFMT
DICE
DIC TIONARY
DIF
DINT
DIR ECTORY
DIS PLAY
DO ...
DOEN D
DOCD F
DOCI F
DOCR P
DOCS F
DONE
DPG
DRP
DRP
DSE L
DSF
EDIT
ELAP SED
ENCO DE
END
ERA SE
EX ECUTE
EXP AND
EXPO RT
EXST
EXT ERNAL
FC
FILE S
Odd-numbered
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Even-numbered
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
A-6 Appendices INFO Reference Manual
Appendix B
Command execution modes
(cont’d)
Command Interactive
FILL
FI RST
FO RMAT
FULL
GET
GETL OG
GNAM E
GO TO
GTIM
GVG ET
GVS ET
HALF
HELP
IF ...
ELSE ...
ENDI F No
IMPO RT Yes
INK EY Yes
INP UT FORM ( IPF ) Yes
INTE RNAL
IPF
IT EM
Yes
Yes
Yes
JUST IFY
LAB EL
LCHA R
LIM IT
LI ST
LOG
MERG E
MIDA S
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
MODE
MOD IFY
MOV E
MRED
NAME
NEWM AP
NEXT
NMVE
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Odd-numbered
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Even-numbered
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
INFO Reference Manual Appendices A-7
Command execution modes
Appendix B
Interactive
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
(cont’d)
Command
NSE LECT
OPCL OSE
OUTP UT
PASS WORD
PHAN TOM
POS
POST INGS
PREV IOUS
PRIF
PRI M
PRI NT
PROG RAM
PROT ECT
PURG E
Q UIT
RECA SE
RED EFINE
REFO RMAT
REL ATE
REM ARK
REN AME
REP ORT
RES ELECT
RGET
RUN
RWLK
SAVE
SCI
SCPY
SEL ECT
SET
SETU P
SF
SHIF T
SKIP
SLEE P
SO RT
SOUN DEX
Odd-numbered
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Even-numbered
No
No
No
Yes
Yes
Yes
No
Yes
No
Yes
Yes
No
Yes
No
Yes
No
Yes
No
Yes
Yes
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
Yes
No
Yes
A-8 Appendices INFO Reference Manual
Appendix B
Command execution modes
(cont’d)
Command Interactive
SPAW N Yes
SPEC IAL FORM ( SF ) Yes
SPOO L Yes
SRCH
STAM P
STAT
Yes
Yes
Yes
STOP
STOPW ORD
STRI P
SUFF IX
SYNF ILE
SYNO NYM
SYS TEM
Yes
Yes
Yes
Yes
Yes
Yes
Yes
TAK E
TERM INAL
TIM E
TOP
TXCL OSE
TXGE T
TXLI NES
TY PE
UBOX
UPD ATE
UPF
USER
WHO
XDIC
XGET
XREL ATE
XRES
XSEL ECT
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Odd-numbered
No
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Even-numbered
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
No
No
Yes
No
Yes
Yes
No
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
INFO Reference Manual Appendices A-9
Appendix C
$CHR1 through
$CHR40
$DAT1 through
$DAT40
$NUM1 through
$NUM40
System
Variables
System Variables
INFO provides you with a 320-byte system variable buffer, which is formatted by default as 40 8-byte fields. The forty fields in this buffer, each called a system variable, can be considered character fields (referenced as $CHR1–
$CHR40), date fields (referenced as $DAT1–$DAT40), numeric fields (referenced as $NUM1–$NUM40), or any combination of the three. The system variable $CHR1 occupies the same storage location as the $NUM1 and
$DAT1 system variables. You can use a given location n in the system variable buffer as a $CHR# value for part of an INFO session and use the same field as a $NUM# value later in the same session.
You can change the default storage and display characteristics of each field in the system variable buffer to meet specific processing needs. You use the FORMAT command to change the characteristics of system variables; see the FORMAT command for the details of formatting system variables.
The 40 system variables, $CHR1 through $CHR40 store character data. Each $CHR# variable is formatted, by default, with an input width of 8, an output width of 16 and an item type of C.
The 40 system variables $DAT1 through $DAT40 store date values in the format yyyymmdd and display according to the setting of DFMT. Each $DAT# system variable is formatted, by default, with an input width of 8, an output width of 11 and an item type of D.
The 40 system variables $NUM1 through $NUM40 store numeric data. Each $NUM# variable is formatted, by default, with an input width of 8, an output width of 16 and an item type of F. You can change the type characteristic of a $NUM# system variable to that of any of INFO's numeric item types.
INFO provides system variables for holding anything that cannot be stored as an item. A system variable holds a numeric, character, or date value.
System variables can be used just like items: they can be displayed, printed, calculated, or moved. You can use
INFO Reference Manual Appendices A-11
System Variables
Appendix C
them in logical expressions, and compare them either to constant values like letters and numbers, or to items or other variables. You can also use them during interactive sessions or in reports.
You can use up to 40 system variables at once, either 40 of one type, or any mixture of numeric, character, or date variables totaling up to 40. The diagram below shows how these 40 variables look to INFO; the xxx entry indicates where you enter the type for the variable. The three types are NUM, CHR, and DAT. The diagram shows the default characteristics for each of these types.
| $xxx1 | $xxx2 | $xxx3 | $xxx4 | $xxx5 | . . . | $xxx40 |
With any system variable, # is the number from 1 to 40 that you assign the variable. For instance, you might have
$NUM1, $NUM2, $CHR3, $DAT4, and $NUM5 in the same program. You can’t use both $NUM1 and $CHR1 in the same program because INFO stores only one space for the $xxx1 variable. The order in which you use system variables is not important, but keep track of which variables you do use so that numbers are not repeated.
System Variable Default Characteristics
Variable Internal Output
Format Width Width Type Description
$CHR#
$NUM#
$DAT#
8
8
8
16
16
10
C
F,2
D
Can hold character strings.
Can hold any numeric value.
Can hold any date value.
Default input format is
MM/DD/YY.
A-12 Appendices INFO Reference Manual
Appendix C
FORMAT see also
System Variables
You can change the characteristics of system variables by using the FORMAT command. If you want a different width, an integer, or a specific number of decimal places, you can adjust the existing variables with the FORMAT command.
The order of characteristics used with the FORMAT command is similar to that used when defining datafile items. You include the name of the variable, its internal width, its output width, its item type, and its decimal places, if applicable.
e.g.
FORMAT $CHR1,7,C
If you format a variable to be larger than 8 spaces wide, you use up part of the next system variable. For instance, if you format $CHR1 to be 17 spaces wide, the next variable you use must be $xxx4 or more. By expanding
$CHR1, you used up the space INFO reserves for system variables $xxx2 and $xxx3.
FORMAT $CHR1,17,C
|= = = = = = = = = = = = = = = = =|
| $xxx1 | $xxx2 | $xxx3 | $xxx4 | $xxx5
↑
Next available system variable is $xxx4.
The effects of a FORMAT command and the contents of a system variable continue after the termination of a program. To ensure that your variables are what you expect them to be, it is recommended that you format and initialize any system variable you use in a program.
CLEAR
INTERNAL
REFORMAT
DINT
FORMAT
$WORK-BUFFER
INFO Reference Manual Appendices A-13
Appendix D
$ABBREV
(VMS only)
System Items
System items are used by INFO to control a variety of operating options and to store the results of certain INFO's internal operations (such as the number of currently selected records). Each system item is listed below with a description of its function and allowable values.
You can display the value of any system item by using the
DISPLAY command. (See the DISPLAY command discussion for information about displaying a system item.)
You can change the value of certain system items, as indicated below.
To display a list of all INFO's system items, enter:
ENTER COMMAND >ITEMS -1
Note: Some System Items which are specific to screen display are detailed in appendix E, ‘Screen Attribute
Settings’
Default = 0
Set = 1
When the system item $ABBREV = 1, INFO will scan for
VMS symbols, the contents of which it will try and invoke as a valid INFO command, eg.
At VMS:
SC:==SEL CONTROL
In INFO:
ENTER COMMAND >CALC $ABBREV = 1
ENTER COMMAND >SC
22 record(s) selected.
Be careful that abbreviations do not conflict with live INFO commands.
INFO Reference Manual Appendices A-15
System Items
Appendix D
$APPLICATION-MODE
Read only
Default = 0
Set = 1
When set, indicates that the user entered INFO using an environment variable as a USERNAME.
example
Unix: _tes /unix_source/tesdr9 ; export _tes
(bourne or korn shell)
or
setenv _tes /unix_source/tesdr9
or
( c-shell )
GVSET '_tes' '/unix_source/tesdr9’ ( within INFO )
VMS:
Primos:
$AR
$ARITH-
QUESTION
DEFINE .TES DUB5:[VAX_SOURCE]TES.DR9
SET_VAR .TES PRIME_SOURCE>TESDR9
Default = 0
Set = 1
$AR indicates the type of access you have to the most recently selected or related data file. You cannot change the value of this system item. INFO sets the value of
$AR, as follows: n
1 to indicate you have READ/WRITE access to the data file n
7 to indicate you have READ-ONLY access to the data file
$ARITH-QUESTION determines whether to issue a warning prompt when calculating values into a datafile_item interactively or in an odd program section causes a numeric overflow.
Use the CALCULATE command to set this item to one of these values: n
0 tells INFO to issue to prompt DO YOU WANT TO TRY
AGAIN?> when a numeric overflow occurs. Responses to this are:
A-16 Appendices INFO Reference Manual
Appendix D
System Items
$AS
$BUCKSZ
(VMS only)
Y repeat the calculation
N do not repeat the calculation n
Any numeric value other than 0 tells INFO not to issue the
DO YOU WANT TO TRY AGAIN?>
prompt.
Default = 1
Set = 7
INFO uses the value of $AS to determine the type of access you want granted for the next selected and related data files processed. Use the CALCULATE command to set this system item to one of the following values: n
1 to indicate you want READ/WRITE access to the data files n
7 to indicate you want READ-ONLY access to the data files
Note that you can use the RO (read-only) option on a
SELECT or RELATE command to override a $AS setting of 1. If you include the RO option on a SELECT or
RELATE command, you can only read from the data file, regardless of the current $AS setting. If you do not include the RO option on a SELECT or RELATE command, INFO gives you the access indicated by the current $AS setting.
ISAM files only
Default = 0
Set = (configurable)
It is possible to set the bucket size for RMS ISAM file creation. The default value is 0, which takes the operating system default. If you perform an operation which creates a new ISAM file (e.g. PURGE), and you set $BUCKSZ > 0, the new file is created with the specified bucket size. Note that no check is made to ensure that the bucket size you specify is large enough to accommodate the logical record length of the file. It is recommended that $BUCKSZ be used carefully and reset to 0 after the file creation command (e.g. SELECT after an EXTERNAL which specifies a new file name for an ISAM file creates a new file, you should CALC $BUCKSZ = 0 after the SELECT if you had set it to a value greater than zero before the
SELECT).
INFO Reference Manual Appendices A-17
System Items
Appendix D
WARNING:
See the VMS Record Management Services manual for more information.
These settings remain during your current INFO session so subsequent operations will inherit these settings unless you explicitly set the value back to the default.
$BLANK-FIELD
$CASE-FLAG
Default = 0
Set = 1
Set = 2
Set = 3
N, I, L, V, O and T type fields containing blank or zero display as zero.
N, I, L, V, O and T type fields which contain blank or zero display as blank.
N, I, L, V, O and T type fields which contain blank, zero or negative values display as blank.
N, I and L type fields which contain blank or negative values display as blank.
Default = 0
Set = 1, 2
$CASE-FLAG determines whether INFO is sensitive to the case (uppercase or lowercase) of item names, directory entries, and commands. Use the CALCULATE command to set $CASE-FLAG to one of the following values: n
0 tells INFO to accept all command input as entered and to be case-sensitive to item names and directory entries.
For example, if you enter ALTER last-name and the item you want to change is named LAST-NAME, INFO does not match the item name, and issues an error message that the item you requested does not exist.
n
1 directs INFO to convert all command input to uppercase automatically before processing the command request.
n
2 directs INFO to accept all command input as entered and to ignore case when searching for item names and directory entries during command processing. For example, if you enter the command ALTER last-name,
INFO considers 'last-name' to be equivalent to 'LAST-
NAME'.
A-18 Appendices INFO Reference Manual
Appendix D
System Items
$CHECK-NOMATCH
Default = 0 Comparisons for numerics and characters fail on no match.
Set = 0, 1, 2, 3 (See Appendix K “Record Matching” for details on each individual setting)
This variable allows users to change default processing with regard to tests on related file item values of blank for characters and zero for numerics.
$COMMA-SWITCH Default = 0
Set = -1,1
$COMMA-SWITCH determines whether INFO puts commas in a displayed numeric field (that is, item types B,
F, I, N, O, P, T and V). You can use the CALCULATE command to set this system item to one of the following values: n
0 : commas will be displayed only if the output width of the item or variable is large enough to accommodate the highest possible value in that item or variable plus the commas.
n
-1 : commas will not be displayed in numeric fields.
n commas will be displayed only if the output width of the numeric field is large enough to take the greatest possible numeric value plus the decimal point (if any) and commas.
e.g. if a numeric field is formatted as 8, I then its output width would need to be 10 or more to allow for 8 digits and 2 commas, whatever the actual value of the numeric field.
n
1 : commas will be displayed if the output width of the numeric field is large enough to take the actual numeric value plus the decimal point (if any) and commas.
e.g. if a numeric field is formatted as 8, 8, I (i.e. output width of
8) and its value was 123456 then it would be displayed as
123,456 : if its value was 1234567 then no comma would be displayed.
INFO Reference Manual Appendices A-19
System Items
Appendix D
$COMP-LINK-ONCE
Default = 0
Set = 1
When set to 0 and used with the SINGLE option,
COMPILE will compile only linked programs, each time they are encountered.
When set to 1 and used with the SINGLE option,
COMPILE will compile only linked programs, and only the first time they are encountered.
When set to 0 and used with the LOCAL option, COMPILE will compile every form, report and linked program each time they are encountered.
When set to 1 and used with the LOCAL option, COMPILE will compile every form, report and linked program the first time they are encountered only.
When set to 0 and used without any options, COMPILE will compile every form, report and linked program each time they are encountered, and non-linked programs once only.
When set to 1 and used without any options, COMPILE will compile every form, report, linked and non-linked program the first time they are encountered only.
$COMPRESS-REC-ATT
(VMS only)
Default = 0
Set = 1
The system item $COMPRESS-REC-ATT (alternate name
$RAT), when set to 1, saves with standard carriage controls rather than Fortran carriage controls (default) for the following commands:
SAVE COMP INIT
OUTPUT
EXPORT
ALL DOC commands, i.e. DOCDF
ALL DUMP commands, i.e. DPG
WARNING: These settings remain during your current INFO session so subsequent operations will inherit these settings unless you explicitly set the value back to the default.
A-20 Appendices INFO Reference Manual
Appendix D
System Items
$CONDITION-NAME
Read only
Contains the name of the INTERRUPT condition, specified using the MODE SET COND command, last raised.
$DAY
Read only
$DAY contains a value from 1 to 31 that indicates the current day of the month. This is the same value as that contained in the field for the day of the month in the system item $TODAY, described below. You cannot change the value of $DAY.
$DECODE-EXT-PG Default = 0
Set = 1
If set to 1, a DECODE * command will not decode any external programs, forms and reports.
$DISPLAY-MODE
Default = 0
Set = 1
Controls display of screen attributes. See Appendix E
“Screen Attribute Settings”.
$DOPS2
Default = 0 do even program section
Set = 1 don't do even program section
'Do-Program-Section-2'
ISAM files only
SELECT <filename> DYNAMIC clears down the default set bitmap (NDX) file, and returns the number of records selected as zero. The bitmap is only built when the file is processed.
$DOPS2 controls whether records are automatically read, and processed by any following even program statement when $NOSEL = 0, and SELECT <file> DYNAMIC is in force. See the table below.
INFO Reference Manual Appendices A-21
System Items
Appendix D
$DOPS2
0
1
0
1
SEL DYN
Records in file ?
yes yes no no
Will even section be executed ?
yes (default) no no no
$DUPLEX
Note: To take effect, $DOPS2 must be set BEFORE the
ISAM file is SELECTED DYNAMIC
Default = 0
Set = 1 , 2
Sets command input to half duplex, with INFO echoing characters received if set to 1. To be used with ANSI terminals only.
When $DUPLEX = 1, the following apply: n
If $CASE-FLAG = 1, lower-case input will be up-cased before being reflected n
<Tab>, <Backtab>, <Keep> and <Clear> characters are not reflected.
n
$ERROR-POSITON - on line 24 - where user response is required (e.g. ERROR COUNT EXCEEDED, RECORD
LOCKED, IS THIS RECORD ACCEPTABLE), the user’s response will NOT scroll the screen up one line.
n
Single terminal character capture to COMO files.
n
Can be set OFF or ON in a form, program or interactively, on a field by field basis. i.e. CALC $DUPLEX = 1 (ON),
CALC $DUPLEX = 0 (OFF) n
Backspace - to the left of the first character in a field not reflected (i.e. does not destroy screen layout)
A-22 Appendices INFO Reference Manual
Appendix D
System Items
n
Backspace visually removes the character n
Exceeding field width - the first character typed beyond the width of the item accepted is not reflected, so does not overwrite any field displayed in the follow-on position.
n
Kill visually removes the whole field
If the previous input exceeded the item width, n
Kill will visually remove all the display (for that item), to the left and right of the cursor n
Backspace will visually remove the display (for that item), to the right and including the previous cursor position, unless the cursor is in the first character position of the field. (to do this, use Kill).
INFO commands FULL and HALF
When used in conjunction with commands FULL and
HALF: n
HALF with or without $DUPLEX = 1, i.e. NOECHO - has been modified to output one space for every non control key depression. Backspace and kill operate as in
$DUPLEX = 1 WITH ECHO.
n
FULL and $DUPLEX = 0 as standard INFO full duplex operation.
n
FULL and $DUPLEX = 1 half duplex operation with ECHO.
n
When $DUPLEX = 2 nothing is echoed to the screen except when passwords are being entered, when spaces are reflected.
$ERROR-POSITION
Default = 1
Set = (configurable)
$ERROR-POSITION determines whether INFO displays error messages while executing input forms, and if so, on which line on the terminal screen to display the messages.
You can assign one of the following values to this system item by using the CALCULATE command or by specifying the $ERROR-POSITION item as an input form item with an S (Store) option:
INFO Reference Manual Appendices A-23
System Items
Appendix D
$EXACT
$ECL
(Prime only) n
0 directs INFO to suppress error messages during INPUT
FORM processing n
Any value from 1 to 24 directs INFO to display error messages during input form processing, at the row on the terminal screen specified by the value
Read only
Occurs 10 indexed by $IDX2
Default = 0
Set = 1
When the command MODE SET EXACT relno ON is issued, $EXACT will file the value of 1 in each array element corresponding to the relate numbers.
Default = 0
Set = 1
When set, uses Prime’s Edit Command Line ‘ECL’ feature
- available at PRIMOS Revisions 21.xx and upwards.
ECL is only available at ENTER COMMAND > level.
When $ECL is set, the command line prompt is:
(ECL) ENTER COMMAND >
$FAST-DELETE
ISAM files only
(VMS only)
Default = 0
Set = 1
INFO supports the ROP=FDL option in the RAB on open for rapid purging of ISAM records. IF $FAST-DELETE is set to 1, this option will be turned on. Note that if this option is used, processing after purging will be noticably slower until a CONVERT/RECLAIM is run on the ISAM file and it is re-opened under INFO. Also, with this method of purging, purged records can still be accessed through a secondary index.
A-24 Appendices INFO Reference Manual
Appendix D
System Items
$FIELD-EDIT
(VMS only)
See the VAX/VMS Record Management Services manual for more information.
Default = 0
Set = 1
If set to 1, INPUT FORM will call SMG to update fields in
INPUT FORMS with full VMS line editing. The CCHR settings are preserved and used as field terminators so they may be passed back from the read routine as single characters. There is a first time switch in the field editing routine so that the SMG initialisation gets done only if field editing is being used. This avoids undesirable switching to graphics mode when certain non-printable sequences are displayed through an activity like typing a PROGRAM that contains such strings.
$FORCE-WRITE
ISAM files only
Default = 0
Set = 1
When set to default, INFO generates an ISAM record at the end of an IPF or even program section.
When set to 1 INFO generates a new ISAM record immediately on detecting that the key does not already exist with the following operations :
ADD and IPF interactively and in odd program sections, even program sections when RELATE Isam-file FILL is in force.
When used in conjunction with $LOCK-MODE = 1 or 2, a generated record will be locked immediately after its insertion into the file. See the table ISAM Control Items below.
$GBUFRS
(VMS only)
ISAM files only
Default = 4
Set = (configurable)
INFO Reference Manual Appendices A-25
System Items
Appendix D
This allows the user to set the number of global buffers for
RMS ISAM indices. By default, $GBUFRS is set to 4. In
INFO revision 9.23, the number of global buffers was set to 0, which let RMS determine whether to allocate 1 buffer or no buffers depending upon the characteristics of the file.
See the VAX/VMS Record Management Services manual for more information.
$HOURS
$IDX1 through
$IDX9
Read only
Displays the hours element of $TIME
The nine system items $IDX1 through $IDX9 are used by
INFO for subscript values when processing arrayed data file items. You must reference a $IDX# system item as the index when you define an arrayed data file item.
(See the DEFINE and ALTER command discussions for information about defining arrayed items.) Use the
CALCULATE command, or the S (Store) option in an input form, to assign an appropriate value to the defined $IDX# item when you want to access an element in an arrayed data file item.
$IGNORE-OWNER ISAM files only
(VMS only)
Default = 0
Set = 1
When $IGNORE-OWNER is set to 1, if a PURGE is issued on an entire ISAM file and the creation of the mirror image of the file fails because the user is not the owner of the file, but the file protection of the ISAM file has allowed write access, a new file is created with the default owner and all other attributes the same as the original ISAM file.
This allows the original file to be deleted (instead of having each record purged, record by record). HOWEVER, the replacement file will have a different owner UIC which may raise security issues. $IGNORE-OWNER is set to 0 by default. USE WITH CAUTIONI
$IPF-DISPLAY
Default = 0
Set = 1
A-26 Appendices INFO Reference Manual
Appendix D
System Items
$IPF-F-V-EXIT
In an interactive or odd section IPF, when set, $IPF-
DISPLAY causes INFO to display the contents of the buffers (similar to UPDATE .. WITH IPF) for the second and subsequent records added (based on the first or preceding record).
In an even section UPF it displays the current buffer contents (as in UPDATE .. WITH IPF) for the current record on accept fields.
Default = 0
Set = 1
If set to 0, <RETURN> on the first logical field of an input form will always quit the form. If set to 1 and if the first logical field of an input form has the V or F option,
<RETURN> will set the default value or prompt for input accordingly.
$ISAM-AS-DAM
Default = 0
Set = 1
By default, statements such as CALC $NUM1 = $NUM1+
1 do not generate records in ISAM files with the REL ..
FILL option, but they do in non-ISAM files.
When $ISAM-AS-DAM is set it forces INFO to generate
ISAM records on REL <filename> <item> FILL in interactive mode and odd program sections, as for non-
ISAM files.
See the table ISAM Control Items below.
INFO Reference Manual Appendices A-27
System Items
Appendix D
ISAM Control Items Table
Std= Standard Error
Exception Handling
Own= Own or Custom Error
Exception Handling
Read record without lock
Concurrency Control
$LOCK-MSG
0-80 characters of user-defined lock message. Initially blank
Std . Own n/a yes
Forced write on unmatched keys without lock
Forced write on unmatched keys with lock
Std . Own n/a yes
Std . Own n/a yes
Read record with lock
Std . Own n/a yes
$LOCK-MSG-LEN
Length of $LOCK-MSG to be used.
Initial value 80.
n/a yes n/a yes n/a yes n/a yes
$LOCK-MODE
To control read no lock or read with lock options.
Initial value 0.
ISAM Compatibility
0 -1
Std . Own n/a n/a
$ISAM-AS-DAM
On Rel..Fill, ISAM to act as Fixed
Length Records. Default 0
$FORCE-WRITE
On ISAM Rel..Fill, no match.
To control where record is written.
Applies to Update, IPF and Even sections only. Initial value 0.
n/a . n/a
0 -1
Std . Own
1 1
Std . Own
1 1
Std . Own n/a n/a
1 1
1 2
1 1
1 2 n/a n/a
A-28 Appendices INFO Reference Manual
Appendix D
System Items
$ISAM-ERROR-MODE
Default = 0
Set = 1
When set, $ISAM-ERROR-MODE overrides the default display of irrecoverable error messages.
$ISAM-ERROR0..9 Read only
ISAM return codes. These codes may also be referred to by the array item $ISAM-ERROR (occurs 10, indexed by
$IDX2)
$KIDSP
Default = 0
Set = 1
When set, displays from INPUT FORMS are suppressed.
Default displays IPF terminal output.
The designated use for this item is for COMI replay of a
LOG file recovery, suppressing the terminal output to speed up execution time.
$LASTCHAR
This read-only variable stores the last character keyed in.
$LISTON Default = 0 list off
Set = -1 list executing program or input form statements to print file
Set = 1 list executing program or input form statements to terminal
This variable for RUN LIST/PRINT can be set anywhere and is applicable to both programs and input forms.
It is set by the existing RUN <program> LIST to 1 and
RUN <program> PRINT to -1.
When used in conjunction with IPFs with the value 1 (list to the terminal), IPF statements will be displayed to the
$ERROR-POSITION line or row.
INFO Reference Manual Appendices A-29
System Items
Appendix D
$LOCK-MODE
$LOCK-MSG
Default = 0
Set = -1, 1, 2
This item along with the following two system items is to be used in conjunction with the existing system items
$LOCK0...9, $LOCK-QUESTION. The value of $LOCK-
MODE determines how ISAM records are processed with the read with lock options. $LOCK-MSG can contain a user defined message for default lock processing.
When set allows control of read with lock and user defined lock message processing.
Set = -1 Read record without lock: use user-defined lock message in $LOCK-MSG if locked record is encountered.
Set = 0 Read record without lock: use system lock message if locked record is encountered.
Set = 1 Read record with lock: use system lock message if unable to lock record.
Set = 2 Read record with lock: user-defined message in $LOCK-MSG if unable to lock record.
See the ISAM Control Items Table above.
Default = <blank>
Set = any user defined string up to 80 characters in width.
Used in conjunction with $LOCK-MODE values -1 and 2 to override the default lock message.
$LOCK-MSG-LEN Default = 80
Set = set to WD $LOCK-MSG or less if desired
$LOCK-QUESTION
Default = 0
INFO uses the value of $LOCK-QUESTION to determine what action to take when an attempt to lock an ISAM file record is unsuccessful (i.e., the $LOCK# item that corresponds to the file is set to 1 following the lock
A-30 Appendices INFO Reference Manual
Appendix D
System Items
$LOCK-QUESTION (cont’d) attempt). Use the CALCULATE command to set this system item to one of the following values:
0 - directs INFO to prompt UNABLE TO LOCK RECORD
IN FILE n WITH KEY ... DO YOU WANT TO TRY
AGAIN?> when a record lock attempt is unsuccessful.
Respond to this prompt as follows:
Y (Yes) or <RETURN>
Instructs INFO to attempt to lock the record again.
N (No) Instructs INFO not to attempt to lock the record again.
Any value other than 0 directs INFO to suppress the above prompt when an attempt to lock an ISAM file record is unsuccessful. INFO continues as though it issued the prompt and received a response of N (that is, INFO does not attempt to lock the record again.)
$LOCK0 through $LOCK9
Read only
The ten system items $LOCK0 through $LOCK9 indicate the result of an attempt to lock an ISAM file record.
($LOCK0 indicates the results of a record lock attempt for the selected file, $LOCK1 for the first related file, $LOCK2 for the second related file, and so on.) Following an attempt to lock a record in an ISAM file, INFO sets the value of the $LOCK# item that corresponds to that file to one of the following values:
0 indicates that the record lock attempt was successful.
1 indicates that the record lock attempt was unsuccessful.
$LOCK0 - $LOCK9 are set by INFO and cannot be changed by the user. These items may also be referenced by the array item $LOCK (occurs 10, indexed by $IDX2).
INFO Reference Manual Appendices A-31
System Items
$MAXREC
$MINS
$MONTH
$MOVFLG
$NM
Appendix D
Read only default = 4096
$MAXREC displays the length in bytes of the portion of
INFO's memory that holds records from the selected and related files.
Read only
Displays the minutes element of $TIME
Read only
$MONTH contains a value from 1 to 12 that indicates the current month of the year. This is the same value as that contained in the month in the system item $TODAY, described below default = 0 set = 1
When a MOVE, CALC or CONCATENATE is performed from an item on a related file where there is a no-match,
$NPVFLG controls whether the target field is left intact or is blank-filled.
Default = 0
MOVE - blank filled the <target> will be :
CALC - zero filled
CONC - the no-matched source fields will be blank filled and concatenated
Set = 1 the <target> will be left intact in all cases if
<source> no-match. Note that with CONC, any no-match condition will suffice.
default = 0 set = 1, 2
$NM determines what, if any, messages INFO displays during related data file processing when a no-match situation occurs (that is, when no related file record exists that matches the value of the relate key item in the
A-32 Appendices INFO Reference Manual
Appendix D
System Items
$NM (cont’d) selected or other related record). Use the CALCULATE command to assign one of the following values to $NM: n
0 (the default) directs INFO to display the following message whenever a no-match condition is detected:
NO MATCH IN RELATED DATAFILE relate_# FOR RECORD rec_# where relate_# identifies the related data file and rec_# is the number of the selected record just processed (except if the related file is an ISAM file).
n
1 directs INFO to suppress the display of any message when there is a no-match situation.
n
2 directs INFO to display the following message in addition to the NO MATCH IN RELATED DATAFILE message
(described above) for a no-match condition:
NO MATCH IN related_file_spec FOR relate_key_item=item_value where related_file_spec is the name of the related file when the no-match condition was detected, relate_key_item identifies the common item name by which the file is related to a previous file, and item_value is the value of the relate key item for which no match was found.
$NODEL-NO-REOPEN
(VMS only) Default = 0
Set = 1
When $NODEL-NO-REOPEN is set to 0 (the default),
SPOOL /NODELETE will re-open the spool file after the
PRINT command has been issued for appending additional information to that spool file. If $NODEL-NO-
REOPEN is set to 1, the spool file will not be re-opened when SPOOL / NODELETE is issued.
INFO Reference Manual Appendices A-33
System Items
Appendix D
$NODEL-NO-REOPEN(cont’d)
(VMS only)
Note: Setting $NODEL-NO-REOPEN = 1 avoids the occasional problem on busy systems of PRINT not being able to open the spool file when the printer becomes free.
$NOREC
Read only
$NOREC contains the total number of records in the selected data file. Note that this is not the same as the number of currently selected records (see $NOSEL below). You cannot change the value of $NOREC.
$NOSEL
Read only
$NOSEL contains the total number of records in the working set currently selected unless the selected file is
ISAM and was selected with the DYNAMIC option or had a
LIMIT command issued. With DYNAMIC, $NOSEL is initially 0 and is incremented as records are read, whereas with LIMIT, $NOSEL is 0 if no records meet the specified condition, or 1 if at least 1 record does. $NOSEL is then incremented as records are read if any others meet the condition. Note that this is not the same as the number of records in the currently selected data file (see $NOREC above).
$PAGENO
$PAGEST
Read only
$PAGENO contains the number of the last page printed for a report. $PAGENO initializes to 0 before the report is printed.
$PAGEST determines the starting page number during
REPORT command processing. INFO resets $PAGEST to 0 after a report is finished. By default, each report begins with page number 1, that is, 0 + 1.
Before you enter a REPORT command, you can alter the value of this system item with the CALCULATE command.
Set $PAGEST to the page number for the first page of the report minus 1. (INFO determines the number for each page by adding 1 to the value of $PAGEST) If you want the report to begin with the page number following the last
A-34 Appendices INFO Reference Manual
Appendix D
System Items
$PAGEST(cont’d) page of the previous report, set $PAGEST to the value of
$PAGENO (enter CALCULATE $PAGEST = $PAGENO).
$PARAMETERS
To be used in conjunction with the QUIT <USERNAME> command, $USER-BUFF and APPLICATION mode, to allow parameter passing from one INFO user name (or directory) to another. The contents of $PARAMETERS are only initialized at INFO invocation and are retained between INFO user names when used as described. See
Appendix N ‘Application Mode’
$PI
Contains the value of PI accurate to 12 decimal places:
3.141592653590
$PRINTER-NAME
Read only
$PRINTER-NAME is 32 characters long and contains the name of the currently open print file.
$PRINTER-SIZE
default = 132
$PSPRO
(VMS only) set = (configurable)
You can set the value of $PRINTER-SIZE to specify the column width of your system printer between 0 and 200.
You can set this system item with the CALCULATE command.
Default = 1
Set = 0
When $PSPRO is set to 1 (the default), INFO will attempt to preserve the protection on the SELECTed file when it creates the resultant file for PURGE and SORT. If the user does not have sufficient privilege to create a file with the same privilege as the SELECTed file, INFO will create the new file with default protection. If $PSPRO is set to 0,
INFO will simply create the new file with default protection.
INFO Reference Manual Appendices A-35
System Items
Appendix D
$PURGE-LOCAL
Default = 0
Set = 1
If set to 1 and you are in ADIR mode, purging a nonexternal datafile will create the new DAT locally.
$RECNO
Read only
$RECNO contains the number of the last record read from the selected file. You cannot change the value of this system item.
$RELREC1 through
$RELREC9
Read only
The nine system items $RELREC1 through $RELREC9 contain the number of the record that INFO is processing currently in each of the corresponding related files.
$RELREC1 holds the number of the record in the first related file, $RELREC2 in the second, and so on. INFO uses these system items only when processing even-numbered program sections.
$REPCOL1 through
$REPCOL20
$REPDAT
The twenty system items $REPCOL1 through
$REPCOL20 contain the last value printed in an INFO report in that report's columns 1 through 20, respectively.
Each $REPCOL item is set to 0 before the report is printed.
You can change the values of these system items, but be aware that INFO assigns values to these items
(overwriting any values that you have assigned) when you execute a report, as discussed above.
These items may also be referenced by the array item
$REPCOL (occurs 20, indexed by $IDX2)
$REPDAT contains the date used when executing a report. $REPDAT is initialized to $TODAY when you start your INFO session. You can use the CALCULATE command to assign $REPDAT to another date in the format mm/dd/yy, where mm is the number of the month, dd is the number of the day, and yy is the last two digits of the year (for instance, enter CALCULATE $REPDAT =
09/22/96).
A-36 Appendices INFO Reference Manual
Appendix D
System Items
$REPTOT1 through
$REPTOT64
$RETRY
$REPEAT will not be replaced throughout an INFO session as $TODAY is.
INFO uses the 64 system items $REPTOT1 through
$REPTOT64 to contain the values, subtotals and grand totals generated during execution of an INFO report. You can display any of these 64 system items by referencing each item either as an element of the arrayed system item named $REPTOT, indexed by the value of $IDX2, or as individual system items named $REPTOT1, $REPTOT2, and so on.
For instance, DISPLAY $REPTOT11 gives the same results as the command CALCULATE $IDX2 = 11 followed by DISPLAY $REPTOT.
You can change the values of these system items, but be aware that INFO assigns values to these items, overwriting any values that you have assigned, when you execute a report as discussed above.
Default = 6
Set = (configurable)
Used only with the INPUT FORM command, $RETRY enables you to change the maximum error count that
INFO will allow before asking
DO YOU WANT TO TRY AGAIN?.
Do not set $RETRY = 0, as you will be prompted for the error prompt before data entry to each field.
$SCIENTIFIC-DISP Default = 0
note
Set = 1
Set = 2
Display F-type numbers as decimals.
Display very small F-type numbers as exponentials.
Display all F-type numbers as exponentials.
Small F-type numbers for setting 1 apply to numbers less than 0.0004 or greater than -0.0004.
INFO Reference Manual Appendices A-37
System Items
Appendix D
$SCREEN WIDTH Default = 80
To list/display the items of a record on 1 line (with wraparound), $SCREEN-WIDTH must be set to a value equal to or greater than (maximum 4096) the following: x + y + 9 where x = the sum of the output width of each item or the length of its item name, whichever is the greater.
where y = the number of items being displayed (to allow for 1 space between each item + 1 space for column 1 of the screen) where 9 = characters required for $RECNO to be displayed.
example:
Datafile
ITEM1
ITEM2
ITEM3
ITEM4
4,4,C
8,9,N,2
1,1,C
50,50,C x = 5 + 9 + 5 + 50 = 69 y = 4
Therefore $SCREEN-WIDTH needs to be set to
69 + 4 + 9 = 82 or greater to list/display all the items on one line.
$SECTION
Read only
The $SECTION system item indicates the current mode of
INFO processing. $SECTION contains one of the following values: n
0 indicates INFO is processing an interactive session n
1 indicates INFO is processing an odd-numbered section n
2 indicates INFO is processing an even-numbered section
$SECS
Read-only item
Displays the seconds element of $TIME
A-38 Appendices INFO Reference Manual
Appendix D
System Items
$SEQ-REC-FORMAT (alternate name $RFM)
(VMS only) Default = 0
Set = 1, 2, 3
This variable specifies the format of sequential files created by SAVE COMPRESS INIT and OUTPUT INIT and corresponds to the FDL attribute RECORD FORMAT.
$RFM has four values, the default being 0, and each value will set the record format of the new file as follows:
0 Variable length, maximum 1000 bytes (SAVE) or 200 bytes (OUTPUT)
1 Stream, maximum 4096 bytes (SAVE) or 200 bytes
(OUTPUT)
2 Stream_CR, maximum 4096 bytes (SAVE) or 200 bytes
(OUTPUT)
Warning
3 Stream_LF, maximum 4096 bytes (SAVE) or 200 bytes
(OUTPUT)
See the VAX/VMS Record Management Services manual for more information
These settings remain during your current INFO session so subsequent operations will inherit these settings unless you explicitly set the value back to default
$SET1NOSEL
(Unix and VMS)
Default = 0
Set = 1
Pre-revision 9.64 of INFO, if the following commands were issued :
SEL
Isam-file DYNAMIC
SET 1
$NOSEL was returned with the value of 1 if there were any records in the file.
From revision 9.64, this changed so that $NOSEL = 0.
However, to emulate previous versions of INFO,
$SET1NOSEL should be set to 1.
INFO Reference Manual Appendices A-39
System Items
$SETMAX
Appendix D
Read only
Contains the number of the highest record in the currently selected set. To use this system item, first use the
CALCULATE command to set the value of $IDX2 to 1 if the selected file is non-ISAM or to the ISAM set whose highest record number you want to find: 1 for ISAM set 1,
2 for ISAM set 2,... etc The following program fragment displays the highest record number in ISAM set 2:
.
.
20004 CALCULATE $IDX2 = 2
20005 DISPLAY $SETMAX
.
If you use the SELECT command with the DYNAMIC option, the value of $SETMAX for ISAM set 1 (the full selected set) is zero until you have executed a command that starts reading the records in the set (an ‘active command’).
If you have used the LIMIT command to establish a global search criterion for the selected ISAM file, the initial value of $SETMAX will be zero if no records in the file meet the specified condition, or 1 if at least one record does. If more than one record meets the condition, $SETMAX will be incremented as the records are read.
A-40 Appendices INFO Reference Manual
Appendix D
System Items
$SETMIN
Read only
Contains the number of the lowest record in the currently selected set. To use this system item, first use the
CALCULATE command to set the value of $IDX2 to 1 if the selected file is non-ISAM or to the ISAM set whose highest record number you want to find: 1 for ISAM set 1,
2 for ISAM set 2 etc. The following program fragment displays the highest record number in ISAM set 3:
.
.
20004 CALCULATE $IDX2 = 3
20005 DISPLAY $SETMIN
.
$SHORT-NAME
INFO constructs the 3-character contents of $SHORT-
NAME from the first, second and fourth characters in
$USER-NAME when your INFO session begins. ($USER-
NAME is described below.) If $USER-NAME contains three characters only, $SHORT-NAME contains only those three characters.
$SINGLE-DETAIL Default = 0 REPORT will create a summary/sub-total line for a single detail.
$SNREC
Set = 1 REPORT will not generate a sub-total for a single detail.
Read only
$SNREC contains the number of the record being processed currently in the selected, or any related, data file. To use this system item, first use the CALCULATE command to set the value of $IDX2 to an appropriate value (from 1 to 10) for the data file you want to reference:
1 for the selected data file, 2 for the first related data file, 3 for the second related data file, and so on. The following program fragment displays the number of the record currently being processed in the selected data file.
INFO Reference Manual Appendices A-41
System Items
Appendix D
.
.
.
20004 CALCULATE $IDX2 = 1
20005 DISPLAY $SNREC
.
See the discussion of $RELREC1 through $RELREC9 for information about an alternate method you can use to determine the number of the current record being processed in a related data file.
$SUSPEND-SECKEYS
(Prime only) Default = 0
Set = 1
The default value is 0 and treats secondary keys of Midas files as per Rev. 9.6 specification: n
If you alter a primary key, that primary key and any secondaries will be deleted and re-inserted, unlike 9.42
which deleted and re-inserted the primary key, but only reinserted the secondaries, leaving the old ones suspended and leaving them there until an MPACK was performed.
n
If you alter a secondary key, that secondary key is deleted and re-inserted, leaving all other keys untouched, unlike
9.42 which deleted and re-inserted the primary key and reinserted the secondary keys, leaving the old ones suspended and waiting for an MPACK to delete them.
n
If you PURGE any records, ALL keys are deleted, whereas under 9.42 only the primary key is deleted , leaving all the secondaries suspended until an MPACK deletes them.
If you set $SUSPEND-SECKEYS = 1, the following differences will be observed: n delete primary key: the primary key is deleted and reinserted, the secondaries are re-inserted, leaving the old ones suspended and needing an MPACK to delete them, as in 9.42.
A-42 Appendices INFO Reference Manual
Appendix D
System Items
n delete secondary key: the secondary in question is deleted and re-inserted, the same as with the variable set to 0.
$SVIDEL
(VMS only)
Default = 1
Set = 0
If set to 1, SAVE INIT and OUTPUT INIT will delete all existing versions of the named file and create version 1.
If set to 0, SAVE INIT and OUTPUT INIT will create a new version of the named file.
$SWITCH-DEFAULT
(Unix and VMS) Default = 0
Set = 1
The default settings of $DOPS2 and $SINGLE-DETAIL changed in revision 9.6 : to emulate pre-9.6 processing with regard to these two variables, $SWITCH-DEFAULT should be set to 1.
$SYS-RETURN-CODE Read only
Returns error code from SORT/MERGE
$TIME
Read only
$TIME contains the current time, in the format: hh:mm:ss, where hh is the hour, mm the minutes and ss the seconds.
The value of $TIME is updated each time an interactive command is processed and each time a command is executed in a program.
$TIME-FLAG
$TIME-FLAG specifies whether or not INFO displays the current time with each ENTER COMMAND > prompt.
(See the TIME command for an alternate method of controlling the time display.) You can use the
CALCULATE command to give $TIME-FLAG one of the following values: n
0 (the default) directs INFO not to display the time with each ENTER COMMAND > prompt.
n
1 directs INFO to display the time with each ENTER
COMMAND > prompt, in the following format:
INFO Reference Manual Appendices A-43
System Items
Appendix D
$TODAY
$TTYOFF
(VMS only) hh:mm:ss ENTER COMMAND > where hh is the hours, mm the minutes and ss the seconds.
Read only
$TODAY contains today's date. The date is displayed in the format specified by the DFMT command. (See the
DFMT command for information about formatting dates.)
Default = 0
Set= 1
If set to 0, the default, output is directed to the screen. If set to 1, output to the screen is turned off. This variable runs in parallel with the INFO commands COMO -TTY, which sets $TTYOFF = 0, and COMO -NTTY, which sets
$TTYOFF = 1.
$UPF-NC
Default = 0
Set = 1
If set to 0, UPF (IPF in even program sections) will automatically clear the screen unless the NC option is specified; this makes it consistent with the way IPF behaves. If set to 1, INFO will emulate pre-9.6 versions of
INFO in that UPF will not clear the screen unless either it contains a 0,0 co-ordinate as the first entry or it is preceded by a DISP= statement.
$UPDCOL, $UPDROW Default values 1,1
set = (configurable)
For use with UPDATE by <field> WITH IPF; user settable variables for the column and row for the <field> prompt.
$USER-BUFF
A 320 character redefinition over the $CHR1...40 variable work space. (Note that it also includes $NUM1...40 and
$DAT1...40 as they share the same space).
It allows the initialization of the complete buffer or, when used with the $PARAMETERS and QUIT <USERNAME> facility, will allow the complete default variable space to be
A-44 Appendices INFO Reference Manual
Appendix D
System Items
$USER-BUFF (cont’d) saved off, passed through to a different INFO username and re-instated.
$USER-PATH
$USER-NAME
Please note that the FORMATs of the variables will be reinitialized to the default in this instance, so custom formats will have to be re-established, unless used in conjunction with MODE SET FORMAT to save and reset the internal variable format settings.
Contains the pathname of the DR9 but excluding the DR9 file name (particular use with Application mode).
$USER-NAME contains the name of the current user, obtained from the response to the last ENTER USER
NAME>
prompt.
$USERNAME
$USERNUM
Holds login name.
Holds current Process Identification Number
$UTCMSG
(VMS only)
Default = 0
Set = 1
An error message, 'UNABLE TO CREATE NEW FILE' informs users of the potential failure of certain functions which create new files (e.g. the PURGE of an entire ISAM when they do not have write access to the directory in which they are working although they have write access to the file they are working on). Note that this message would also appear if the new file could not be created because of a disk full condition or any other RMS error which caused the failure. To get this message, the user must CALC $UTCMSG = 1 ($UTCMSG is 0 by default).
$WORK-BUFFER (alternate name $GGR-BUFFER)
2048 bytes of extra storage for user's use, redefined on differing offsets for each category, and all indexed by
$IDX2:
INFO Reference Manual Appendices A-45
System Items
Appendix D
$WORK-BUFF
$WORK-CHR
$WORK-NUM
$WORK-INT
128,C
8,C
8,N,2
8,I occurs 16 indexed by $IDX2 occurs 64 indexed by $IDX2 occurs 64 indexed by $IDX2 occurs 64 indexed by $IDX2
$WORK-BIN
2,5,B occurs 64 indexed by $IDX2.
$WORK-FLOAT
8,15,F occurs 48 indexed by $IDX2
The total work space is initialized to <blanks> or spaces on entry to INFO. The individual numeric types have to be initialized before use. See end of Appendix D for more information
$WRITE-LOCK
(Prime only) default = -1 set = 0, 1, 2, 3
$WRITE-LOCK determines the read-write access level for data files. You can assign values to $WRITE-LOCK with the CALCULATE command. To associate a new value for
$WRITE-LOCK with a data file, reselect the selected set of records to 0 and then issue a PURGE command. Valid values are: n
-1 (the default value) directs INFO to use the existing file’s read-write protections.
n
0 directs INFO to accept the system READ-WRITE access level setting n
1 allows multiple users to have read-only access or one user to write to the selected data file, but not both n
2 allows multiple users to have read-only access and one user to write to the selected data file n
3 allows multiple users to have read/write access to the selected data file
A-46 Appendices INFO Reference Manual
Appendix D
System Items
$YEAR
Read Only
$YEAR contains the value of the current year. This is the same value contained in the year field in the system item
$TODAY.
$ZDATE
Default = 0
Set = 1
If set to 1 date fields are displayed and printed with leading zeroes instead of spaces for day and month values less than 10. Also, when date items are EXPORTed, any days with a value of less than 10 will have a leading zero instead of a space. (EXPORT outputs dates in military format excepting the CSV format).
$WORK-BUFFER
$WORK-BUFFER provides an additional workspace of
2048 characters for the user. They have been preset to give the best overall advantage of speed, ease of use and of space. They can be used as supplied or they may be amended by the customer’s own System Administrator for their own specific requirements.
How the BUFFER is set up
$WORK-BUFFER 2048,C
This is divided into 16 variables, each of 128 bytes :
$WORK-BUFF(1 - 16) 128,C 2048 chars in total
These variables are further divided into the following :
Variable size occurs relative position
$WORK-CHR
$WORK-NUM
$WORK-INT
$WORK-BIN
$WORK-FLOAT
note
8,C
8,N,2
8,I
2,5,B
8,15,F
64
64
64
64
48
$WORK-BUFF(1 - 4)
$WORK-BUFF(5 - 8)
$WORK-BUFF(9 - 12)
$WORK-BUFF(13)
$WORK-BUFF(14 - 16) n
When using these variables, remember that some of them occupy the same part of the buffer :
INFO Reference Manual Appendices A-47
System Items
Appendix D
e.g.
$WORK-BUFF(1) occupies the same space as
$WORK-CHR(1 - 16) e.g.
$WORK-BUFF(16) occupied the same space as
$WORK-FLOAT(33 - 48)
ACTIVE / NON-ACTIVE
The system_items $WORK-CHR, $WORK-NUM, etc. do not work in the same way as the system_variables $CHR and $NUM. These items are not active variables : i.e.
CA $WORK-NUM1 = $WORK-NUM1 + 1 interactively or in an odd program section the command will be executed only once, no matter how many records are selected, unlike $NUM, which would be executed once for each record in the working set.
REFORMATTING
These working variables, $WORK-BUFF etc, cannot be formatted via the FORMAT command. It is possible to redefine them by adding entries to the info9nit file - these will become “world wide” unless local info9nit files are used. You must be careful about offsets, types, etc., and be aware how the 2048 byte space is allocated to avoid the problems of overlapping.
A-48 Appendices INFO Reference Manual
Appendix E
Screen Attribute Settings
Accept, Display and Error Message Attribute Settings
It is possible to set up field attributes for cursor-addressed
ACCEPT and DISPLAY commands, IPF-style accept and display commands, and default or IPF user-supplied error messages.
This is achieved by enabling some control variables and by initialising display variables to attribute settings. See the table Accept and Display Attribute Settings on the following page.
INFO Reference Manual Appendices A-49
Screen Attribute Settings
Appendix E
Accept and Display Attribute Settings Table
$DISPLAY-MODE
0
ACCEPT AT
1
Using the attribute preference settings, fields can comprise the following components
Display
$ACC-ATTRIBUTE
$ACCEPT-FILL=0
$ACCEPT-FILL=1
Left delimiter
+attribute
Data or fill-char
+attribute
Right delimiter
+attribute
Accept
Data
+attribute n/a
Any string used to set attributes on ACCEPT n/a
Display field contents at row, col before ACCEPT n/a
Display $ACCEPT-FILL-CHAR at row,col before
ACCEPT
Input Forms will:
New Record Display fill character on fields not yet entered
Old Record (i.e. update) Display data field
$ACCEPT-FILL-CHAR n/a Any character to be displayed across the field width on an ACCEPT
$LEFT-DELIMITER n/a
Any character used as a left delimiter for an accept field. Displayed at row,col - 1.
$RIGHT-DELIMITER
$DELIM-ATTRIBUTE n/a Any character used as a left delimiter for an accept field. Displayed at row,col + width of item + 1.
n/a
Any attributes associated with the delimiters
.
A-50 Appendices INFO Reference Manual
Appendix E
Screen Attribute Settings
Accept and Display Attribute Settings Table (continued)
$DISPLAY-MODE
0 1
DISPLAY AT
$DISP-ATTRIBUTE n/a Field is displayed with this user specified attribute
ERROR-MESSAGES
$MESS-ATTRIBUTE n/a
Default and user-defined error messages (Input Form format only), will be displayed with this attribute.
ALL MESSAGES
$RESET-ATTRIBUTE n/a If any of the above attributes are set this field must be set to return the screen to its normal mode.
It is assumed that any attribute settings will not occupy screen positions and therefore changes to the bulk of existing applications will not be necessary in order to enable these facilities.
There is no change in the INFO command syntax and so these attribute preferences can be used on existing systems by setting them up in the info.cfg configuration file. (See Appendix Q ‘Configuration files’) They apply to the program commands ACCEPT AT, DISPLAY AT, and the Input Form equivalents, i.e. row,col,item and row,col,item,D.
INFO Reference Manual Appendices A-51
Screen Attribute Settings examples
Appendix E
FORMAT $NUM1,6,I
$DISPLAY-MODE = 1
$DISP-ATTRIBUTE = $UNDERLINE
$ACC-ATTRIBUTE = $REVERSE
$RESET-ATTRIBUTE = $NORMAL
$NUM1 = 100
DISPLAY AT 10,10 'Enter Value:'
ACCEPT AT 10,24 $NUM1 will produce
Enter Value: 100
where the field content will be displayed with the display attribute prior to the accept
Alternatively
FORMAT $NUM1,6,I
$ACCEPT-FILL = 1
$ACCEPT-FILL-CHAR = '.'
DISPLAY AT 10,10 'Enter Value:'
ACCEPT AT 10,24 $NUM1 produces
Enter value: ......
where the fill character (default blank) will be displayed prior to the accept
or
FORMAT $NUM1,6,I
$LEFT-DELIMITER = '['
$RIGHT-DELIMITER = ']'
DISPLAY AT 10,10 'Enter Value:'
ACCEPT AT 10,24 $NUM1 produces
Enter value: [ ]
A-52 Appendices INFO Reference Manual
Appendix E
Screen Attribute Settings
Input Form Preference Settings
It is possible to modify the default Input Form prompts and responses via the control variables outlined in the following table. In addition INFO programmers may ascertain which command was used to invoke the Input
Form with which options and which 'end-of-form' response was entered.
It is also possible to automatically Quit an Input Form on detection of a locked Isam record and to display a userdefined message.
$IPF-COMMAND
$IPF-PROMPT
$IPF-YES
$IPF-NO
$IPF-QUIT
$IPF-LEAVE
$IPF-EXIT
$IPF-ANSWER
$IPF-NC
$IPF-LN
$IPF-AY-AL
4 character item set during the execution of the Input
Form to the command that was used to invoke the form:
‘INPU’ = Input Form,
‘UPDA’=Update... with Input Form,
‘UPFO’=UPF, ie Even Program Section Command.
End of Input Form prompt (up to 78 characters) to replace
IS THIS RECORD ACCEPTABLE (Y,N,Q,L, or E)>.
Single character alternative to the ‘Y’ response.
Single character alternative to the ‘N’ response.
Single character alternative to the ‘Q’ response.
Single character alternative to the ‘L’ response.
Single character alternative to the ‘E’ response.
Numbers between 1 - 5 corresponding to the Input Form answer where 1 = ‘Y’, 2 = ‘N’, 3 = ‘Q’, 4 = ‘L’, 5 = ‘E’
Read only item. Set to 1 means the NC option was used.
Read only item. Set to 1 means the LN option was used
Read only item. Set to 1 means the AY or AL options were used
CONCURRENCY
$IPF-QUIT-ON-LOCK
$IPF-QUIT-MESSAGE
If set to 1, on detection of a Lock, will ‘Q’ the Input Form.
If set, will be displayed on QUIT-ON-LOCK condition (up to 80 characters)
INFO Reference Manual Appendices A-53
Screen Attribute Settings
Appendix E
ANSI Variables
Slave Printing
$PRT.ON.SCRN.OFF Printer on, screen off, - Enable buffered transparent print
$PRT.OFF.SC.BK.ON Printer off, screen back on, - Disable buffered transparent print
$PRT.ON.SCRN.ON
Printer on, screen on, - Enable auto line print mode.
$PRT.OFF.SC.LF.ON Printer off, screen left on, - Disable auto
$PRT.PAGE
Page print - screen dump current screen display to printer
Control Codes
$NULL
$SOH
$STX
$ETX
$EOT
$ENQ
$ACK
ASCII hex(00), <Ctrl><@>, Null character
ASCII hex(01), <Ctrl><A>, Start of header
ASCII hex(02), <Ctrl><B>, Start of text
ASCII hex(03), <Ctrl><C>, End of text
ASCII hex(04), <Ctrl><D>,
ASCII hex(05), <Ctrl><E>,
$BEL
$BS
$HT
$LF
$VT
$FF
$CR
$SO
ASCII hex(06), <Ctrl><F>, acknowledgement. Usually sent by the terminal to the computer to indicate page print or some local functions finished.
ASCII hex(07), <Ctrl><G>, sound the terminal's bell
ASCII hex(08), <Ctrl><H>, back-space
ASCII hex(09), <Ctrl><I>, horizontal tab
ASCII hex(0A), <Ctrl><J>, line-feed
ASCII hex(0B), <Ctrl><K>, vertical-tab or line-feed
ASCII hex(0C), <Ctrl><L>, form-feed or line-feed
ASCII hex(0D), <Ctrl><M>, carriage-return
ASCII hex(0E), <Ctrl><N>,
A-54 Appendices INFO Reference Manual
Appendix E
Screen Attribute Settings
Control Codes (cont’d)
$SI ASCII hex(0F), <Ctrl><O>,
$DLE
$DC1
$DC2
$DC3
ASCII hex(10), <Ctrl><P>, break
ASCII hex(11), <Ctrl><Q>, send data to computer or terminal (X-ON in x-on, x-off protocol)
ASCII hex(12), <Ctrl><R>,
$DC4
$NAK
$SYN
$ETB
$CAN
$EM
$SUB
$ESC
$FS
$GS
$RS
$US
$DEL
$CSI
ASCII hex(13), <Ctrl><S>, stop sending data to computer or terminal (X-OFF in x-on, x-off protocol).
ASCII hex(14), <Ctrl><T>
ASCII hex(15), <Ctrl><U>
ASCII hex(16), <Ctrl><V>
ASCII hex(17), <Ctrl><W>
ASCII hex(18), <Ctrl><X>
ASCII hex(19), <Ctrl><Y>, end of message
ASCII hex(1A), <Ctrl><Z>
ASCII hex(1B), <Ctrl><[>, escape
ASCII hex(1C), <Ctrl><\>
ASCII hex(1D), <Ctrl><]>
ASCII hex(1E), <Ctrl><^>
ASCII hex(1F), <Ctrl><_>
ASCII hex(7F), delete
Control Sequence Introducer, equates to characters,
Esc[, but known as CSI
INFO Reference Manual Appendices A-55
Screen Attribute Settings
Appendix E
Basic cursor movements
These commands move the cursor within its current line or column. They cannot cause data to scroll the screen. The cursor stop at the margins of the display or the defined scrolling region; it does not wrap around.
$CURSOR.UP Cursor up $CURSOR.UP.PN line(s) or row(s)
$CURSOR.DOWN Cursor down $CURSOR.DOWN.PN line(s) or row(s)
$CURSOR.RIGHT Cursor right $CURSOR.RIGHT.PN character position(s) or column(s)
$CURSOR.LEFT Cursor left $CURSOR.LEFT.PN character position(s) or column(s)
$CURSOR.UP.PN
These items are redefinitions of the numeric portion of the
$CURSOR.(UP,DOWN,RIGHT,LEFT) variables. They correspond to the decimal value specifying the number of cursor position moves in the appropriate direction:
Default value 0, range 0-99
$CURSOR.DOWN.PN
$CURSOR.RIGHT.PN
$CURSOR.LEFT.PN
$ADDRESS.CURSOR
Default value 0, range 0-99
Default value 0, range 0-999
$CURSOR.LINE.PN
$CURSOR.COLUMN.PN
Default value 0, range 0-999
Address the cursor to line and column, using
$CURSOR.LINE.PN for absolute line or row, and $CURSOR.COLUMN.PN for row or column.
Default value 1, range 0-99
Default value 1, range 0-999
A-56 Appendices INFO Reference Manual
Appendix E
Screen Attribute Settings
Cursor Addressing within scrolling region
If you have defined a scrolling region and turned on origin mode, cursor addressing lines start at the top of the scrolling region and you cannot address the cursor outside the scrolling region. If origin mode is off, the cursor can move within the entire display.
$CURSOR.HOME Move the cursor to home position, i.e. line 1, column 1 of the display or the scrolling region
$LINE.FEED
Line feed
$REVERSE.LF
$CR.LF
Reverse line feed
Carriage-return line feed
Editing data
$ERASE.TO.EOL
Erase from cursor to end of line
$ERASE.L.CURSOR Erase start of line up to and including cursor
$ERASE.CURSOR.LN Erase entire line
$ERASE.TO.EOS
Erase from cursor to end of screen
$ERASE.HOME.TO.C Erase home position up to and including cursor
$ERASE.SCREEN Erase entire screen
$DEL.R.TO.CURSOR Delete $DEL.R.TO.CSR.PN characters to the right of the cursor. The cursor does not move.
$DEL.R.TO.CSR.PN
Default 0, range 0-999
$INS.LINES
$INS.LINES.PN
Insert $INS.LINES.PN above the cursor line, and resets the line attribute. Lines pushed off the page or scrolling region are lost
Default 0, range 0-99
$DEL.LINES
$DEL.LINES.PN
Delete $DEL.LINES.PN from, and including, the cursor line, and resets the line attribute.
Default 0, range 0-99
INFO Reference Manual Appendices A-57
Screen Attribute Settings
Appendix E
Editing data (cont’d)
$INSERT.MODE
$REPLACE.MODE
Character insert mode. Entering new data pushes existing data on the cursor line to the right. Excess data drops from the end of the line.
Character replace or over-type mode. New data overwrites existing data.
Enable block mode
Enable conversational mode
$EDIT.MODE
$NORMAL.MODE
$AUTO.WRAP.ON
Autowrap mode on. The cursor wraps from the end of one line to the start of the next line during data entry.
$AUTO.WRAP.OFF Autowrap mode off. The cursor stops at the end of a line. Each character you enter at the end of a line writes over the previous character without advancing the cursor to the next line.
Screen appearance
$SET.ATT.OFF Set all visual attributes off. (Alternate Name
$NORMAL)
$SET.ATT.ALT
Full intensity (when character intensity is half).
(Alternate Name $BOLD)
$SET.UNDERLINE Underlined. (Alternate Name $UNDERLINE)
$SET.BLINK
$SET.REVERSE
$SEL.80
Blinking. (Alternate Name $BLINK)
Reverse video. (Alternate Name $REVERSE)
$SEL.INVERSE.SCRN Light background.
$SEL.NORMAL.SCRN Dark background.
$SEL.132 Clears screen, and puts terminal into 132 column mode.
Clears screen, and puts terminal into 80 column mode.
A-58 Appendices INFO Reference Manual
Appendix E
Screen Attribute Settings
Screen appearance
(cont’d)
The following line attributes affect all current characters on the cursor line and any entered on that line after you change the attribute. Line attributes affect only the cursor line.
$DBL.H.SGL.W.TOP
Define the cursor line as the top half of doubleheight/single-width characters, (not available on all terminals).
$DBL.H.SGL.W.BOT
Define the cursor line as the bottom half of doubleheight/single-width characters, (not available on all terminals).
$DBL.H.DBL.W.TOP
Define the cursor line as the top half of doubleheight/double-width characters.
$DBL.H.DBL.W.BOT
Define the cursor line as the bottom half of doubleheight/double-width characters.
$SGL.H.SGL.W
Define the cursor line as single-height/single-width characters.
$SGL.H.DBL.W
Define the cursor line as single-height/double-width characters.
Character Graphics
$SEL.CH.GRAPHICS
Put terminal in graphics mode.
$SEL.ASCII
Put terminal in ASCII mode.
INFO Reference Manual Appendices A-59
Screen Attribute Settings
Appendix E
The following items are used in conjunction with
$SEL.CH.GRAPHICS, and will display one character graphic symbol each time the character is displayed. On completion of the display of character graphics, displaying
$SEL.ASCII will return the terminal to character mode.
The items, with $SEL.CH.GRAPHICS displayed, correspond to character display symbols and keyboard lower-case characters.
Miscellaneous Symbols
$DIAMOND
ASCII <'>, diamond symbol
$CHECKERBOARD
$HORIZONTAL.TAB
$FORM.FEED.SYM
$CARR.RTN.SYM
ASCII <a>, checkerboard symbol
ASCII <b>, horizontal tab symbol
ASCII <c>, form-feed symbol
ASCII <d>, carriage-return symbol
$LINE.FEED.SYM
$DEGREE
$PLUS.MINUS.SYM
$NEWLINE.SYM
ASCII <e>, line-feed symbol
ASCII <f>, degree symbol
ASCII <g>, plus over minus symbol
ASCII <h>, newline symbol
$VERTICAL.TAB
ASCII <i>, vertical tab symbol
$VERTICAL.BAR.SYM
ASCII <x>, vertical bar symbol
$LT.OR.EQ.SYM
$GT.OR.EQ.SYM
ASCII <y>, less than or equal to symbol
ASCII <z>, greater than or equal to symbol
$PI.SYM
$NE.TO.SYM
$UK.POUND
$CENTERED.DOT
ASCII <{>, pi symbol
ASCII <|>, not equal to symbol
ASCII <}>, UK pound symbol
ASCII <~>, centered dot symbol
A-60 Appendices INFO Reference Manual
Appendix E
Screen Attribute Settings
Line Graphics Symbols
$LOW.RIGHT.SYM
ASCII <j>, lower right right-angle symbol
$UP.RIGHT.SYM
$UP.LEFT.SYM
ASCII <k>, upper right right-angle symbol
ASCII <l>, upper left right-angle symbol
$LOW.LEFT.SYM
ASCII <m>, lower left right-angle symbol
$CROSS.LINE.SYM
ASCII <n>, horizontal and vertical line crossing in the center symbol
$HZ.LINE1.SYM
$HZ.LINE3.SYM
$HZ.LINE5.SYM
$HZ.LINE7.SYM
$HZ.LINE9.SYM
$LEFT.T.SYM
$RIGHT.T.SYM
$BOTTOM.T.SYM
$TOP.T.SYM
ASCII <o>, horizontal line in pixel line 1 symbol
ASCII <p>, horizontal line in pixel line 3 symbol
ASCII <q>, horizontal line in pixel line 5 symbol
ASCII <r>, horizontal line in pixel line 7 symbol
ASCII <s>, horizontal line in pixel line 9 symbol
ASCII <t>, vertical center line with horizontal line joining from the center to the right
ASCII <u>, vertical center line with horizontal line joining from the center to the left
ASCII <v>, horizontal line in pixel line 9 joining at the center to vertical line symbol
ASCII <w>, horizontal line in pixel line 1 joining at the center to vertical line symbol
INFO Reference Manual Appendices A-61
Screen Attribute Settings
Appendix E
Terminal Mode Settings
$SEL.ANSI.MODE
Select ANSI mode
$SEL.VT52.MODE
Select VT52 mode
$TERM.ID.REQUEST
Send the terminal ID back to host
$TERM.RESET
Reset terminal to power-on (non-volatile memory) values
$CURSOR.POS.RQST Send current cursor position to host
$SAVE.CURSOR
Save the cursor position ; saves the cursor position, character set, visual and selective erase attributes, and origin mode in current memory. When you reset the terminal, the cursor description returns to nonvolatile memory values
$RESTORE.CURSOR
Returns the cursor to the saved position and characteristics. If the cursor description was not previously saved, the cursor moves to home position and the other description values reset to non-volatile settings.
Keyboard
$LOCK.KEYBOARD
$UNLOCK.KEYBOARD
$CURSOR.KEYS.APPL
$CURSOR.KEYS.NRML
$NUMERIC.MODE
$APPLIC.MODE
$APP.COMMA
$APP.MINUS
$APP.PERIOD
$APP.ENTER
Lock the keyboard.
Unlock the keyboard.
Application cursor key mode.
Normal cursor key mode.
Numeric pad enabled for numeric mode.
Numeric pad enabled for applications mode.
Application mode keyboard sequence returned to the host for comma <,>
Application mode keyboard sequence returned to the host for minus <->
Application mode keyboard sequence returned to the host for period <.> (full-stop)
Application mode keyboard sequence returned to the host for <enter>
A-62 Appendices INFO Reference Manual
Appendix E
Screen Attribute Settings
Keyboard
(cont’d)
$APP.ZERO
$APP.ONE
$APP.TWO
$APP.THREE
$APP.FOUR
$APP.FIVE
$APP.SIX
$APP.SEVEN
$APP.EIGHT
$APP.NINE
$APP.PF1
$APP.PF2
$APP.PF3
$APP.PF4
Application mode keyboard sequence returned to the host for zero <0>
Application mode keyboard sequence returned to the host for one <1>
Application mode keyboard sequence returned to the host for two <2>
Application mode keyboard sequence returned to the host for three <3>
Application mode keyboard sequence returned to the host for four <4>
Application mode keyboard sequence returned to the host for five <5>
Application mode keyboard sequence returned to the host for six <6>
Application mode keyboard sequence returned to the host for seven <7>
Application mode keyboard sequence returned to the host for eight <8>
Application mode keyboard sequence returned to the host for nine <9>
Application mode keyboard sequence returned to the host for program function key 1 <PF1>
Application mode keyboard sequence returned to the host for program function key 2 <PF2>
Application mode keyboard sequence returned to the host for program function key 3 <PF3>
Application mode keyboard sequence returned to the host for program function key 4 <PF4>
INFO Reference Manual Appendices A-63
Screen Attribute Settings
Appendix E
Scrolling
$CH.SCROLL.REG
Change the scrolling region. Set the redefined items
$CH.SCROLL.TOP.PN for top line, and
$CH.SCROLL.BOT.PN for bottom line. Defining a scrolling region moves the cursor to home position.
$CH.SCROLL.TOP.PN Default 1, range 1-24, should be less than or equal to
$CH.SCROLL.BOT.PN
$CH.SCROLL.BOT.PN Default 24, range 1-24, should be equal to or greater than $CH.SCROLL.TOP.PN
$ORIGIN.MODE.ON
Display lines are numbered only in the defined scrolling region. Home position is column 1 line 1 of the scrolling region. You cannot move or address the cursor into a memory-locked area. Each time you set or reset origin mode, the cursor moves to the new home position.
$ORIGIN.MODE.OFF
Line numbers refer to all 24 screen lines, regardless of scrolling region. You still cannot move the cursor out of a scrolling region with the cursor movement keys and commands. However, you can address the cursor to any location on the screen, in or out of the scrolling region. Once you have moved the cursor into a memory-locked area, you can then move it around in the area (and back into the scrolling region ) with the cursor movement keys and commands.
$SMOOTH.SCROLL
Enable smooth scroll mode ; data scrolls smoothly onto the screen, controlled by the terminal.
$JUMP.SCROLL
Enable jump scroll mode ; data scrolls onto the screen at the rate the computer sends it.
A-64 Appendices INFO Reference Manual
Appendix E
Screen Attribute Settings
Extended ANSI
$SET.PROT.NO
$SET.PROT.ALT
Set no protection.
Set protection to alternate character set data.
$SET.PROT.UNDLNE Set protection to data with underline attribute.
$SET.PROT.BLINK
Set protection to data with blink attribute.
$SET.PROT.INVERSE Set protection to data with inverse attribute.
$SET.PROT.NORMAL Set protection to data with normal attributes.
$CLEAR.ALL
Clear protected and unprotected data.
$CLEAR.UNPROTECT Clear unprotected data.
$CURSOR.ON
Select visible cursor.
$CURSOR.OFF
Select invisible cursor.
Color Terminal Foreground and Background Settings
The following variables set the foreground and background color attributes for terminals. For example, to have a red foreground on a magenta background:
DISP $RED-FORE,$MAGENTA-BACK
$BLACK-FORE
$RED-FORE
Black foreground
Red foreground
$GREEN-FORE
Green foreground
$YELLOW-FORE
Yellow foreground
$BLUE-FORE
Blue foreground
$MAGENTA-FORE Magenta foreground
$CYAN-FORE
$WHITE-FORE
Cyan foreground
White foreground
$BLACK-BACK
Black background
$RED-BACK
Red background
$GREEN-BACK
Green background
INFO Reference Manual Appendices A-65
Screen Attribute Settings
Appendix E
Color Terminal Foreground and Background Settings
(cont’d)
$YELLOW-BACK
Yellow background
$BLUE-BACK
Blue background
$MAGENTA-BACK Magenta background
$WHITE-BACK
White background
Customising ANSI Escape Sequences
It is possible to customise the standard ANSI terminal escape sequences by means of a file called info.ansi which is located in the directory pointed to by the external variable _INFOSYS (Unix), INFOSYS (VMS) or
_INFOSYS (Prime). See Appendix G, “Controlling Default
Assignments”.
A-66 Appendices INFO Reference Manual
Appendix F
INFO Internal Files
This Appendix describes the purposes of and the naming conventions for INFO's internal files. These internal files are created by INFO, as needed, in normal processing.
The format of an INFO internal file name is:
xxxnnnext
or xxxext where:
xxx
represents the 3-letter abbreviation of the INFO user name,
nnn
represents the INFO file's 3-digit directory entry number, and
ext
represents the 3-character extension that designates the type of INFO internal file.
INFO Reference Manual Appendices A-67
INFO Internal Files
Appendix F
Internal file File name format
Description
Directory File xxxDR9 The directory file contains entries for all data files, programs, reports, input forms, and special forms identified with an INFO user name. Because the directory file contains binary information, the user should not alter it in any way.
One and only one directory file is created for each INFO user name. Directory files associated with the same INFO user name must exist in separate operating system directories.
The user should consider all INFO files associated with an INFO user name
(including its directory file) as a unit when performing operating system functions such as saving and restoring.
Data Records File xxxnnnDAT The data records file contains the data records for a corresponding INFO data file. The data records file contains fixedlength records, each of which conforms to the item format specified when the user DEFINED the corresponding INFO data file.
If an INFO data file has been made
EXTERNAL, its data records file holds only one record; the record contains the complete operating system file name of the
EXTERNAL file.
Because each record of the data records file must be of a specific length, this file must not be edited by the user.
A-68 Appendices INFO Reference Manual
Appendix F
INFO Internal Files
Internal file
Data Items File
File name format
Description xxxnnnNIT The data items file contains a description of each item defined or redefined for a corresponding INFO data file. Each item description includes information that can be specified using the commands
ALTER, MODIFY, or DEFINE.
Because this file contains binary information, do not modify it.
Source Files for
Programs, Reports,
Input Forms, and
Special Forms xxxnnnSRC An INFO source file is a sequential file which contains the command statements for a corresponding INFO program, report input form, or special form. You can edit INFO source files using the
CHANGE commands or an operating system editor (if proper format is maintained).
INFO decodes source files into corresponding INFO object files, which are executable. An INFO source file is not used when a corresponding INFO object file is executing, except in the case of an INFO program executed using the RUN command with the LIST option.
Object Files for
Programs, Reports,
Input Forms, and
Special Forms xxxnnnOBJ An INFO object file contains the binary form of a corresponding INFO program, report, input form, or special form. Object files are created by INFO when a nondata file is decoded.
An INFO program, report, input form, or special form must have a corresponding object file in order to execute. If an object file does not exist when you first attempt to execute a program, report, input form, or special form, INFO decodes the
INFO Reference Manual Appendices A-69
INFO Internal Files
Internal file
Spool File
Limit File
Index File
(bitmap)
Set File
(bitmap)
Appendix F
File name format
Description corresponding source file and creates the object file, which is then executed.
You must not modify INFO object files.
xxxNSP An INFO spool file is a sequential file containing all the printable output generated (for instance, by PRINT,
REPORT, and so on) since the start of your INFO session, or since the previous
SPOOL (without the SAVE option) command. This file is recreated at the start of each INFO session. Any output information held in the spool file at the start of an INFO session is deleted.
The spool file is not deleted at the end of an INFO session, and can be examined, modified, printed, or deleted outside of
INFO.
xxxnnnLIM The limit file is created when a LIMIT command is in effect. This file can be deleted if its INFO user area is not in use.
The limit file is recreated when the LIMIT command is next used.
xxxnnnNDX The index file contains information that identifies the selected records in a corresponding INFO data file. INFO creates and uses one index file for all ISAM files and each large INFO data file (>16219 records). INFO uses an index file only when its associated data file is selected.
You must not alter the index file in any way.
xxxnnnS## A set file contains information that identifies the records from a selected ISAM file that are referenced in a SET. INFO-Text creates a set file when a RESELECT BY command is used on an Isam file. A set
A-70 Appendices INFO Reference Manual
Appendix F
INFO Internal Files
Internal file
Set File (cont’d)
Stack File
Scratch File
Scratch File
Scratch File
File name format
Description xxxSTK xxxXSC file is similar in format to an INFO-Text index file. The file name’s # represents a value between 02 and 16 that corresponds to the number of the set created.
A set file is used only when its corresponding datafile is selected. If a set file is deleted, the corresponding set is deleted as well.
The NEWMAP command deletes all set files associated with the selected Isam datafile.
The stack file stores information about an
INFO program if that program runs another INFO program. The stack file always exists while INFO decodes a program. If it exists at other times, it can be deleted.
This is a temporary file that can be created by any of a number of INFO commands during an INFO session. It is deleted when the command using it terminates. One such scratch file can exist per INFO directory. If it exists and is associated with an INFO user name that is not executing INFO, it can be deleted.
xxxnnnXSC This is a temporary file also, but is specific to one INFO file rather than to the
INFO directory.
xxxnnnSZC This is a temporary file used during a
SORT command. If it exists at any other time, it can be deleted.
INFO Reference Manual Appendices A-71
INFO Internal Files
Appendix F
Internal file File name format
Description
Scratch File
Concordance File xxxnnnNCO The concordance file contains pointers to all the words in concorded items for extended datafiles. This file is built by the CONCORD command and is used for searching the associated text file using RESELECT command word expressions. If this file is modified outside of INFO-Text, the concordance is broken.
Scratch File xxxnnnSYR This is a temporary file used during a
SORT command. If it exists at any other time, it can be deleted.
xxxnnnNWK This is a temporary file used to hold words during the processing of a CONCORD command. If it exists when a CONCORD is not running, it can be deleted.
Dictionary File
Logical Record xxxnnnNDC The dictionary file contains all the words found in all the concorded items for its associated extended datafile. This file is built by the CONCORD command and should not be modified outside of INFO-
Text.
xxxnnnNLR The LRN file is used to translate the logical record numbers of an extended datafile to its actual physical record numbers.
Concordance entries point to logical record numbers. Under no circumstances should this file be deleted.
A-72 Appendices INFO Reference Manual
Appendix G Controlling Default Assignments
When INFO is not in use, INFO's message file stores several pieces of information, called settings, that are available to you when using INFO. You can change a setting by using one of INFO's setting commands. The table below lists the INFO settings that reside in the INFO message file and the INFO command used to change that setting.
There are three different effects possible when you change an INFO setting. You may change the default values of
INFO settings either for system-wide use, for your individual use and retaining the setting values between sessions, or for your current INFO session. Each of these is described below.
System-wide changes
You can change the system-wide default setting values for the settings in the table below by following the steps below. The new default values apply to all INFO users on your system and are retained across all INFO sessions.
n
Attach to the INFOSYS directory n
Invoke INFO with username RE9 n
Enter an appropriate command (ADIR, ARET, etc.) to define the override setting
INFO Reference Manual Appendices A-73
Controlling Default Assignments Appendix G
Settings stored in the INFO message file
Setting description
Assign alternate directory
Define automatic return feature
Assign control characters (<KEEP>,
<CLEAR>, <TAB>, <BACKTAB>)
<TRUNCATION>
Define current delimiter character
Define date format
Define current lead-fill character
Define terminal characteristics
Command to set individually
ADIR
ARET
CCHR
DELIMITER
DFMT
LCHAR
TERMINAL
Local permanent changes
Local temporary changes see also
You can change default setting values for your individual use by following the steps below. The new setting values apply to your processing across INFO sessions, but can be changed at any time via another INFO setting command.
n
Copy the INFO message file (MESSAGES) into your directory n
Start up INFO n
Enter an appropriate command to define an override setting that is different from the system default
You can make a temporary change to an INFO setting from within a program or interactive session by entering the appropriate INFO setting command to change a setting. The new setting will apply only for the duration of the session (or until the next command to change the setting).You can change settings temporarily, regardless of which copy of the INFO message file is in use.
Appendix Q CONFIGURATION FILES
A-74 Appendices INFO Reference Manual
Appendix H
Topic
Data Delete
Data Entry
Data Retrieval
Data Update
Datafile Create
INFO Reference Manual
INFO Commands by function
Commands Covered
ERASE
ACCEPT
ADDRECS
ADD
CALCULATE
CONCATENATE
EXPAND
PURGE
GET
IMPORT
INPUT FORM
MOVE
SAVE
UPDATE
ASELECT
BOTM
DISPLAY
DSEL
EXPORT
FILL
FIRST
GET
IMPORT
LIST
LIMIT
MERGE
MODE
NEWMAP
NEXT
NSELECT
OUTPUT
ACCEPT
ADD
ATOE
CALCULATE
CCASE
CONCATENATE
ENCODE
EXPAND
GET
JUSTIFY
MOVE
ALTER
DEFINE
EXPORT
POS
PREVIOUS
RELATE
RESELECT
RGET
SELECT
SET
SKIP
SORT
SPOOL
TOP
XGET
XRELATE
XRES
XRGET
XSELECT
NMVE
RECASE
REPLACE
SAVE
SCI
SCPY
SHIFT
STRIP
UPDATE
UPF
ITEMS
MODIFY
REDEFINE
Appendices A-75
INFO Commands by function
Datafile Management
Directory Management
Environment
INFO session commands
INFO variables
Program commands
Reporting
Screen handling and display
Appendix H
ALTER
CWID
DEFINE
DIRECTORY
ERASE
ADIR
CHANGE
COMPILE
COPY
DECODE
DEXT
DIRECTORY
EDIT
ADIR
ARET
CCHR
DELIMITER
QUIT
CLEAR
DINT
FORMAT
CHANGE
COMPILE
DECODE
DO....DOEND
DONE
EDIT
END
ERASE
EXECUTE
FC
FORMS CONTROL
LIST
OUTPUT
BOX
CCHR
CURSOR
DICE
ITEMS
MODIFY
MRED
REDEFINE
SELECT
ERASE
EXTERNAL
FILES
GNAME
PROGRAM
RENAME
TAKE
TYPE
DFMT
LCHR
TERMINAL
STOP
INTERNAL
REFORMAT
MODE
FIRST
GOTO
IF....ENDIF
INKEY
LABEL
REMARK
RUN
SLEEP
REPORT
SPECIAL FORM
FULL
HALF
UBOX
A-76 Appendices INFO Reference Manual
Appendix H
Security
String handling
System Commands
PASSWORD
CCASE
CLAC
ENCODE
EXPAND
JUSTIFY
NMVE
RECASE
.
BROFF
BRON
CATALOG
CNAME
COMINPUT
COMOUTPUT
CPL
CREATE
DAY
DELETE
DIF
DOCDF
DOCIF
DOCRP
DOCSF
DPG
DRP
DSF
ELAPSED
INFO Commands by function
PROTECT
SCI
SCPY
SHIFT
SOUNDEX
SRCH
STRIP
EXST
GETLOG
GTIM
GVGET
GVSET
LOG
MIDAS
MODE SET COND
PHANTOM
PRIF
PRIM
RWLK
SPAWN
STAT UN
SUFFIX
SYSTEM
TIME
USER
WHO
INFO Reference Manual Appendices A-77
AVG
AVGN
AW
AY
BF
BREA
BY
CC
CEIL
CLOS
COMP
ABS
ACCE
ACOS
AD
AL
ALL
AND
APPE
AR
ASIN
AT
ATAN
Appendix I
INFO Reserved Words
INFO RESERVED WORDS
This appendix lists all INFO reserved words that are not command names. When defining or renaming a datafile item using the ALTER, DEFINE, MODIFY, or REDEFINE commands, avoid using these reserved words as datafile item names, otherwise, problems may occur when trying to reference the item in an INFO command which uses these words in its syntax.
DUMP
DYNA
EJEC
ELIM
END
FAIL
FAST
FILL
FIM
FLOOR
FOR
COS
COSH
CONT
COPY
COUNT
CREA
DATA
DD
DIM
DIY
DOW
DUMB
MAP
MAX
MAXI
MAXN
MC
MCYY
MESS
MIN
MINN
MINP
MM
FORM
FROM
GRAN
INIT
INTO
ITEM
LIM
LINK
LIST
LN
LONG
LP
OTHE
PACK
PAGE
PARA
PASS
PAUS
PD
PR
PRIN
PROM
PUP
MOD
NC
NEW
NEWM
NODI
NOHE
NOLI
NUME
OFF
ON
OR
ORDE
SMAR
SQRT
STD
STDN
SUM
STOP
SUMM
SUPP
SYST
TABL
TAN
PW
REV8
RO
SAVE
SCRA
SCRE
SECT
SEQU
SIGN
SIN
SINH
SING
TANH
TEXT
TO
TTY
TYPE
UNSO
UNTI
VAR
VARN
VIA
WD
WHIL
WITH
XOR
YY
INFO Reference Manual Appendices A-79
Appendix J
ISAM Considerations
Special considerations apply when using ISAM (Indexed
Sequential Access Method) files with INFO. The creation and maintenance of the link to an ISAM file requires special care and effort. You should consider using ISAM files with INFO when circumstances such as these exist: n
You want to access an existing ISAM file.
n
An application requires that multiple users have write access to the file at the same time.
n
Records are added to the file frequently and must be maintained in sequential order.
n
An application requires that records in a large file be accessed quickly by key.
Before reading this chapter, you should be familiar with the relevant ISAM utilities and those INFO commands that reference ISAM files or provide ISAM capability: ALTER,
DEFINE, DIRECTORY, EXTERNAL, FILES, ITEMS,
LIMIT, NEWMAP, PURGE, REDEFINE, RELATE,
RESELECT, SELECT, and SET.
This chapter provides separate discussions about creating the link between INFO and an ISAM file and maintaining the ISAM link once it is established.
Creating the INFO and ISAM Link.
Before you can establish a link between INFO and an
ISAM file, the file must be defined both to the operating system and to INFO. The order in which you do this is not important. You can define the file to INFO before you create the ISAM file under the operating system, or vice versa.
The instructions first describe how to define an ISAM file to INFO and then explain how to create the link between
INFO and the ISAM file at the operating system.
INFO Reference Manual Appendices A-81
ISAM Considerations
Appendix J
Defining the ISAM file to INFO.
To define the ISAM file to INFO, use the DEFINE command. You must know the data type of each field in the ISAM file. Remember that the ISAM file does not have to exist before you define the file to INFO, but you must ensure that the INFO definition of the file matches the actual file before you can create the link from INFO to the file.
After you define the file, use the ALTER command to define the ISAM key fields. The dialog on the next page shows the command sequence used to alter the item
PRIMARY.KEY in ISAM. EXAMPLE to be a primary key, and data item SECONDARY.KEY to be a secondary key.
Sample ALTER Dialog to Create ISAM keys.
ENTER COMMAND >ITEMS LONG
DATAFILE NAME: ISAM-DF
5 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC PROT KEY OCCRS INDX CNLV CC CN UN
1 PRIMARY.KEY 3 3 C - 4 - - - - - - -
4 SECONDARY.KEY 2 2 C - 4 - - - - - - -
6 DATA1 10 10 C - 4 - - - - - - -
16 DATA2 10 10 C - 4 - - - - - - -
26 SPARES 15 15 C - 4 - - - - - - -
ENTER COMMAND >ALTER PRIMARY KEY
1 PRIMARY.KEY 3 3 C - 4 - - - - - - -
ITEM NAME><R>
ALTERNATE NAME ><R>
ITEM OUTPUT WIDTH ><R>
ITEM TYPE ><R>
ITEM PROT. LEVEL ><R>
ENTER KEY LEVEL >0
ENTER INDEX NUMBER ><R>
1 PRIMARY.KEY 3 3 C - 4 - - - - - - -
A-82 Appendices INFO Reference Manual
Appendix J
ISAM Considerations
ENTER COMMAND >ALTER SECONDARY.KEY
4 SECONDARY.KEY 2 2 I - 4 - - - - - - -
ITEM NAME ><R>
ALTERNATE ITEM NAME ><R>
ITEM OUTPUT WIDTH ><R>
ITEM TYPE ><R>
ITEM PROT. LEVEL ><R>
ENTER KEY LEVEL >1
ENTER INDEX NUMBERS ><R>
4 SECONDARY.KEY 2 2 C - 4 D1 - - - - - -
ENTER COMMAND >ITEMS LONG
DATAFILE NAME: ISAM - DF
5 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC PROT KEY OCCRS INDX CNLV CC CN UN
1 PRIMARY.KEY 3 3 C - 4 O - - - - - -
4 SECONDARY.KEY 2 2 I - 4 D1 - - - - - -
6 DATA1 10 10 C - 4 - - - - - - -
16 DATA2 10 10 C - 4 - - - - - - -
26 SPARES 15 15 C - 4 - - - - - - eg.
Linking to an existing ISAM file.
If the ISAM file already exists at the operating system, the
INFO file template may be linked to this by use of the
EXTERNAL command.
ENTER COMMAND >SEL ISAM-DF
O RECORD(S) SELECTED
ENTER COMMAND >EXTERNAL
ENTER COMPLETE FILE NAME OF EXTERNAL FILE
pathname/filename
DATABASE (C/R FOR DEFAULT, LIST FOR OPTIONS)
CI (Unix) OR XI (VMS and Primos)
ENTER COMMAND >SEL ISAM-DF NEWMAP
^ RECORD(S) SELECTED
INFO Reference Manual Appendices A-83
ISAM Considerations
Appendix J
Creating an ISAM file at the operating system.
If the ISAM file does not already exist at the operating system level, it is possible to create an empty ISAM template using the INFO file template. The procedure varies according to the operating system.
UNIX
ENTER COMMAND >SEL ISAM-DF
O RECORD(S) SELECTED
ENTER COMMAND >EXTERNAL
ENTER COMPLETE FILE NAME OF EXTERNAL FILE pathname/isam-df
DATABASE (C/R FOR DEFAULT, LIST FOR OPTIONS)>CI
ENTER COMMAND >SEL ISAM-DF (or REL ISAM-DF BY KEY)
O RECORD(S) SELECTED
At this point, two files will have been created in the directory specified in the external pathname (or in the local directory if no pathname was specified): isam-df.idx
isam-df.dat
Note: The ISAM filename at Unix level can have a maximum of 10 characters before the extension; this is a limitation of the C-ISAM file system.
VMS
ENTER COMMAND >SEL ISAM-DF
O RECORD(S) SELECTED
ENTER COMMAND >EXTERNAL
ENTER COMPLETE FILENAME OF EXTERNAL FILE
[pathname]ISAM-DF.ISM
DATABASE (C/R FOR DEFAULT, LIST FOR OPTIONS)>XI
ENTER COMMAND >SEL ISAM-DF (or REL ISAM-DF BY KEY)
CREATING NEW ISAM FILE. OKAY? (Y/N).Y
O RECORD(S) SELECTED
A-84 Appendices INFO Reference Manual
Appendix J
ISAM Considerations
At this point, one file will have been created in the directory specified in the external pathname (or in the local directory if no pathname was specified):
ISAM-DF.ISM
N.B The VMS ISAM template will have been created with most parameters set to their default values. If it is required to alter any of these, use the EDIT/FDL utility.
See the appropriate VMS documentation for details.
INFO does not support the following RMS ISAM options: n
Segmented keys. Corresponding key items in the ISAM file and the INFO file template must match exactly.
n
Individual keys that are greater than 64 bytes in length n
Variable length records.
Primos
ENTER COMMAND >SEL ISAM-DF
O RECORD(S) SELECTED
ENTER COMMAND >MIDAS treename filename
*** MIDAS FILE BUILD COMPLETE - FILE NOW BEING
SELECTED! ***
O RECORD(S) SELECTED
At this point one file will have been created in the directory specified in the treename argument in the MIDAS command with the specified filename; if neither argument was supplied, INFO will have created an empty MIDAS template in the local directory with the same name as the
INFO file template, i.e. ISAM-DF
Maintaining the ISAM link.
Once the link from INFO to an ISAM file has been established, you can begin to access the file from INFO.
The first time you select the ISAM file , INFO creates a file of primary key values, called a bitmap. For more information about bitmap files, see APPENDIX F, INFO
INFO Reference Manual Appendices A-85
ISAM Considerations
Appendix J
Internal Files. INFO uses the bitmap to access the file, as described below.
When you issue a SORT command on an ISAM file, INFO reorders your bitmap according to the SORT criteria. It does not change the organisation of the ISAM file itself.
When you access records in an ISAM file by key items, you can create record sets. More information about how to do this is provided below.
You can add records to an ISAM file through INFO, using the ADD command or an input form or with RELATE FILL.
When you select or relate an ISAM file that you only want to read, such as with REPORT or match processing in an input form, you should always use the RO (read-only) option with the command.
ISAM file records may become locked during processing when another user is using a record when you request it.
INFO provides the system variables $LOCK0 through
$LOCK9 and $LOCK-QUESTION to allow you to control whether or not INFO attempts again to access a locked record. See Appendix D, System Items for a detailed discussion of these system items.
The rest of this discussion provides details of bitmap, set, and related files processing, and information about using
ISAM files in INFO programs.
Bitmap Processing.
As stated above, when you first select an ISAM file, INFO builds a bitmap containing an entry for each record in the file. This bitmap is created for your sign-on user name.
Each time you select the file subsequently, you can only access those records that have entries in you bitmap for the file. You are responsible for maintaining your copy of the bitmap, as described below.
A-86 Appendices INFO Reference Manual
Appendix J
ISAM Considerations
When records are added, modified, or deleted from the file, the following conditions determine whether or not your bitmap is updated to reflect the changes: n
If you add records using the ADD command or an input form, or delete records from the file using the PURGE command, INFO updates your bitmap to reflect the added or deleted records. Be aware that other INFO users may be modifying the same file concurrently. In that case, you must recreate you bitmap following the completion of all updating so that it reflects all changes made to the file.
n
If you change key data items, INFO deletes the record and adds a new record with the new key data value. Your bitmap is updated to reflect the change.
n
When you use an UPDATE BY command that specifies a key field, INFO ignores your bitmap and updates the file directly. You can use this command to bypass bitmap processing when you need to update records quickly.
n
If another INFO user, or program outside of INFO adds or deletes records from, your bitmap does not reflect these changes until you recreate your bitmap.
To recreate your bitmap for an ISAM file, you can use the
SELECT, or NEWMAP commands. See the discussion of each command, in this manual, for detailed information about how each command causes the bitmap to be recreated, then decide which method is most appropriate for your processing circumstances.
Please note that in most circumstances, it is more efficient to SELECT an ISAM file with the DYNAMIC option rather than with NEWMAP: this is because the NEWMAP option will direct INFO to immediately make a complete pass through the ISAM file and build a new bitmap, whereas the
DYNAMIC option will cause the bitmap to be created as the file is processed.
Set Processing
When you select a file, INFO includes each record in the file in your selected record set. This initial selected set is
INFO Reference Manual Appendices A-87
ISAM Considerations
Appendix J
called SET 1 for the file. You can establish up to 16 sets for the file, as described below. Each set represents an alternative bitmap that reflects different selection criteria for records in the file. When you establish a set, INFO displays the number assigned to the set. Set numbers are assigned in sequential order (Set 2, then Set 3, and so on).
The current set number is held in the System Item
$MSET.
Each time you specify a primary or secondary ISAM key item in a RESELECT BY command, INFO processes the entire ISAM file. Subsequent RESELECT BY commands with different selection criteria create alternative sets of records.
To return to a previously selected set of records, specify the desired set number in a SET command request. If you select another file during the RESELECT BY command sequence, the sets that you have established are unavailable until you select the ISAM file again. INFO maintains a record of the sets created so that you can reference them again the next time you select the ISAM file. Any time you recreate your bitmap, however, INFO deletes any existing sets for the file.
Relating File Processing.
After you select an ISAM file, you can relate other INFO datafiles to it by any data item in the file. If you want to relate to an ISAM file, you must relate by a key field and specify either no options, the FILL or TABLE options, or the RO (read-only) option. You cannot use any other
RELATE options when relating an ISAM file.
When you relate an ISAM file, INFO ignores the bitmap and accesses all the records in the ISAM file directory.
When you specify the FILL option, you can only add a record if its key field data does not already exist in the file; if it does, INFO will position to that related ISAM record.
Using ISAM Files in Programs.
When you access an ISAM file in an INFO program, minimize the number of write requests to the file. To do this, you should perform any MOVE or CALCULATE logic to ISAM file records in an even-numbered program section. INFO writes each record only once at the end of
A-88 Appendices INFO Reference Manual
`
Appendix J
$NOSEL
$SETMAX
$SETMIN
ISAM Considerations
an even-numbered section, regardless of the number of
MOVE and CALCULATE commands executed on the record in the section. If you move or calculate to ISAM records in an odd-numbered program section, INFO writes each record in the datafile for each command. That is,
INFO makes a complete pass through the file for each command.
System Items
The following System Items behave differently when used in conjunction with ISAM files: if the ISAM file is selected with the DYNAMIC option,
$NOSEL is initially set to 0, and is incremented as records are read.
if the ISAM file is processed by the LIMIT command, INFO will read the file until it either finds a record that matches the condition or reaches end of file; if the former, $NOSEL is set to 1 and incremented when any other records meeting the LIMIT condition are read by the next active command; if the latter, $NOSEL is set to 0.
as for $NOSEL always set to 1 when ISAM file is selected DYNAMIC or
NEWMAP or processed by the LIMIT command.
INFO Reference Manual Appendices A-89
Appendix K
$CHECK-NOMATCH
Record Matching
This control variable allows users to change default processing with regard to tests on related file item values of blank, (for characters), and zero (for numerics).
Its scope covers tree-structured relates: when used in condition testing: and, when there is a 'nomatch' condition, whether to attempt a file position on a dependant related file, or to simply return 'nomatch' on this file as well.
$CHECK-NOMATCH IF or DO related file check:
Zero for numerics
Blank for characters
Pass/Fail test when
‘nomatch’
0
1 fail pass
2
3 fail pass
Tree Structured positioning:
Where ‘nomatch’ in parent attempt position in target file yes no no yes
INFO Reference Manual Appendices A-91
Record Matching
Appendix K
Examples - Matching on Tree-Related Files
EMPLOYEE
Name Emp-
Num
Joe
Sue
Sam
001
002
PREVIOUS-POSTS
Emp-Num Job
001
001
001
CL
LT
RM
002
002 TA
<no records for 000>
JOB-DESCRIPTION
Job
CL
JUG
KP
LT
RM
Job-Desc
Not Classified
Clown
Juggler
Kitchen Porter
Lion Tamer
Ring Master
A tree-related structure is set up in the following program using the above files and changing value of $CHECK-NOMATCH and its effects on matching are shown:
$CHECK-NOMATCH = #
SELECT EMPLOYEE
(where # = 0, 1, 2, or 3)
RELATE PREVIOUS-POSTS 1 BY EMP-NUM
RELATE JOB-DESCRIPTION 2 BY $1JOB
NEXT 1
A-92 Appendices INFO Reference Manual
Appendix K
Record Matching
Joe
Joe
Joe
Sue
Sue
Sam
$CHECK-NOMATCH = 0
DISPLAY NAME,$1JOB,$2JOB-DESC
CL
LT
Clown
Lion Tamer
RM Ring Master
Not Classified
TA
Not Classified
Joe
Joe
Joe
Sue
Sue
Sam
$CHECK-NOMATCH = 1
DISPLAY NAME,$1JOB,$2JOB-DESC
CL
LT
Clown
Lion Tamer
RM Ring Master
Not Classified
TA
Joe
Joe
Joe
Sue
Sue
Sam
$CHECK-NOMATCH = 2
DISPLAY NAME,$1JOB,$2JOB-DESC
CL Clown
LT Lion Tamer
RM Ring Master
Not Classified
TA
$CHECK-NOMATCH = 3
DISPLAY NAME,$1JOB,$2JOB-DESC
Joe
Joe
Joe
Sue
Sue
Sam
CL
LT
Clown
Lion Tamer
RM Ring Master
Not Classified
TA
Not Classified
INFO Reference Manual Appendices A-93
Record Matching
Appendix K
Examples - Condition Testing for a Match
The examples below use the same data to illustrate the effect of the new settings of $CHECK-NOMATCH on condition Testing:
First Related File
$CHECK-NOMATCH = #
(where # = 0, 1, 2 or 3)
SELECT EMPLOYEE
RELATE PREVIOUS-POSTS 1 BY EMP-NUM
RELATE JOB-DESCRIPTION 2 BY $1JOB
.
PROGRAM SECTION TWO
IF $1JOB = ' '
DISPLAY 'Nomatch = ',$CHECK-NOMATCH,NAME,$1JOB,$2JOB-DESC
ENDIF
NEXT 1
Nomatch = 0
Nomatch = 1
Nomatch = 1
Nomatch = 2
Nomatch = 3
Nomatch = 3
Sue
Sue
Sam
Sue
Sue
Sam
Not Classified
Not Classified
Not Classified
Not Classified
Not Classified
A-94 Appendices INFO Reference Manual
Appendix K
Record Matching
Second Related File
$CHECK-NOMATCH = #
SELECT EMPLOYEE
(where # = 0, 1, 2 or 3)
RELATE PREVIOUS-POSTS 1 BY EMP-NUM
RELATE JOB-DESCRIPTION 2 BY $1JOB
.
PROGRAM SECTION TWO
IF $2JOB = ' '
ENDIF
DISPLAY 'Nomatch = ',$CHECK-NOMATCH,NAME,$1JOB,$2JOB-DESC
NEXT 1
Nomatch = 0
Nomatch = 1
Nomatch = 1
Nomatch = 1
Nomatch = 2
Nomatch = 3
Nomatch = 3
Nomatch = 3
Sue
Sue
Sue
Sam
Sue
Sue
Sue
Sam
TA
TA
Not Classified
Not Classified
Not Classified
Not Classified
Not Classified
Compatibility with Earlier Revisions of INFO
To emulate pre-revision 9.6 processing as much as possible, $CHECK-NO-MATCH should be set to 3.
INFO Reference Manual Appendices A-95
-
Appendix L
Unary minus
Functions
Arithmetic, statistical & date functions.
In the following examples, the system variable $NUM1 is used to hold the value returned from the function and is formatted as 8,20,F,12 : i.e. floating point, 8 bytes wide on input, 20 bytes wide on output, with 12 decimal places.
Where numeric literals are used in the examples, system variables, system items and datafile items may also be used. $PI is an INFO system item containing the value for
π
, correct to 12 decimal places, i.e. 3.141592653589.
Negates the following operand.
e.g.
$NUM1 = -39
$NUM39 will be set to -39 (i.e. minus 39)
**
Exponentiation
*
Multiplication
The left operand is calculated to the power of the right operand. The left operand must be positive.
e.g.
$NUM1 = 39 ** 3
$NUM1 will be set to 59,319 ( i.e. 39 cubed ) e.g.
$NUM1 = 39 ** 0.5
$NUM1 will be set to 6.244997998398, i.e. the square root of 39; this is synonymous with the function SQRT (see below).
e.g.
$NUM1 = 39 ** 0.333333333333333 ( i.e. 0.3 recurring)
$NUM1 will be set to 3.391211443014 ( i.e. the cube root of 39 )
The left and right operands are multiplied.
e.g.
$NUM1 = 39 * 3
$NUM1 will be set to 117
INFO Reference Manual Appendices A-97
Functions
Appendix L
/
Division
The left operand is divided by the value of the right operand.
e.g.
$NUM1 = 39 / 3
$NUM1 will be set to 13
+
Addition
The left and right operands are added together.
e.g
$NUM1 = 39 + 3
$NUM1 will be set to 42
-
Subtraction
The right operand is subtracted from the left operand.
e.g.
$NUM1 = 39 - 3
Calculates the width of the operand, excluding trailing blanks. The operand must be defined as character (type
C).
$NUM1 will be set to 36
WD
Width computation
e.g.
$CHR10 = ‘ AB C ’
$NUM1 = WD $CHR10
$NUM1 will be set to 4
LN Natural Log Calculates the natural logarithm of the operand. The operand must be defined as numeric and must be positive.
e.g.
$NUM1 = LN 39
$NUM1 will be set to 3.663561646130
MOD Remainder Calculates the remainder after the operand is divided by the divisor.
e.g. $NUM1 = 39 mod 5
$NUM1 will be set to 4
A-98 Appendices INFO Reference Manual
Appendix L
LOG10
Base 10 Log
SIN
Sine
COS
Cosine
TAN
Tangent
Functions
Calculates the base 10 logarithm of the operand.
The operand must be defined as numeric and must be positive.
e.g.
$NUM1 = LOG10 39
$NUM1 will be set to 1.591064607026
Calculates the sine of the given angle. The operand should be in radians : if the argument is in degrees, it should be converted to radians by multiplying it by $PI /
180.
e.g.
to calculate the sine of 30
°
$NUM1 = SIN ( 30 * $PI / 180 )
$NUM1 will be set to 0.50
Calculates the consine of the given angle.
The operand should be in radians : if the argument is in degrees, it should be onverted to radians by multiplying it by $PI / 180.
e.g.
to calculate the cosine of 30
°
$NUM1 = COS ( 30 * $PI / 180 )
$NUM1 will be set to 0.866025403784
Calculates the tangent of the given angle.
The operand should be in radians : if the argument is in degrees, it should be converted to radians by multiplying it by $PI / 180.
e.g.
to calculate the tangent of 30
°
$NUM1 = TAN ( 30 * $PI / 180 )
$NUM1 will be set to 0.577350269190
INFO Reference Manual Appendices A-99
Functions
ASIN
Arcsine
ACOS
Arccosine
ATAN
Arctangent
Appendix L
Calculates the arcsine of a given operand. The operand is the sine of the required angle and must be in the range -1 to 1. The returned angle is given in radians : to convert to degrees, multiply the result by $PI / 180.
e.g.
$NUM1 = ASIN 0.5
$NUM1 will be set to 0.523598775598, the value in radians to convert the result to degrees :
$NUM3 = $NUM1 * 180 / $PI
$NUM3 will be set to 30, the value in degrees
Calculates the arccosine of a given operand. The operand is the. cosine of the required angle and must be in the range -1 to 1. The returned angle is given in radians to convert to degrees, multiply the result by $PI / 180.
e.g.
$NUM1 = ACOS 0.866025403784
$NUM1 will be set to 0.523598775599, the value in radians to convert the result to degrees :
$NUM3 = $NUM3 * 180 / $PI
$NUM1 will be set to 30, the value in degrees
Calculates the arctangent of a given operand. The operand is the tangent of the required angle. The returned angle is given in radians : to convert to degrees, multiply the result by $PI / 180.
e.g.
$NUM1 = ATAN 0.577350269190
$NUM1 will be set to 0.523598775599, the value in radians to convert the result to degrees :
$NUM3 = $NUM1 * 180 / $PI
$NUM3 will be set to 30, the value in degrees
A-100 Appendices INFO Reference Manual
Appendix L
Functions
SINH
Hyperbolic sine
Calculates the hyperbolic sine of a given operand where the operand is any real number.
e.g.
$NUM1 = SINH 4
$NUM1 will be set to 27.289917197128
COSH
Calculates the hyperbolic cosine of a given operand,where
Hyperbolic cosine
the operand is any real number.
e.g.
$NUM1 = COSH 4
$NUM1 will be set to 27.308232836016
TANH
Calculates the hyperbolic tangent of a given operand,
Hyperbolic tangent where the operand is any real number.
e.g.
$NUM1 = TANH 4
$NUM1 will be set to 0.999329299739
ABS
Absolute value
CEIL
Ceiling
FLOOR
Floor
Calculates the absolute value of a given operand, where the operand is any real number.
e.g.
$NUM1 = ABS -39
$NUM1 will be set to 39
Calculates the operand rounded up, away from zero, to the nearest multiple of significance, where the operand is any real number.
e.g. $NUM1 = CEIL 39.5,1
$NUM1 will be set to 40 e.g. $NUM1 = CEIL 39.5,9
$NUM1 will be set to 45
Calculates the operand rounded down, toward zero, to the nearest multiple of significance, where the operand is any real number.
e.g. $NUM1 = FLOOR 39.5,1
$NUM1 will be set to 39 e.g. $NUM1 = FLOOR 39.5,9
$NUM1 will be set to 36
INFO Reference Manual Appendices A-101
Functions
SQRT
Square root
SIGN
Sign
AVG
Average
Appendix L
Calculates the square root of the operand, where the operand is any positive number.
e.g. $NUM1 = SQRT 39
$NUM1 will be set to 6.244997998398
e.g.
$NUM1 = SQRT 1E+08
$NUM1 will be set to 10,000 e.g. $NUM1 = SQRT 1D-08
$NUM1 will be set to 0.0001
Determines the sign of a given operand. Returns 1 if the operand is positive, 0 if the operand is zero and -1 if the operand is negative.
e.g.
$NUM1 = SIGN 39
$NUM1 will be set to 1 e.g.
$NUM1 = SIGN 0
$NUM1 will be set to 0 e.g.
$NUM1 = SIGN -39
$NUM1 will be set to -1
The following functions are group functions and operate on a specified item in the current working set. In the following examples, there are 6 records in the working set : the values of an integer item called STOCK are 39, 42, 17,
22, -7, -228.
Calculates the average (arithmetic mean) of the values of a specified datafile item.
e.g.
$NUM1 = AVG STOCK
$NUM1 will be set to -19.166666666667
A-102 Appendices INFO Reference Manual
Appendix L
Functions
COUNT
Count
Calculates the number of occurrences of the specified datafile item. Synonymous with the INFO system item $NOSEL.
e.g.
$NUM1 = COUNT STOCK
$NUM1 will be set to 6
MAX
Maximum
MIN
Minimum
SUM
Sum
VAR
Variance
Returns the maximum value of the specified datafile item in the current working set.
e.g.
$NUM1 = MAX STOCK
$NUM1 will be set to 42
Returns the minimum value of the specified datafile item in the current working set.
e.g.
$NUM1 = MIN STOCK
$NUM1 will be set to -228
Calculates the sum of all the values of the specified datafile item in the current working set.
e.g.
$NUM1 = SUM STOCK
$NUM1 will be set to -115
Calculates the variance based on the entire population of values in the specified datafile item in the current working set.
e.g.
$NUM1 = VAR STOCK
$NUM1 will be set to 8981.138888888889
STD
Calculates the standard deviation based on the entire
Standard deviation population of values in the specified datafile item in the current working set.
e.g.
$NUM1 = STD STOCK
$NUM1 will be set to 94.768870885375
The following group functions ignore values of zero :
INFO Reference Manual Appendices A-103
Functions
Appendix L
AVGN
Average
MAXN
Maximum
MINN
Minimum
Calculates the average (arithmetic mean) of the values of a specified data item, ignoring any zero values.
e.g.
If the values of STOCK were 1, 2, 0, 3 :
$NUM1 = AVGN STOCK
$NUM1 will be set to 2 rather than 1.5
Returns the maximum value of the specified datafile item in the current working set, ignoring zero values.
e.g.
If the values of STOCK were -1, -2, 0, -3 :
$NUM1 = MAXN STOCK
$NUM1 will be set to -1 rather than 0
Returns the minimum value of the specified datafile item in the current working set, ignoring zero values.
e.g.
If the values of STOCK were 1, 2, 0, 3 :
$NUM1 = MINN STOCK
$NUM1 will be set to 1 rather than 0
MINP
Returns the minimum positve value, ignoring zero values,
Minimum positive of the specified datafile item in the current working set.
e.g.
If the values of STOCK were -5, -3, 0, 2, 8 :
$NUM1 = MINP STOCK
VARN
Variance
$NUM1 will be set to 2 rather than -5
Calculates the variance based on the entire population of values (apart from zero values) in the spcified datafile item in the current working set.
e.g. If the values of STOCK were 1, 2, 0, 3 :
$NUM1 = VARN STOCK
$NUM1 will be set to 0.66 recurring rather than
1.25
A-104 Appendices INFO Reference Manual
Appendix L
Functions
STDN
Calculates the standard deviation based on the entire
Standard deviation population of values (apart from zero values) in the specified datafile item in the current working set.
e.g
If the values of STOCK were 1, 2, 0, 3 :
$NUM1 = STDN STOCK
$NUM1 will be set to 0.816496580928 rather than 1.118033988750
In the following examples, $DAT40 is set to the date
02/17/1996 and $DAT20 is set to 03/31/1996 : the system item $ZDATE is set to 1 so that days and months less than 10 are displayed with a leading zero.
DD
Day of month
MM
Month
MCYY
Full year
Extracts the day of the specified date e.g. $NUM1 = DD $DAT40
$NUM1 will be set to 17
Extracts the month of the specified date e.g.
$NUM1 = MM $DAT40
$NUM1 will be set to 2
Extracts the full YYYY component of the specified date e.g.
$NUM1 = MCYY $DAT40
MC
Century
YY
Year
DIY
Day in year
$NUM1 will be set to 1996
Extracts the millennium and century of the specified date.
e.g.
$NUM1 = MC $DAT40
$NUM1 will be set to 19
Extracts the decade and year of the specified date.
e.g.
$NUM1 = YY $DAT40
$NUM1 will be set to 96
Returns the day of the specified date as a value between 1 and 366.
e.g.
$NUM1 = DIY $DAT40
$NUM1 will be set to 48
INFO Reference Manual Appendices A-105
Functions
Appendix L
DIM
Days in month
Returns the number of days in the month of the specified date e.g.
$NUM1 = DIM $DAT40
$NUM1 will be set to 29
FIM
Returns an INFO date set to the first day of the month in
First day in month
the specified date.
e.g.
$DAT39 = FIM $DAT40
$DAT39 will be set to 02/01/1996
LIM
Returns an INFO date set to the last day of the month in
Last day in month
the specified date.
e.g.
$DAT39 = LIM $DAT40
$DAT39 will be set to 02/29/1996
DOW
Day of week
DD+ #
Add # days
Returns the day of the specified date as a value between 1 and 7, with Monday being 1 and Sunday being 7.
e.g.
$NUM1 = DOW $DAT40
$NUM1 = 6 i.e. Saturday
Returns an INFO date with # days added to the specified date.
e.g.
$DAT39 = $DAT40 DD+ 12
$DAT39 will be set to 02/29/1996 note: this result may also be achieved by the following command :
$DAT39 = $DAT40 + 12
A-106 Appendices INFO Reference Manual
Appendix L
Functions
DD- #
Returns an INFO date with # days subtracted from the
Subtract # days
specified date.
e.g.
$DAT39 = $DAT40 DD- 17
$DAT39 will be set to 01/31/1996 note: this result may also be achieved by the following command :
$DAT39 = $DAT40 - 17
MM+ #
Add # months
Returns an INFO date with # months added to the specified date.
e.g.
$DAT39 = $DAT20 MM+ 3
$DAT39 will be set to 06/30/1996 note: if the specified date has a higher day number than the month of the target date, the target date will be set to the last day of thatmonth.
MM- #
Returns an INFO date with # months subtracted from the
Subtract # months specified date.
YY+ #
Add # years
e.g. $DAT39 = $DAT20 MM- 3
$DAT39 will be set to 06/30/1996 note: if the specified date has a higher day number than the month ofthe target date, the target date will be set to the last day of thatmonth.
Returns an INFO date with # years added to the specified date.
e.g. $DAT39 = $DAT40 YY+ 4
$DAT39 will be set to 02/17/2000
INFO Reference Manual Appendices A-107
Functions
Appendix L
note: Leap years are accounted for : e.g.
$DAT22 = 02/29/1996
$DAT39 = $DAT22 YY+ 1
$DAT39 will be set to 02/28/1997
$DAT39 = $DAT22 YY+ 4
$DAT39 will be set to 02/29/2000
YY- #
Returns an INFO date with # years subtracted from the
Subtract # years
specified date.
e.g.
$DAT39 = $DAT40 YY- 4
$DAT39 will be set to 02/17/1992 note: Leap years are accounted for : e.g.
$DAT22 = 02/29/1996
$DAT39 = $DAT22 YY- 1
$DAT39 will be set to 02/28/1995
$DAT39 = $DAT22 YY- 96
$DAT39 will be set to 02/28/1900
A-108 Appendices INFO Reference Manual
Appendix M
The
HLPFULHLP file
Using The Help Facility
INFO's Help Facility is designed so that you can extend it to suit your needs. This section describes the format to use when adding your own files to INFO's Help Facility.
INFO determines whether a given help topic is available by searching a special file called HLPFULHLP, found in the INFOSYS directory. The HLPFULHLP file contains one record for each help topic supported by INFO.
HLPFULHLP contains only ASCII character information.
The first 12 characters of each HLPFULHLP record contain the name by which that particular help topic is referenced. The next 2 characters describe the length of the minimum abbreviation for the topic name (an integer).
The next 2 characters describe the number of words in the topic name. The rest of each HLPFULHLP record contains the full pathname of the file in which the help text itself is stored. These file names end with 'HLP'. Below is an example of the layout of the HLPFULHLP file.
INPUT FORM
IPF
GET
03
03
03
2
1
1
INPUT
INPUT
GET
The records in the HLPFULHLP file do not have to be in sorted order.
Once INFO has found a specified help topic in the
HLPFULHLP file, it searches for the appropriate file in your current directory. If the file does not exist there,
INFO searches for it in the directory specified in your current ADIR setting. INFO's default help files are in the
INFOSYS directory. Note that when the current ADIR setting is not INFOSYS, the Help Facility does not operate correctly.
INFO Reference Manual Appendices A-109
Using The Help Facility
Appendix M
Format of a help file
$SUBT subtopic name
$OVRV
$WAIT question string
$ST subtopic
$END
Each help file in the Help Facility contains special control commands to tell INFO how many subtopics exist for that help topic and where each subtopic text segment begins and ends. The control records and their formats are as follows:
Defines the subtopics available in a specified help topic.
The length of the subtopic name is limited to 40 characters. You can include more than one $SUBT control command in one help file. $SUBT control commands must precede $ST control commands in a help file.
Indicates the beginning of the overview section of a help file. The text in this section of a help file is shown when you do not specify a subtopic on the HELP command line.
Indicates that INFO should pause and ask if you want more help. If you have specified a question in the $WAIT control command, INFO uses this question to prompt you
Otherwise, it uses the default message NEED MORE
HELP (Y OR N) as each screenful of help text is displayed
If you respond Y, INFO displays another page of help text.
If you respond N, INFO ends the help session.
Indicates the beginning of a subtopic text segment and the end of the previous one. If you specify both a help topic and a subtopic, the specified help file is searched until a control record with the specified subtopic name is found.
INFO then lists that portion of the help file until it finds another subtopic control record or reaches an $END control record. A corresponding $SUBTOPIC control record must precede a given $ST control record; if the
$SUBTOPIC control record is not found, INFO displays a
NO HELP AVAILABLE... message.
Indicates the end of a help file.
A-110 Appendices INFO Reference Manual
Appendix M
Using The Help Facility
Sample help file
An individual help file might look something like this:
$OVRV
Jogging with INFO.
PURPOSE: To become productive at work while using the INFO data management system.
$SUBT FUN
$SUBT EFFICIENT
$SUBT FAST
$ST FUN
Fun Jogging with INFO
It is fun to include INFO in your daily exercise regimen.
.
.
.
$ST EFFICIENT
Efficient Jogging with INFO
You can gain efficiency by including INFO in your daily exercise regimen.
.
.
.
$ST FAST
Running Fast with INFO
You can take off with INFO.
$WAIT Do you really want to read more of this?
.
.
.
$END
INFO Reference Manual Appendices A-111
Appendix N
Setup
UNIX
VMS
Application Mode
Application Mode allows any number of users to point to and share the same INFO application; only one copy of the INF0 DR9 with all its associated programs, datafiles and forms is required. By default any sorting will be performed in the user’s area, ISAM sets and bitmaps will be created locally and each user will have their own local copy of the NSP file. If required, other local user work files or temporary files may be set up prior to invoking
INFO. See Impact of Application Mode on INFO
Commands, for fuller explanation.
note Concurrency coding is still required.
Application Mode will simplify the set up and maintenance of multi-user INFO applications. It should be considered as a simpler, more efficient alternative to the ADIR model.
This mode of operation and set up, controlled by the use of external variables, enables a user to enter an INFO application anywhere without moving from the current directory. In the following examples, AIRPORT is the name of the directory containing the INFO application and the INFO username is DEM.
Method 1
Set up a 3 character-named external variable preceded by an underscore (Unix) or dot (VMS and Primos) containing the full pathname of an INFO application area. The name of the external variable must match the 3-character system item $SHORT-NAME (from now on referred to as the INFO username) for that application.
_dem=/airport;export _dem (for bourne or korn shells)
or
setenv _dem /airport (for c shell)
note you must precede the environment variable with “_”
DEFINE
.
DEM DUB5:[AIRPORT]
note
you must precede the logical with “
.
”
INFO Reference Manual Appendices A-113
Application Mode
PRIMOS
Appendix N
SET_VAR
.
DEM AIRPORT
note
you must precede the global variable with “
.
”
When this external variable is entered at the prompt:
ENTER USER NAME>dem or when part of the QUIT command:
ENTER COMMAND>QUIT dem
Setup
UNIX
VMS
PRIMOS
INFO checks to see if dem is an external variable and, if so, expands it : the user is taken into the INFO application area airport with the INFO username of dem. The user’s current attach-point directory remains the same throughout.
Method 2
Set up a 3-8-character named external variable containing the full pathname of the <DR9> file for an application area.
_GOTODEMO=/airport/demdr9;export _GOTODEMO
(bourne or korn shells) or setenv _GOTODEMO /airport/demdr9 (c-shell)
note
the environment variable must be preceded by “_”
Under UNIX, environment variables you set up are case sensitive; for example, the above environment variable
GOTODEMO would have to be entered in upper case.
DEFINE
.
GOTODEMO DUB5:[AIRPORT]DEM.DR9
note
the logical must be preceded by “
.
”
SET_VAR
.
GOTODEMO AIRPORT>DEMDR9
note
the global variable must be preceded by “
.
”
When this external variable is entered at the prompt:
A-114 Appendices INFO Reference Manual
Appendix N
Usage
Application Mode
ENTER USER NAME>GOTODEMO or using the QUIT command:
ENTER COMMAND>QUIT GOTODEMO
INFO expands the external variable GOTODEMO and the user is taken into the INFO application area airport with the username of dem. The user’s current attach point or ‘local area’ remains, once again, the same.
Method 1
At the ENTER USER NAME> (as above), to enter an application area.
Method 2
With the QUIT command option, to enter another application area without exiting INFO, e.g.
QUIT GOTODEMO where GOTODEMO is an external variable containing a
<DR9> pathname.
Method 3
With the QUIT command option, to run a program in an application area, either interactively or by program, e.g.
QUIT GOTODEMO MAIN.PG
where GOTODEMO is an external variable containing a
<DR9> pathname and MAIN.PG is the name of a program in the application area.
note If a PROFILE program exists in the INFO application, it will be run before MAIN.PG
Method 4
In conjunction with the system item $PARAMETERS, to pass parameters between application areas :
INFO Reference Manual Appendices A-115
Application Mode
e.g.
FORMAT $CHR1,16
$CHR1 = ‘GREETINGS’
$PARAMETERS = $USER-BUFF
QUIT GOTODEMO
Appendix N
where $USER-BUFF is the system item which is a redefinition of the entire 320-byte internal variable buffer.
now in application area: user DEM in directory AIRPORT :
FORMAT $CHR1,16
$USER-BUFF = $PARAMETERS
DISPLAY ‘$CHR1 = ’,$CHR1 the displayed output would be :
$CHR1 = GREETINGS
IMPACT OF APPLICATION MODE ON INFO COMMANDS
INFO Commands Impact
INFO configuration looks in local area, then the application area, then in the file infosys directory.
ADD
COMPILE
CREATE
DEFINE will look in the local area, unless a pathname is specified.
looks for the <src> file in the application area, then in the local area. If invoked in the local area it will write the object file back to the application area.
creates a sub-directory in the local area.
writes the new <dat> and <nit> files in the application area.
A-116 Appendices INFO Reference Manual
EXST
EXTERNAL
GET
LOG
OUTPUT
PROGRAM
PURGE
RELATE
DELETE
DIF
DOCDF
DOCRP
DOCSF
DPG
DRP
DSF
EDIT
Appendix N
RGET
Application Mode
deletes the file or sub-directory from the local area, unless a pathname is specified.
creates the file in the local area.
same as DIF same as DIF same as DIF same as DIF same as DIF same as DIF looks for the <src> file in the application area, then in the local area. If invoked in the local area it will write the source file back to the application area upon leaving the editor.
looks in the local area, unless a pathname is specified.
will look in the local area first, then in the application area, unless a pathname is specified.
will look in the local area first, then in the application area unless a pathname is specified.
creates the log file in the local area, unless a pathname is specified.
creates the output file in the local area, unless a pathname is specified.
puts the <src> file in the application area.
re-creates the file in its resident area, with its protection privileges as they were.
looks for the <dat> and <nit> files in the application area first and then in the local area, unless the file is externalled.
same as GET
INFO Reference Manual Appendices A-117
Application Mode
RUN
SAVE
SELECT
SORT
SPOOL
SUFFIX
TYPE
XGET
XPRG
XRGET
Implications
Appendix N
looks for the <obj> file in the application area, then in the local area.
creates the file in the local area, unless a pathname is specified.
looks for the <dat> and <nit> files in the application area first, and then in the local area, unless the file is externalled. For Isam files, all sets and bitmaps are created locally.
all temporary work files are created in the local area. If the file being sorted is a fixed-length INFO file (i.e.non-
Isam) the sorted data will be written back to its original area; if more than one user sorts the file at the same time then, depending on the read-write access, the second user will either receive READ ONLY ACCESS and be unable to sort, or will overwrite the first user’s result. If the file being sorted is an Isam file, it is the INFO bitmap which is sorted and this is local to each user.
spools the files in the local area, unless a pathname is specified.
looks in the local area.
looks for <src> file in the application area, then in the local area.
same as GET same as PURGE same as RGET
Application Mode should be considered as a simpler, more efficient alternative to the ADIR model. It is inadvisable to combine the two approaches to multi-user applications development.
Because a number of users will be using the same <DR9> file it is important to remove read-write restrictions from this file so that multiple users can share the same <DR9> for an application.
A-118 Appendices INFO Reference Manual
Appendix N
Application Mode
The system item $APPLICATION-MODE will be set to 1 if the user entered an INFO directory in Application Mode; this may be tested in programs or interactively.
User work files are temporary in nature and are often purged prior to being used. Under Application Mode “user work files” are best created as local externals. INFO will always look for external files in the user’s local area
(attach point) first, unless a pathname is specified. Work files might be used for summarizing data prior to running a report.
For example, if an application includes a “user work file” called SUMMARY-FILE, which each user requires, then it should be externalled as a local file, perhaps with the same name for clarity. When a user area is set up , an empty SUMMARY-FILE should be present at the operating system level before the user invokes INFO.
INFO Reference Manual Appendices A-119
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
Appendix P IMPORT/EXPORT File Formats
Overview
This appendix discusses the six pre-set file formats that
IMPORT and EXPORT supports. These formats are
ASCII, SDF, 20/20, DIF, SYLK and CSV. It is possible to create other file formats yourself. See INFO-Exchange manual.
For this discussion, we use a sample datafile containing character, numeric, and date data. We print the datafile in each of the formats discussed below so that you can compare the formats. It is not necessary for you to define this datafile in your own work area.
$RECNO SALES
REGION
1
2
3
NORTHEAST
CENTRAL
WEST
ASCII Format
END.DATE
31-MAR-96
30-JUN-96
3--SEP-96
FORECAST
SALES
ACTUAL
SALES
200000
200000
200000
165000
210000
295000
In ASCII file format, each item value is delimited by a carriage return. Each records is delimited by two carriage returns. Character and date data are enclosed in double quotation marks. The example looks like this in ASCII:
“NORTHEAST”
“31-MAR-96”
200000
165000
“CENTRAL”
“30-JUN-96”
200000
210000
“WEST”
“30-SEP-96”
200000
295000
INFO Reference Manual Appendices A-125
IMPORT/EXPORT File Formats Appendix P
SYLK Format
CSV Format
INFO adheres to the format specified in Multi-plan documentation. When INFO reads a SYLK file, however, it ignores all formulae, storing only characters, numeric and data.
Our sales information file looks like this in SYLK format:
ID;INFO
B;Y3;X4
C:Y1;X1;K”NORTHEAST”
C:Y1;X2;K”31-MAR-1996”
C;Y1;X3;K200000
C;Y1;X4;K165000
C:Y2;X1;K”CENTRAL”
C:Y2;X2;K”30-JUN-1996”
C;Y2;X3;K200000
C;Y2;X4;K210000
C:Y3;X1;K”WEST”
C:Y3;X2;K”30-SEP-1996”
C;Y3;X3;K200000
C;Y3;X4;K295000
E
Comma Separated Values. INFO assumes that character items and dates are held as strings separated by commas with no quotation marks around the character items..
Example of the above data in CSV format:
NORTHEAST,31/03/1996,200000,165000
CENTRAL,31/06/1996,200000,210000
WEST,30/09/1996,200000,295000
A-126 Appendices INFO Reference Manual
Appendix P IMPORT/EXPORT File Formats
SDF Format
SDF format uses a comma as an item-value delimiter and a carriage return as a record delimiter. Character and date data are enclosed in double quotation marks
“NORTHEAST”,”31-MAR-1996”,200000,165000
“CENTRAL”,“30-JUN-1996”,200000,210000
“WEST”,”30-SEP-1996”,200000,295000
2020 Format
2020 format uses a # sign as an item-value delimiter and two # signs as a record delimiter. Character and date data are preceded by a quotation mark. If it is a single quotation mark, the characters are right-hand justified in the cell. If it is a double quotation mark, the characters are left-hand justified in the cell.
DIF Format
‘NORTHEAST#‘31-MAR-1996#200000#165000##
‘CENTRAL#‘30-JUN-1996#200000#210000##
‘WEST#‘30-SEP-1996#200000#295000##
DIF format appears more complex than the preceding three formats because it contains a header in addition to the data.
Header
The header of a DIF file contains data on the file name, the number of records in the file, and the number of item values in each record.
Every piece of information in a header requires three lines.
The first line is a label giving the type of information that follows. The second line is a row/column (often called a vector) designation. The last line is the information itself.
If the information consists of characters, it is enclosed in double quotation marks.
The file name is recorded as
TABLE
0,1
“NAME OF FILE”
INFO Reference Manual Appendices A-127
IMPORT/EXPORT File Formats Appendix P
Where NAME OF FILE represents the real name of the file. The row/column designation with the row equal to zero indicates that this is header information.
The number of items (columns) is recorded as follows:
VECTORS
0 NUMBER
“ “
Where NUMBER represents the number of items in the file
The number of records (called tuples in DIF) is recorded as follows:
TUPLES
0, NUMBER
“ “
The information in the header consists of the item names.
They are recorded as.
LABEL
#,0
“NAME”
Where # is the number of the column for this item, and
NAME is the item name.
The end of the header uses a marker to indicate the beginning of the data section. This entry is written as:
DATA
0,0
“ “
Data
Each record is marked by a special record called BOT
(Beginning of Tuple)
-1,0
BOT
A-128 Appendices INFO Reference Manual
Appendix P IMPORT/EXPORT File Formats
Each item value is represented by two lines: a numeric line and a character line. For numbers, these two lines take the form
0, number
V
Where number is the actual data.
Character data is written as
1,0
“text”
Where 1,0 is a code explaining that string text follows, and
“text” is the text itself.
The very end of the file is delimited with an EOD or endof-data record.
-1,0
EOD
Example Datafile in DIF Format
TABLE
0,1
“SALES.USA”
VECTORS
0,4
“ “
TUPLES
0,3
“ “
LABEL
1,0
“SALES. REGION”
LABEL
2,0
“END. DATE”
LABEL
3,0
“FORCAST.SALES”
LABEL
INFO Reference Manual Appendices A-129
IMPORT/EXPORT File Formats Appendix P
4,0
“ACTUAL. SALES”
DATA
0,0
“ “
-1,0
BOT
1,0
“NORTHEAST”
1,0
“31-MAR-1996”
0,200000
V
0,165000
V
-1,0
BOT
1,0
“CENTRAL”
1,0
“30-MAR-1996”
0,200000
V
0,210000
V
-1,0
BOT
1,0
“WEST”
1,0
“30-SEPT-1996”
0,200000
V
0,295000
V
-1,0
EOD
A-130 Appendices INFO Reference Manual
Appendix P IMPORT/EXPORT File Formats
Overview
This section describes how to modify the format table to conform to your file formats.
The format definitions for the six file types handled by
INFO are all stored in one table. You can customize the file formats by modifying the table. You make these modifications using your operating system’s editor software.
Use the Editor
The format table is located in the INFOSYS directory with
To Make Changes the other INFO software. You should copy this file, by its system name, into your system directory. The file name is
info9inx (Unix and Primos) or info9.inx (VMS)
Fields in the
Format Table
Once this copy—under the same name—is in your directory, run the editor. You can alter any of the entries in info9inx or you can add a new line with your own file format.
The table of file formats has several columns. Table O-1 shows the contents of the fields in the format table.
Table O-1. Fields in the Format Table
Field Name Description
FILE FORMAT Name of the format. This is the name used in the
IMPORT or EXPORT command line. It must be written in capital letters.
DELI Delimiter character between fields.
DATE FORM
TXT ENC
LFT TXT
If text is input into a date item type, it is translated into
INFO date storage format from this assumed convention.
Tells INFO whether text has text string delimiters at both ends. If it does, then a double appearance of the delimiter character is taken to be a single appearance of the character in text, that is, ‘INFO’’S RULE’ is translated as
INFO’S RULE.
Character indicating left-justified text.
INFO Reference Manual Appendices A-131
IMPORT/EXPORT File Formats Appendix P
Table O-1. Fields in the Format Table (cont’d)
Field Name Description
RT TXT
REP CHR
BEG ROW
END ROW
EOD
CELL CONT
NUM
TEXT
BEG-OF-DATA
ROW
COL
SHR VAL
REF
ROW REF
COL REF
Character indicating right-justified text.
Character indicating that next character should be repeated across the cell.
Character indicating that next field is start of new logical record.
Character indicating that no more fields are to be passed for current logical record.
Character indicating end of data.
Character indicating that record contains a data value.
Character indicating that numeric data follows.
Character indicating that text data follows.
Character indicating that data follows.
Character value indicating row where current cell is stored.
Character and value indicating column where current cell is stored.
Character indicating that current cell value is used again by another cell; current cell is called a shared cell.
Character indicating that current cell is filed using data from an earlier cell.
Character and value indicating the row from which to take a shared cell.
Character and value indicating the column from which to take a shared cell.
A-132 Appendices INFO Reference Manual
Appendix P IMPORT/EXPORT File Formats
Sources of
Error
Date Formats
Summary
If you elect to add your own file format to the format table, it is important to remember that minor modifications are more apt to work than an entirely new format. Feel free to change a delimiter, but, if you add a new format, take care to follow all the guidelines
Do not specify both NONE for DELI and NO for TXT ENC.
Although published specifications for DIF and SYLK file formats allow extension through additional features, they also state that programs using DIF format should explicity ignore any fields they do not recognize. This is our policy as well. If you make an addition to a DIF file, and INFO does not recognize it, the IMPORT command ignores it.
Most spreadsheets use a date format like this:
29-FEB-1996
The format table contains a column that uses INFO DFMT command notation to set up the date format of the imported data. If you use a spreadsheet with a different date format, you can change the format table so that its format is supported.
INFO handles a large number of date formats; make sure that the table entry you use matches the DFMT command’s date formats.
INFO uses a format table to store information on the delimited file formats its supports. You can use your operating system’s editor to make alterations to this table.
You should, however, keep in mind the many sources of error you can introduce when you alter a working system.
see also
EXPORT
IMPORT
Appendix G “Controlling Default Assignments”
INFO Reference Manual Appendices A-133
Appendix Q Configuration files
The INFO configuration file is an ASCII file which may be used for setting up INFO variables, either system-wide or application only. When an INFO username is entered,
INFO will search for the info.cfg file (text.cfg for INFO-
Text) and execute it as a command input file after the
INFO username has been entered but before running the programme PROFILE. THE INFO configuration file will accept interactive commands not associated with SELECT and RELATE, that do not update the INFO dr9 directory file, and that do not require terminal input.
If the settings in the configuration file are to be applied to all INFO users, then the info.cfg (text.cfg) file should be placed in the infosys directory. If the settings are particular to an application, the file should be placed in the application area (if in Application Mode) or the alternative directory (if in ADIR mode). If the settings are particular to one user, the file should be placed in the user’s local directory.
The default settings or execution of some internal variables have changed between previous versions of
INFO. To emulate a previous version, see the table below.
Variable
$ BLANK-FIELD
$ CHECK-NOMATCH
$ DOPS2
$ PURGE-LOCAL
$ SET1NOSEL
$ SINGLE-DETAIL
$ SVIDEL
$ SWITCH-DEFAULT
$ UPF-NC
INFO revision
9.23
9.31
1
3
0
1
1
1
0
1
1
0
1
1
1
1
1
1
0
3
9.42
0
1
1
0
1
0
1
0
3
9.51
0
1
1
1
1
0
1
0
0
INFO’s search rules for the info.cfg configuration file are:
First look in the local directory.
Secondly, if in Application Mode (see Appendix N of the
INFO Reference Manual), INFO will look in the application directory.
Lastly, INFO will look in the INFOSYS directory.
INFO Reference Manual Appendices A-135
Appendix R
Dossier Utility
The INFO Dossier is a collection of stand-alone documentation aids producing listings of the application source and where-used cross references.
INFO Dossier is written in INFO The minimum access rights required for a user of INFO Dossier are delete, read and write. If you have any doubts on these, then please ask your system administrator.
=============================
== INFO Dossier MENU ==
=============================
1 - Build Documentation File
2 - Print Documentation
3 - Build Cross Reference Files
4 - Print Files - where used Cross Reference Listing
5 - Print Programs - used Cross Reference Listing
6 - Print Reports - used Cross Reference Listing
7 - Print IPF's - where used Cross Reference Listing
8 - Print SPF's - where used Cross Reference Listing
9 - Print Called Programs Cross Reference Listing
10 - Print Variables used Cross Reference Listing
11 - Print File Item sizes Cross Reference Listing
12 - Print Unreferenced Directory entries
13 - Print 4-12 above Cross Reference Listing
14 - Delete Documentation and Cross Reference files
Enter function (99 TO EXIT INFO)
INFO Reference Manual Appendices A-137
Dossier Utility
Menu
Selection
Options
User Name
WARNING
Pathname
Print files
Appendix R
The utilities described in this section are selectable from the above menu. The system will not inquire into your terminal type for if you are running on more than one terminal type within your installation, we have provided you with a terminal configuration system that is independent of the application. Please check with your system administrator if you have any doubts.
General Notes on using INFO Dossier
enter the desired option number followed by carriage return - invalid selection will result in the re-prompting for a valid option.
when in any option, it is possible to return to the Menu by entering a carriage return instead of pathname or user name this is the three character user name as is used by INFO to set up the operating system prefix to all the entries associated with the user. If you normally enter a user name with more than three characters, then INFO will use the 1st, 2nd and 4th characters to identify you - so user name JOHN will generate an INFO directory called
JON.DR9 and the associated directory entries will be held in the form of:
JONOOO.DAT, JONOOO.NIT, JON001.SRC, JON001.OBJ
etc.
if another user has the same User Name as you or indeed if you have generated documentation before and not deleted it then the Build options (1 and 3) will overwrite the existing documentation files.
this is the operating system pathname where the user directory is held. It must be held in the normal operating system format.
e.g. DUB5:[JOHN.DEVELOPMENT] is a valid pathname all the printed output will be sent to the system printer via the spooler with neither a FORM nor PAPER type specified, but with a print option of F implying imbedded
ANSI defined printer control characters. It is NOT possible to run any of the Print options without running the appropriate Build option first.
A-138 Appendices INFO Reference Manual
Appendix R
Generated
Files
Dossier Utility
the files generated and used by each option are:
=============================
== INFO Dossier MENU ==
=============================
1 - Build Documentation File
generates XXX.DOC
2 - Print Documentation
prints XXX.DOC
3 - Build Cross Reference Files
generates
XXX.FLE files- where-used
XXX.PRG program used
XXX.RPT reports used
XXX.IPF IPF's used
XXX.SF SPF's used
XXX.CP called programs
XXX.VAR variables
XXX.FMT variable formats
XXX.ITM file item sizes
XXX.NON unreferenced entries
4 - Print Files - where used Cross Reference Listing
uses XXX.FLE to Print
XXX.XRF
5 - Print Programs - where used Cross Reference Listing
uses XXX.PRG to print
XXX.XRF
6 - Print Reports - where used Cross Reference Listing
uses XXX.RTT to Print
XXX.XRF
7 - Print IPF's - where used Cross Reference Listing
uses XXX.IPF to print
XXX.XRF
INFO Reference Manual Appendices A-139
Dossier Utility
Appendix R
8 - Print SPF's - where used
9 - Print Called programs
10 - Print Variables used
11 - Print File Items sizes
Cross Reference Listing
uses XXX.SF to Print
XXX.XRF
Cross Reference Listing
uses XXX.CP to print
XXX.XRF
Cross Reference Listing
uses XXX.VAR and XXX.FMT to Print XXX.XRF
Cross Reference Listing
uses XXX.ITM to Print
XXX.XRF
12 - Print Unreferenced Directory entries
uses XXX.NON to Print
XXX.XRF
13 - Print 4-12 above Cross Reference Listings
uses XXX.FIL XXX.PRG
XXX.RPT XXX.IPF XXX.SF
XXX.CP XXX.VAR XXX.FMT
XXX.NON to Print XXX.XRF
14 - Delete Documentation and Cross Reference files deletes XXX.CP XXX.ITM
XXX.DOC XXX.FLE XXX.FMT
XXX.IPF XXX.NON XXX.PRG
XXX.REP XXX.SF XXX.VAR
XXX_XRF.LIS
Enter function( 99 to EXIT INFO )>
A-140 Appendices INFO Reference Manual
Appendix R
Dossier Utility
1 Build Documentation File
The selection of this function by the operator causes the generation of a complete documentation file of an application system including directory listings, file layouts, input screen formats, program source code, and report and special form formats. They are saved in a file (for later output by Function 2) in the order listed above and are sorted alphabetically by name in each of the categories listed.
Enter function( 99 to EXIT INFO )>1
*** Now Building System Documentation ***
Enter Pathname in which system is located
>DUB5:[JOHN.DEVELOPMENT]
Enter 3 Character INFO User Name >JON
Error
Condition
if pathname incorrect or user not found or permissions denied then the following three lines will be displayed :
LU 4 DUB5:[JOHN .DEVELOPMENT]JON.DR9 %RMS-E-FNF, file not found (DBPGET)
Unsuccessful attempt to retrieve your file
Please re-enter your Pathname otherwise the system will continue by displaying:
** please use user name JON to Print your system documentation **
** Please wait for the documentation to be generated **
The operator is requested to Provide the pathname of the directory where the application system to be documented is located. The pathname should be entered in the standard operating system format.
INFO Reference Manual Appendices A-141
Dossier Utility
Appendix R
Subsequent to its entry, the system will prompt the operator for the user name with which to enter INFO in the named user file directory. Only the three letter short user name may be entered. The system will then proceed to create a documentation file for the system requested which may be printed out by later selection of Function 2 on the menu. This generation function may require several minutes to complete depending on the size of the system being documented. During the documentation phase read only access is required on the user directory and its associated entries. It is however unwise to document a system while it is in use particularly if programs are being amended as it is possible for changes to be lost if this option is run on a particular entry during the re-filing of a change. On completion, the menu is redisplayed on the screen. The documentation file created with this option is in print image form and held as "XXX.DOC" and is stored in the INFO.Dossier directory where XXX (3 characters) is the user name that was entered earlier.
A-142 Appendices INFO Reference Manual
Appendix R
Dossier Utility
2 Print Documentation
Enter function (99 to EXIT INFO )> 2
Enter User Name for Documentation > JON
Job JON (queue SYS$PRINT), entry 19) started on SYS$PRINT
This function may be selected after Function 1 has been performed for a particular application system or after the user has copied his own documentation file into
INFO.UTILITIES and named it XXX.DOC (XXX is any 3 character INFO user name).
Upon the selection of this function, the operator is asked for the particular user name for which documentation is to be printed. After one is entered, this function simply
SPOOLs the file to the system printer.
INFO Reference Manual Appendices A-143
Dossier Utility
Appendix R
3 Build Cross Reference Files
Enter function (99 to EXIT INFO )>3
*** Now Building System Cross Reference Documentation ***
Enter pathname in which system is located>DUB5:[JOHN.DEVELOPMENT]
Enter 3 Character INFO User Name >JON
Error
Condition
if pathname incorrect or user not found or permissions denied then the following three lines will be displayed:
LU 4 DUB5:[JOHN.DEVELOPMENT]JON.DR9 %RMSE-FNF, file not found (DBPGET)
Unsuccessful attempt to retrieve your file
Please re-enter your Pathname otherwise the system will continue by displaying:
** now cross referencing programs **
The operator is requested to provide the pathname of the directory where the application system to be documented is located. The pathname should be entered in the standard operating system format.
Subsequent to its entry, the system will prompt the operator for the user name with which to enter INFO in the named user file directory. Only the three letter short user name may be entered. The system will then proceed to create the cross reference files for the system requested which may be printed out by later selection of Functions 4 to 13 on the menu. This generation function may require several minutes to complete depending on the size of the system being cross referenced. During the cross reference phase read only access is required on the user directory and its associated entries. It is however unwise to cross reference a system while it is in use Particularly if programs are being amended as it is possible for changes
A-144 Appendices INFO Reference Manual
Appendix R
Dossier Utility
to be lost if this option is run on a particular entry during the re-filing of a change. The program displays courtesy messages when running such as
** Cross Referencing STOCK.UPDATE.PG ** so the user can see how far the cross referencing has progressed. On completion, the menu is redisplayed on the screen. The cross reference files created with this option are NOT in Print image form. The names of the files have been described in the overview above.
INFO Reference Manual Appendices A-145
Dossier Utility
Appendix R
4 Print Files - where used
(Cross Reference Listing)
Enter function (99 to EXIT INFO )> 4
Enter User Name for Documentation > JON
Job JON (queue SYS$PRINT), entry 19) started on SYS$PRINT
The selection of this function causes the generation of a file cross-reference listing. The report is ordered by file name and lists each program and the line numbers on which each file is called along with the file's relation numbers (0 if selected), relation items, and relation options.
Upon selection of this function, the operator is asked to enter the directory pathname and the user name of the system for which the cross-reference listing is to be printed as in option 1 above.
After the user name has been entered, the system accesses the file cross-reference file for that user and generates the cross-reference report. The file crossreference file generated by Function 3 is saved as a direct-access file with a prefix of the user's name so that multiple users can operate from this directory easily without impacting one another.
A-146 Appendices INFO Reference Manual
Appendix R
Dossier Utility
5 Print Programs - used
(Cross Reference Listing)
Enter function (99 to EXIT INFO )> 5
Enter User Name for Documentation > JON
Job JON (queue SYS$PRINT), entry 19) started on SYS$PRINT
Selecting this option generates a program cross-reference listing. The report is ordered by program and lists all files, reports, input forms, special forms, and other programs called by each program and the line numbers on which they are called. For files, their relation numbers, items, and options are additionally listed and for reports, input forms, and special forms the options selected are also
Printed out.
On selecting this function, the operator is asked to enter the user name of the system for which the cross-reference listing is to be printed. After the user name has been entered, the system accesses the program cross-reference file for that user and generates the cross-reference report.
The program cross-reference file generated by Function 3 is saved as a direct-access file with a prefix of the user's name so that multiple users can operate from this directory easily without impacting one another.
INFO Reference Manual Appendices A-147
Dossier Utility
Appendix R
6 Print Reports - used
(Cross Reference Listing)
Enter function (99 to EXIT INFO )> 6
Enter User Name for Documentation > JON
Job JON (queue SYS$PRINT), entry 19) started on SYS$PRINT
Selecting this function generates a report cross-reference listing. The report is ordered by report name and lists each program and the line numbers on which each report is called, the Print option selected, and the files selected and related when the report is generated.
Note: Only those files selected and related in the same program in which the report is generated are listed.
Upon selection of this function, the operator is asked to enter the user name of the system for which the crossreference listing is to be printed. After the user name has been entered, the system accesses the report crossreference file for that user and generates the crossreference report.
The report cross-reference file generated by Function 3 is saved as a direct access file with a Prefix of the user's name so that multiple users can operate from this directory easily without impacting one another.
A-148 Appendices INFO Reference Manual
Appendix R
Dossier Utility
7 Print Input Forms - where used
(Cross Reference Listing)
Enter function (99 to EXIT INFO )> 7
Enter User Name for Documentation > JON
Job JON (queue SYS$PRINT), entry 19) started on SYS$PRINT
This option generates an input form cross-reference listing. The report is ordered by input form name and lists each program and the line numbers on which each input form is called, the options selected, and the files selected and related when the input form is generated.
Note: Only those files selected and related in the same program in which the input form is generated are listed.
Upon selection of this function, the operator is asked to enter the user name of the system for which the crossreference listing is to be printed. After the user name has been entered, the system accesses the input form crossreference file for that user and generates the crossreference report.
The input form cross-reference file generated by Function
3 is saved as a direct-access file with a prefix of the user's name so that multiple users can operate from this directory easily without impacting one another.
INFO Reference Manual Appendices A-149
Dossier Utility
Appendix R
8 Print Special Forms - where used
(Cross Reference Listing)
Enter function (99 to EXIT INFO )> 8
Enter User Name for Documentation > JON
Job JON (queue SYS$PRINT), entry 19) started on SYS$PRINT
This option generates a special form cross-reference listing. The report is ordered by special form name and lists each program and the line numbers on which each special form is called, the options selected, and the files selected and related when the special form is generated.
Note: Only those files selected and related in the same program in which the special form is generated are listed.
Upon selection of this function, the operator is asked to enter the user name of the system for which the crossreference listing is to be printed. After the user name has been entered, the system accesses the special form crossreference file for that user and generates the crossreference report.
The special form cross-reference file generated by
Function 3 is saved as a direct-access file with a prefix of the user's name so that multiple users can operate from this directory easily without impacting one another.
A-150 Appendices INFO Reference Manual
Appendix R
Dossier Utility
9 Print Called Programs
(Cross Reference Listing)
Enter function (99 to EXIT INFO )> 9
Enter User Name for Documentation > JON
Job JON (queue SYS$PRINT), entry 19) started on SYS$PRINT
This option generates a called program cross-reference listing. The report is ordered by program name that is called and lists the Programs and the line numbers from which each program is called.
Upon selection of this function, the operator is asked to enter the user name of the system for which the crossreference listing is to be printed. After the user name has been entered, the system accesses the called program cross-reference file for that user and generates the crossreference report.
The called program cross-reference file generated by
Function 3 is saved as a direct-access file with a Prefix of the user's name so that multiple users can operate from this directory easily without impacting one another.
INFO Reference Manual Appendices A-151
Dossier Utility
Appendix R
10 Print Variables Used
(Cross Reference Listing)
Enter function (99 to EXIT INFO )> 10
Enter User Name for Documentation > JON
Job JON (queue SYS$PRINT), entry 19) started on SYS$PRINT
The selection of this function causes the generation of an internal variable cross-reference listing and the formats of the internal variables where explicitly formatted by the programs. The cross reference report is ordered by program name and by internal variable number (1-40) within each program and lists the line number, internal variable, and full text of each program line on which every internal variable is used. The variable formats file is ordered by variable number (i.e. 1 through 40), variable prefix ($CHR, $DAT, $NUM) and program.
Upon selection of this function, the operator is asked to enter the user name of the system for which the crossreference listings are to be printed. After the user name has been entered, the system accesses the internal variable cross-reference file for that user and generates the cross-reference report and the unreferenced directory entries file for its associated report.
Both internal variable cross-reference files generated by
Function 3 are saved as direct-access files with a prefix of the user's name so that multiple users can operate from this directory easily without impacting one another.
A-152 Appendices INFO Reference Manual
Appendix R
Dossier Utility
11 Print File Item Sizes
(Cross Reference Listing)
Enter function (99 to EXIT INFO )> 11
Enter User Name for Documentation > JON
Job JON (queue SYS$PRINT), entry 19) started on SYS$PRINT
The selection of this function causes the generation of an items cross-reference listing. The report is ordered by item name and by file in which it is located and lists its defined width, output width, type, and number of decimals in each file.
Upon selection of this function, the operator is asked to enter the user name of the system for which the crossreference listing is to be printed. After the user name has been entered, the system accesses the items crossreference file for that user and generates the crossreference report.
The items cross-reference file generated by Function 3 is saved as a direct-access file with a prefix of the user's name so that multiple users can operate from this directory easily without impacting one another.
INFO Reference Manual Appendices A-153
Dossier Utility
Appendix R
12 Print Uncalled Directory Entries
Enter function (99 to EXIT INFO )> 12
Enter User Name for Documentation > JON
Job JON (queue SYS$PRINT), entry 19) started on SYS$PRINT
The selection of this function causes the generation of a cross-reference listing of the unreferenced entries in the user directory. The report is ordered by entry name but at the current release it may be inaccurate and include entries that are only referenced by the execute command from file based menu-programs.
Upon selection of this function, the operator is asked to enter the user name of the system for which the unreferenced directory listing is to-be printed. After the user name has been entered, the system accesses the unreferenced directory file for that user and generates the unreferenced directory report.
The unreferenced directory file generated by Function 3 is saved as a direct-access file with a prefix of the user's name so that multiple users can operate from this directory easily without impacting one another.
A-154 Appendices INFO Reference Manual
Appendix R
Dossier Utility
13 Print 4-12 Above
(Cross Reference Listing)
Enter function (99 to EXIT INFO )> 13
Enter User Name for Documentation > JON
Job JON (queue SYS$PRINT), entry 19) started on SYS$PRINT
The selection of this function causes the generation of all of the cross-reference listings described in Functions 4 through 12. This function may be used to save the time required to request each listing separately when all are desired. All listings are also SPOOLed at once as one large SPOOL file after all have been formatted.
INFO Reference Manual Appendices A-155
Dossier Utility
Appendix R
14 Delete Documentation and Cross
Reference Files
Enter function (99 to EXIT INFO )> 14
Enter User Name for Documentation > JON
DUB5:[DOSSIER]JON.CP;1
DUB5:[DOSSIER]JON.DOC;1
DUB5:[DOSSIER]JON.FLE;1
DUB5:[DOSSIER]JON.FMT;1
DU85:[DOSSIER]JON.IPF;1
DU85:[DOSSIER]JON.ITM;1
DUB5:[DOSSIER]JON.NON;1
DUB5:[DOSSIER]JON.PRG;1
DUB5:[DOSSIER]JON.REP;1
DUB5:[DOSSIER]JON.SF;1
DUB5:[DOSSIER]JON.VAR;1
DUB5:[DOSSIER]JON_XRF.LIS;1
Total of 12 files
Do you want to delete these files? (Y/N) Y
Files DELETED .. returning to MENU
Error
Condition
if a file is open, user not found or access rights denied then the following line will be displayed:
%DIRECT-W-NOFILES, no files found
The selection of this function causes the display of the cross reference flies generated by Functions 1,3,4 through
12. This function may be used to delete any documentation files generated for a specific user. If the user name is not found then no files will be displayed. Any response other than "Y" to the question, "Do you want to delete these files (Y/N)"
will leave the files intact. The program returns to the menu on completion.
A-156 Appendices INFO Reference Manual
Appendix S
Data Entry
DATA ENTRY
Scientific
Notation
To enter a value into INFO, type the value or command and press <RETURN>. INFO interprets the values you enter accordingly: n
Character data entered as character strings.
n
Numeric data entered as numeric constants. Can be regular numbers per data type, or entered in scientific notation. Always interpreted as the numeric value the entry represents. Numbers greater than 1,000 can include commas (see below).
n
Dates entered as mm/dd/yyyy or fewer characters or in military format as mmm-dd. Always stored as
YYYYMMDD (see below).
INFO accepts numeric values expressed in scientific notation. INFO stores the value in that item's internal storage format. The entered term must fit within the item's output width. The value (not the length of the term expressed in scientific notation) must fit the item's internal width. Scientific notation is an alternate way of displaying a value, not an alternative storage format. Any numeric value except a date can be entered in scientific notation.
When INFO displays or prints a numeric value, if the item's output width does not permit display of the entire value, INFO attempts to display the value in scientific notation.
A value in scientific notation consists of a real number and a power of ten by which the real number is multiplied.
Values expressed in scientific notation appear in this syntax:
+#E+NN
-D-
Where # is the real number and NN is the power of ten by which it is multiplied: E and D are synonymous
A + or - sign preceding the numeric value is optional. If the sign is omitted, INFO assumes a positive value.
INFO Reference Manual Appendices A-157
Data Entry
Appendix S
Comma Use
The value # must be at least one digit long, and cannot be longer than sixteen significant figures. The value of # can include a decimal point. If # is one digit, this digit can either precede or follow the decimal point. The number of digits in n may range up to the maximum places for which the field is specified.
An exponent consists of the letter E, a + or - sign, and two digits NN. A leading 0 is required if the exponent is less than 10. The exponent can range from -99 to +99.
D can be specified instead of an E as it is used with some other languages (notably BASIC).
The examples below show the expression of values in regular and scientific notation:
.00000141 1.41E-06
4,236,000 +4.236E+06
The number -28,900,000,000,000,000,000,000,000,000 can be expressed as a BASIC double-precision number:
-2.89D+28
Since INFO stores the values in the internal form, INFO considers 4236E+03 to be the same as 4.236E+06.
You can express values using scientific notation at any point in an INFO session that you express values as numeric constants. The minimum output width for an item to express a value in scientific notation is five.
INFO accepts and displays commas as part of numeric values under the following circumstances: n
Comma (,) is not the current delimiter character. To set the delimiter character, see the DELIMITER command.
n
The system item $COMMA-SWITCH does not have the value of -1.
If $COMMA-SWITCH is set to 0, its default value, INFO displays commas where there is space. If the output width is sufficiently larger than the internal width of a given datafile item or system variable to include the added spaces required by commas, INFO displays the commas.
A-158 Appendices INFO Reference Manual
Appendix S
Data Entry
Date Formats
Date Output Displays
As long as there is sufficient space in the output width of the item, INFO accepts data that includes commas.
INFO stores dates in the format of YYYYMMDD. The internal width of a D-type item is always 8 bytes. The output width of a D-type item can vary. The table below shows the effect of different date output widths on the same date:
Date Displayed
12/24/1996
12/24/96
12/24
12
Output Width
10
8
5
2
INFO accepts dates in the format determined by the current DFMT setting. You can also change the date separator character from its default character / (slash).
If the setting is MDY, the setting can include the M option for the date format of mmm-dd-yyyy, where mmm is the first three letters of the month. For example, 01/12/96 is expressed as JAN-15-1996.
INFO Reference Manual Appendices A-159
Appendix T
Dates
Start date is 1/1/1801
To obtain the number of days since 12/31/1800, set a $DAT variable to the required date and then calculate a $NUM variable to it.
eg.
$DAT1 = 1/2/1934
$NUM40 = $DAT1
$NUM40 = 48,579 i.e
1/2/1934 is the 48,609 th
day since 13/31/1800 eg.
$DAT1 = 1/1/2000
$NUM40 = $DAT1
$NUM40 = 72,684 i.e.
on 1/1/2000, 72,684 days have passed since 12/31/1800
DATES are held internally in the format CCYYMMDD.
Months and days <10 are, by default, space filled: if leading zeros are required when displaying dates, this may be achieved by setting the internal variable
$ZDATE to 1.
INFO Reference Manual Appendices A-161
Appendix U
Printing
UNIX
An unqualified INFO SPOOL command sends the contents of the INFO spool file (or the currently open output file) to the default printer, using the UNIX command lpr. It is possible to force INFO to use another UNIX command rather than lpr by setting the environment variables _INFOSPL and
_INFOSPLEX. For example, if you wished to display the contents of the spool file to the screen, by setting the environment variable _INFOSPL to the UNIX command more, the INFO SPOOL command will perform a more on the specified file. Another example is where you may wish to save the contents of the spool file to another file: by setting the environment variables _INFOSPL to the UNIX command cat and _INFOSPLEX to >/tmp/tempfile, the INFO SPOOL command will write the contents of the specified file to /tmp/tempfile.
INFO Reference Manual Appendices A-163
Appendix V
Terminal Drivers
To change a terminal type within an INFO session, use the INFO command
TERM: an unqualified TERM command displays the current setting. To change the setting, simply type TERM terminal_type : a list of valid terminal types may be displayed by typing in an invalid type, such as TERM BOBO.
To change the terminal type for all INFO users, you need to attach to the
_INFOSYS directory and invoke INFO with the username re9 : any change you make to the terminal type in here will be reflected to all INFO users, unless they have their own local setting. It is also possible to define your own termial driver for use within INFO: in the re9 username in the _INFOSYS directory there is a program called P.NT, and running this will prompt you for details of the terminal, such as screen clear.
UNIX only
If you invoke INFO without the –n option, INFO will use the UNIX curses terminal handler; it will take the value of the UNIX environment variable TERM.
If you invoke INFO with the –n option, INFO will use its own terminal drivers for terminal handling. The default terminal type shipped is ANSI but this may be changed, either for an INFO session or system-wide.
If you are running INFO on a workstation X11 terminal, you would probably wish to use the curses library for terminal handling. If you are running INFO from an ANSI or VT100 compatible terminal, you may prefer to use the INFO terminal handling mode.
INFO Reference Manual Appendices A-165
#
Glossary
This glossary contains working definitions of terms used throughout this manual, especially those used in the syntax descriptions of INFO's commands.
An integer that is subject to a particular limit or range, depending upon its context in a syntax description.
active command alternate_name
An INFO command that, when used interactively or in odd-numbered sections of INFO programs, makes one complete reading and processing of the working set of data file records. i.e. a command which is executed once for each record in the working set.
An optional name that can be used interchangeably with the data file item name.
arithmetic_expression A combination of data file items, system items, system variables, literals and arithmetic operators from which a single numeric value is derived; for example,
HRLY-RATE * HRS-WRKD
$REPDAT + 3
arithmetic_operators
The characters such as +, -, *, /, **, LN, and WD that represent addition, subtraction, multiplication, division, exponentiation, logarithm, and width (of a C item without trailing blanks) in an arithmetic expression. See Table BE-1 for a complete list.
beg_rec_# bitmap
An integer that specifies the data file record at which to begin processing.
An index file formed by INFO when an Isam file or large (> 16320 records) INFO datafile is selected.
INFO Reference Manual Glossary G-1
Glossary brk_level character character_item
An integer from 1 to 6 that represents a break level in an INFO report. 1 represents the highest level break, and 6 represents the grand total break.
A single (1 byte) letter, number, blank space, or punctuation mark.
A term covering character_type, DF_item, system_variable, system_item and string literal.
column concord inconsistent
A condition of an extended datafile in which the concord characteristics of the concordable items is not reflected in the most recent concordance of the datafile. An extended datafile can be concord consistent and still have records that have not been concorded.
concordance
An integer that specifies the character position along a line on a terminal display or printed page where information is displayed or printed.
content content_width
A cross index of the relative position of the words in the concordable items of an extended datafile. Each extended datafile has one concordance.
Information located at a specified line (row) and column position. It can be a literal, data file item, system item, system variable, or arithmetic expression.
An integer that specifies the display length in characters of a content field.
G-2 Glossary INFO Reference Manual
datafile_item datafile_name date_item decimal_places delimiter character
DF_item
DF_name directory_path directory_spec duplicates
Glossary
A 1- to 16-character name of an item in an INFO data file.
A 1- to 32-character name of an INFO data file.
A term covering date_type, DF_item, system_variable, system_item and date literal.
The number of decimal digits of precision to be displayed to the right of the decimal point in a numeric value.
The character used to separate multiple values during the entry of information. The delimiter character can be any non-numeric character other than a blank.
An abbreviation for the glossary term data file item; a
1- to 16-character name of an item in an INFO data file.
An abbreviation for the glossary term datafile_name; a 1- to 32-character name of an INFO-Text datafile.
A fully qualified directory name, minus a file name.
A VMS device and/or directory name. An external variable name can be substituted.
An item characteristics for ISAM keys only; can have a value of Y or N. Indicates whether duplicate key values are allowed.
INFO Reference Manual Glossary G-3
Glossary end_rec_# extended datafile
An integer that specifies the data file record at which to end processing.
An INFO-Text datafile that contains A- or concordable
C-type items.
external variable
A generic term to encompass environment variables under Unix, logicals under VMS and global variables under Primos.
FC_name file_name file_name_root file_path form_name
An abbreviation for the glossary term forms control name; a 1- to 32-character name of an INFO forms control file.
A 1- to 32-character name of an INFO file of any type.
The first 6 characters of the internal name of an INFO file of any type.
A full pathname, including the file directory and file name.
A 1- to 32-character name of an INFO report, input form, or special form.
forms_control_name
A 1- to 32-character name of an INFO forms control file.
identifier
A legal name given to an INFO file being created or to a data file item being created.
G-4 Glossary INFO Reference Manual
Glossary
IF_name index input_form_name
An abbreviation for the glossary term input_form_name: a 1- to 32-character name of an
INFO input form file.
An integer from 1 to 9 that corresponds to one of the
9 INFO system items ($IDX1-$IDX9) available for accessing an arrayed data file item.
A 1- to 32-character name of an INFO input form file.
integer internal_name internal width
Isam
A whole number, such as 0, 6, -113.
A unique 9-character name for directory files created by INFO.
An integer that specifies the number of bytes required to store information in a data file item, system item, or system variable.
Indexed Sequential Access Method. C-Isam on Unix,
RMS on VMS and MIDAS on Primos.
Isam_key item_characteristics
INFO data file item characteristics specified in the
ALTER, DEFINE, REDEFINE and MODIFY dialogs.
item_name
A datafile item that is also a key field for accessing records in an ISAM file.
item_type
A 1- to 16-character name of either a data file item, a system item, or a system variable.
The format INFO uses to store and manipulate data in a data file item, system item, or system variable.
Mustbe one of the characters B, C, D, F, I, L, N, O, P,
T, or V.
INFO Reference Manual Glossary G-5
Glossary key_level
An item characteristic for MIDAS keys only (Prime only).
key_logical_expressionA combination of Isam keys, literals and arithmetic operators from which a value of TRUE or FALSE is derived.
label_name
A 1- to 16-character name that identifies a command line in an INFO program or input form.
line_count literal logical connector
An integer that specifies the number of lines contained in a forms control page, or that specifies the number of lines to search when using the
CHANGE command.
A string, a number, or a date which directly represents a value. A constant. 'XYZ 123', 1234 and 6/10/57 are examples of a string literal, a numeric literal and a date literal, respectively.
One of the reserved words AND, OR and XOR used to build complex logical expressions.
logical_expression
A combination of items, system items, system variables, literals and arithmetic logical operators from which a value of TRUE or FALSE is derived; for example,
$RECNO LE $NUM1
HRS-WRKD * HRLY-WAGE GE 600 AND $MONTH EQ 5
$NUM1 LE 100
G-6 Glossary INFO Reference Manual
matchword member null value numeric_item occurs output_width page_width password
PG_name
Glossary
a combination of characters valid for a word in an
INFO-Text search and including the special characters for truncation and/or wild character.
A member of a list all of which are considered the equivalent of the synonym the list is formed under when creating word expressions.
The default value for a datafile item if it is not assigned when INFO-Text writes a new record. The default value for a numeric value is 0. The default value for a character item is blank.
A term covering numeric-type DF_item, system_variable, system_item and numeric literal.
An item characteristic for arrayed data file items only; indicates the number of elements in an arrayed data file item.
An integer that specifies the number of characters displayed or printed for a data file item, system item, or system variable.
An integer that specifies the width in characters of the output page written by an INFO forms control file.
A 1- to 4-character name associated with a particular protection level on an INFO data file or data file item.
An abbreviation for the glossary term program_name: a 1- to 32-character name of an INFO program file.
INFO Reference Manual Glossary G-7
Glossary prefix
Primos program_name protection_level rec_# relate_# report_name root row
RP_name
G-8
A series of alphanumeric characters used to qualify the names of INFO files.
A proprietary operating system from Computervision
Corp.
A 1- to 32-character name of an INFO program file.
An integer from 0 to 4 that specifies the level of security on a data file item. 0 represents the most restrictive level of protection, and 4 represents no protection.
An integer that specifies the relative position of a record in a data file.
An integer from 0 to 9 that specifies the relational level of a data file to the selected data file. 0 specifies the selected file.
A 1- to 32-character name of an INFO report file.
A series of characters used by INFO-Text as the prefix of the complete names of text files associated with a particular A-type item in an extended datafile.
Roots can be user-nameable or not and can be a maximum of 16 characters long, though by using external variables, longer roots may be specified.
An integer that specifies a line where the terminal's cursor is positioned during the execution of a report, input form, or special form.
An abbreviation for the glossary term report_name: a
1- to 32-character name of an INFO report file.
Glossary INFO Reference Manual
scientific notation section_number selected set set-#
SF_name
Glossary
An alternate means of expressing a numeric value. A number expressed in scientific notation contains a real number and an exponenet of by which the number is multiplied.
A number that identifies a program section of an
INFO program file.
the records in the currently selected datafile.
An integer from 1 to 16 that corresponds to a predetermined set of ISAM file records established by a
RESELECT BY command.
An abbreviation for the glossary term special_form_name: a 1- to 32-character name of an
INFO special form file.
spacing special_form_name
A 1- to 32-character name for an INFO special form file.
start_line
An integer, either 1 or 2, that specifies single- or double-spacing for the output from an INFO report file.
string
An integer that specifies a line in an INFO forms control file where some action should begin.
Start_line can be an integer, a numeric data file item, system item, or system variable, or an arithmetic expression.
A series of alphanumeric characters of any length enclosed by single quotes.
INFO Reference Manual Glossary G-9
Glossary subtopic synonym system_item system_variable template terminal_type text topic
In a help file, a subtopic is a subordinate topic under a topic of information.
A term you can create as the equivalent to any number of other words that might be included in a text file. You can use the synonym in a free text query to find all occurrences of its members.
The name of an INFO system item, such as
$REPDAT. See Appendix D 'System items'.
The name of a formatted position in INFO's system variable buffer ($CHR1–$CHR40, $DAT1–$DAT40, or $NUM1–$NUM40). See 'System variables'.
An INFO data file you create only so that its item definitions can be used with some other file.
A 1- to 4-character name of a video display terminal that supports INFO.
A series of words that comment on commands in an
INFO program, or that act as a user-defined error message.
The name of a subject for which information is available through INFO's HELP command.
G-10 Glossary INFO Reference Manual
tree relate type unselected set user name
Unix
VMS width
Glossary
where a datafile is related to the selected file via another related file, for example:
SEL FILE-A
REL FILE-B 1 BY ITEM-X
REL FILE-C 2 BY $1ITEM-Z
In this example, ITEM-X is a field common to both
FILE-A and FILE-B, while ITEM-Z is a field common to both FILE-B and FILE-C.
An abbreviation for the glossary term item type that specifies the way INFO stores and manipulates data in a data file item, system item, or system variable.
Must be one of the characters B, C, D, F, I, L, N, O,
P, T, or V.
the records in the currently selected datafile that were not available for processing: could be entire file if an unqualified RESELECT was issued or those records that did not meet any RESELECT or ASELECT criteria that were issued.
A unique name, at least 3 and no more than 8 characters in length, that identifies an INFO directory and its associated INFO files.
An operating system used by many computer manufacturers.
Proprietary operating system from Digital Equipment
Corporation. Refers to both VMS and Open VMS running on DEC VAX and AXP platforms.
An abbreviation for the glossary term internal width: the number of bytes required to store information in a data file item, system item, or system variable.
INFO Reference Manual Glossary G-11
Glossary word_expression working set
A word, a string of any length, or a match-term used to specify criteria for the query or listing of the text in files associated with the concordable items in an extended datafile.
the records in the currently selected datafile that are available for processing: could be the entire file or those records that met any RESELECT, ASELECT or
LIMIT criteria that were issued.
G-12 Glossary INFO Reference Manual
डाउनलोड
विज्ञापन