Google
 

Trailing-Edge - PDP-10 Archives - BB-AI48A-BM - dtr20-sources/adtstr.mac
There are no other files named adtstr.mac in the archive.
TITLE ADTSTR Home of all text strings for Datatrieve-20's ADT

COMMENT #

		   COPYRIGHT (c) 1981, 1984 BY
	       DIGITAL EQUIPMENT CORPORATION, MAYNARD
		MASSACHUSETTS.  ALL RIGHTS RESERVED.

	THIS SOFTWARE  IS FURNISHED UNDER A LICENSE AND MAY
	BE USED  AND  COPIED  ONLY  IN  ACCORDANCE WITH THE
	TERMS OF SUCH LICENSE AND WITH THE INCLUSION OF THE
	ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER
	COPIES THEREOF  MAY NOT  BE PROVIDED  OR  OTHERWISE
	MADE  AVAILABLE TO  ANY OTHER  PERSON.  NO TITLE TO
	AND   OWNERSHIP   OF   THE   SOFTWARE   IS   HEREBY
	TRANSFERRED.
	
	THE  INFORMATION  IN  THIS  SOFTWARE IS  SUBJECT TO
	CHANGE  WITHOUT  NOTICE AND SHOULD NOT BE CONSTRUED
	AS A COMMITMENT  BY  DIGITAL EQUIPMENT CORPORATION.

	DIGITAL ASSUMES  NO  RESPONSIBILITY  FOR THE USE OR
	RELIABILITY OF  ITS  SOFTWARE ON  EQUIPMENT THAT IS
	NOT SUPPLIED BY DIGITAL.

#
PAGE
COMMENT #

     This module contains all the text used by ADT, the Application
     Design Tool.

	Foreign Language Facility -- TEXT STRING GENERAL INFO

	Strings are accessed by using a string pointer vector
	and a string length vector. As a result, strings may
	be changed or be made of a different length, but the
	names of string tables and the order of the strings
	in each table must NOT BE CHANGED! Also note that
	the context in which the string is used may limit its
	size. Making a string very long may cause unpredicatable
	results.

	VECTOR labels must be global, and declared external in
	the calling program. Vector offsets are each given a symbolic name
	in the calling program.

	The STRS macro builds the vector of pointers and the strings
	themselves. The LENS macro builds the vector of string
	lengths. If a particular string table is always accessed as
	ASCIZ strings, then the length vector need not be built.

#
PAGE
SEARCH MONSYM

; Define macros to make string definition easier

; Define macros which build string pointers
DEFINE SS(Z) < POINT 7,[ASCIZ Z]>
DEFINE SA(Z) < POINT 7,Z >

; Define a macro which yields string length
DEFINE L(Z) <LEN.=0
		IRPC Z, <LEN.=LEN.+1>
		LEN.-2 >

; Define a macro which builds a vector of string pointers
DEFINE STRS(NAME) <NAME(SS)>

; Define a macro which builds a vector of string lengths
DEFINE LENS(NAME) <NAME(L)>

; Define a macro which builds string descriptors
DEFINE DESC(TEXT) <
	LEN.=0
	IRPC TEXT, <LEN.=LEN.+1>
	1006,,LEN.-2
	POINT 7,[ASCIZ TEXT]
>

PAGE
;
;	Foreign Language Facility -- INTRO TO ADT
;
INTRO::
POINT 7,[ASCIZ /ADT helps you set up a structure for your data. After a
series of questions and responses, ADT constructs the
definitions for a DATATRIEVE domain, record, and data file.
ADT will then write these definitions into your
dictionary directory, allowing you to begin to enter and
process data.

End each response by entering RETURN.

If you want help, enter ?

To see the current state of your record definition, enter *

To go back to the previous key or field definition, enter <
/]

PAGE
;
;	Foreign Language Facility -- PROMPT STRINGS (LONG)
;
;	When these strings are translated, the text and length can be
;	changed, but the substitution parameters must not
;	be changed. Substitution parameters are exclamation marks.
;

DEFINE LONG(Q), <

;***** Initialization never prompts
Q ""

;***** Confirmation never prompts!
Q ""

;***** Detailed prompts question
Q <'
Do you want detailed prompts? : '>

;***** Domain name question
Q <'
Enter the name for your domain.
Start with a letter, and use letters,
digits, hyphens (-), or underscores (_).
(No spaces or tabs) : '>

;***** RMS file name
Q <"
The data for the domain ! will be stored in a file
with the name you specify.
Enter the name for !'s data file : ">

;***** Field name
Q <'
Enter the name of the first field in !.
Start with a letter and use only letters, digits,
hyphens (-), or underscores (_).
(No spaces or tabs.) : '>

;***** Data type
Q <"
What's in ! --	DATE
		PERCENT
		MONEY
		NUMBERS used in arithmetic
		CHARACTERS
		GROUP?
Enter one of these words or an abbreviation : ">

;***** Date format
Q <'
The choices for formats in which DATEs are printed include:
	1	MM/DD/YY	6/29/79
	2	DD-MMM-YY	29-Jun-79
	3	DD-MMM-YYYY	29-Jun-1979
	4	DD.MM.YY	29.06.79
Enter format 1, 2, 3, or 4 : '>

;***** More fields question
Q <'
Do you want to define more fields in !? : '>

;***** Digits to left of decimal
Q <'
Enter the number of digits to the left of the decimal point : '>

;***** Digits to the right of the decimal
Q <'
Enter the number of digits to the right of the decimal point : '>


;***** leading zero fill?
Q <'
Do you want zeros at the left of the number
to print as spaces? : '>

;***** Character length
Q <'
Enter the maximum number of characters for ! : '>

;***** Query name
Q <'
Enter an abbreviation you can use
as a query name for ! : '>

;***** Want indexed file?
Q <"
Do you want the data file to be indexed?
You can't modify primary keys in indexed files. : ">

;***** Primary key field name
Q <'
Enter the name of the primary key field.
You cannot modify data stored in a primary key field. : '>

;***** Can primary keys have dups?
Q <'
Do you want to allow the primary key fields in different records
to have duplicate values? : '>

;***** Are there any alternate keys?
Q <'
Do you want to specify an alternate index key? : '>

;***** Name of first alternate key field
Q <'
Enter the name of the first alternate key field : '>

;***** Can alternate keys have dups?
Q <'
Do you want to allow the alternate key fields in different records
to have duplicate values? : '>

;***** Can alternate keys change?
Q <'
Do you want to allow alternate key values to change? : '>

;***** Next field 
Q <'
Enter the name of the next field in ! : '>

;***** Next alternate key
Q <'
Enter the name of the next alternate key field : '>

;***** Want Datatrieve to define the new stuff?
Q <'
Do you want ADT to add the domain and record definitions
to your current default dictionary directory? : '>
>

LNGPRT:: STRS(LONG)

DEFINE SHORT(Q), <

;***** Initialization never prompts
Q ""

;***** Confirmation never prompts
Q ""

;***** Detailed prompts question
Q <'
Do you want detailed prompts? : '>

;***** Domain name question
Q <'
Enter domain name : '>

;***** RMS file name
Q "
Enter the name for !'s data file : "

;***** Field name
Q <'
Enter the name of the first field in ! : '>

;***** Data type
Q <'
Is ! a DATE, PERCENT, MONEY, NUMBERS, CHARACTERS, or GROUP? : '>

;***** Date format
Q <'
Date formats are:
	1	MM/DD/YY	6/29/79
	2	DD-MMM-YY	29-JUN-79
	3	DD-MMM-YYYY	29-JUN-1979
	4	DD.MM.YY	29.06.79
Enter format 1, 2, 3, or 4 : '>

;***** More fields question
Q <'
Any more fields in ! : '>

;***** Digits to left of decimal
Q <'
Enter the number of digits to the left of the decimal point : '>

;***** Digits to the right of the decimal
Q <'
Enter the number of digits to the right of the decimal point : '>

;***** leading zero fill?
Q <'
Do you want to suppress leading zeros? : '>

;***** Character length
Q <'
Enter the maximum number of characters for ! : '>

;***** Query name
Q <'
Enter a query name for ! : '>

;***** Want indexed file?
Q <'
Do you want this file to be indexed? : '>

;***** Primary key field name
Q <'
Enter the name of the primary key field : '>

;***** Can primary keys have dups?
Q <'
Do you want to allow duplicate values
for the primary key? : '>

;***** Are there any alternate keys?
Q <'
Do you want to specify an alternate index key? : '>

;***** Name of first alternate key field
Q <'
Enter the name of the first alternate key field : '>

;***** Can alternate keys have dups?
Q <'
Do you want to allow duplicate values
for the alternate key? : '>

;***** Can alternate keys change?
Q <'
Do you want to allow alternate key values to change? : '>

;***** Next field
Q <'
Enter the name of the next field in ! : '>

;***** Next alternate key
Q <'
Enter the name of the next alternate key field : '>

;***** Add the definitions?
Q <'
Do you want the definitions added to the dictionary? : '>

>

SHTPRT:: STRS(SHORT)

PAGE

COMMENT #

	Foreign Language Facility -- PARSING TABLES

	This section of ADTSTR contains the FDBs and KEYWORD tables for
	use by the COMND% and TBxxx% JSYSs.

	If you change any strings in tables, the entire table must remain
	in alphabetical order, and the data associated with the
	string must remain the same!!!!!
#

; Macros used to build keyword table entries

DEFINE K(STRING,DATA) <[ASCIZ ~STRING~],,DATA>
DEFINE KK(STRING,DATA) <[CM%FW+CM%INV
			  ASCIZ ~STRING~],,DATA>

PAGE
;
;	Foreign Language Facility -- KEYWORD TABLES

K$YN:	2,,2		; Yes No table
	K(No,1)
	K(Yes,2)

K$TYPE:	6,,6		; Datatype table
	K(Characters,1)
	K(Date,2)
	K(Group,3)
	K(Money,4)
	K(Numbers,5)
	K(Percent,6)

K$DATE:	4,,4
	K(1,1)
	K(2,2)
	K(3,3)
	K(4,4)


PAGE
; Here are the break masks used by the FDBs on the next few pages

M$FLD:	-1
	757754001760
	400000000740
	400000000760

M$DEF:	-1
	777754001760	; letters numbers _ AND -
	400000000740
	400000000760

PAGE

; Define a macro to make FDB vector entries

; These macros replace the ones in MACSYM because ADT uses help
;	messages that are VERY VERY long.

DEFINE FLDDB. (TYP,FLGS,DATA,HLPM,DEFM,LST)<
	..XX==<FLD(TYP,CM%FNC)>+FLGS+<0,,LST>
   IFNB <HLPM>,<..XX=CM%HPP!..XX>
   IFNB <DEFM>,<..XX=CM%DPP!..XX>
	..XX
   IFNB <DATA>,<DATA>
   IFB <DATA>,<0>
   IFNB <HLPM>,<POINT 7,HLPM>
   IFB <HLPM>,<IFNB <DEFM>,<0>>
   IFNB <DEFM>,<POINT 7,[ASCIZ \DEFM\]>>

;COMND - MACRO FOR BUILDING FUNCTION DESCRIPTOR BLOCK

DEFINE FLDBK. (TYP,FLGS,DATA,HLPM,DEFM,BRKADR,LST)<
	..XX==<FLD(TYP,CM%FNC)>+FLGS+<Z LST>
   IFNB <HLPM>,<..XX=CM%HPP!..XX>
   IFNB <DEFM>,<..XX=CM%DPP!..XX>
   IFNB <BRKADR>,<..XX=CM%BRK!..XX>
	..XX
   IFNB <DATA>,<DATA>
   IFB <DATA>,<0>
   IFNB <HLPM>,<POINT 7,HLPM>
   IFB <HLPM>,<IFNB <DEFM'BRKADR>,<0>>
   IFB <DEFM>,<IFNB <BRKADR>,<0>>
   IFNB <DEFM>,<POINT 7,[ASCIZ \DEFM\]>
   IFNB <BRKADR>,<BRKADR>
   >

DEFINE $FDB(ARGS), <
	[FLDDB. (ARGS)]
>
DEFINE $FDBB(ARGS), <
	[FLDBK. (ARGS)]
>
; Random FDBs

BACK::	FLDDB. (.CMTOK,,<POINT 7,LESS>,<[ASCIZ /To backup, enter /]>)
LESS:	ASCIZ /</
SHOWR::	FLDDB. (.CMTOK,,<POINT 7,[ASCIZ/*/]>,<[ASCIZ /To review your record definition, enter /]>)
NOABB:: FLDDB. (.CMCFM,CM%SDH,,[ASCIZ /enter RETURN if you do not want a query name/])

; Here is the FDB vector
$$FDB::

	$FDB <.CMINI>

	$FDB <.CMCFM,CM%SDH,,[ASCIZ /
Please end your response by pressing RETURN/]>

	;***** Detailed prompts question
	$FDB <.CMKEY,,K$YN,HLP2>

	;***** Domain name question
	$FDBB <.CMFLD,CM%SDH,,HLP3,,M$FLD>

	;***** RMS file name
	$FDB <.CMFIL,CM%SDH,,HLP4>

	;***** First field name
	$FDBB <.CMFLD,CM%SDH,,HLP5,,M$FLD>

	;***** Datatype
	$FDB <.CMKEY,,K$TYPE,HLP6>

	;***** Data formats
	$FDB <.CMKEY,,K$DATE,[ASCIZ /
The date format you choose controls the way DATATRIEVE
displays the date printed on your terminal or in a report.
Please enter/]>

	;***** More fields
	$FDB <.CMKEY,,K$YN,[ASCIZ /
Answer YES if you want to define more fields in this group or record.
Please enter/]>

	;***** Digits on left
	$FDB <.CMNUX,,^D10,HLP7>

	;***** Digits on the right of the decimal
	$FDB <.CMNUX,,^D10,HLP8>

	;***** Supress leading zeros
	$FDB <.CMKEY,,K$YN,HLP9>

	;***** Character length
	$FDB <.CMNUX,,^D10,HLP10>

	;***** Abbreviations
	$FDBB <.CMFLD,CM%SDH,,HLP11,,M$FLD,NOABB>

	;***** Indexed file?
	$FDB <.CMKEY,,K$YN,HLP12>

	;***** Primary key field name
	$FDBB <.CMFLD,CM%SDH,,HLP13,,M$FLD>

	;***** Can primary key have dups?
	$FDB <.CMKEY,,K$YN,[ASCIZ /
Answer YES if you want to allow different records to have
the same values for the primary key field.
Please enter/]>

	;***** Any alternate keys
	$FDB <.CMKEY,,K$YN,HLP14>

	;***** First alternate key field name
	$FDBB <.CMFLD,CM%SDH,,HLP15,,M$FLD>

	;***** Alternates can have dups
	$FDB <.CMKEY,,K$YN,[ASCIZ /
Answer YES if you want to allow different records to have
the same values for the alternate key field.
Please enter/]>

	;***** Alternate keys can change
	$FDB <.CMKEY,,K$YN,[ASCIZ /
Answer YES if you want to allow changes
to the values in this alternate key field.
Please enter/]>

	;***** Next field
	$FDBB <.CMFLD,CM%SDH,,HLP5,,M$FLD>

	;***** Next alternate field
	$FDBB <.CMFLD,CM%SDH,,HLP15,,M$FLD>

	;***** Add definitions question
	$FDB <.CMKEY,,K$YN,HLP16>

PAGE

; Help messages

HLP2:	ASCIZ /
If you are unfamiliar with ADT, detailed prompts
are available.

The abbreviated prompts assume you are familiar
with DATATRIEVE terms and concepts.

Help is available for both types of prompts.
Please enter/

HLP3:	ASCIZ /
A domain is a concept that associates a name (like YACHTS)
with the relationship between a data file (like YACHT.DAT) and
a record definition (like YACHT).

Using the domain name gives access to information in a data file
as interpreted by the record definition.

You use the domain name in the READY, FINISH, SHOW, DELETE,
and EXTRACT commands. You also use the domain name in
the record selection expressions you can include in the PRINT,
LIST, FIND, SORT, REPORT, SUM, STORE, MODIFY, and ERASE statements.

The name of a domain cannot duplicate the name of another
dictionary object stored in the same directory of the data dictionary.

A DATATRIEVE name must
	- begin with a letter,
	- be composed only of letters, digits, hyphens (-),
	  and underscores (_),
	- not contain any spaces or tabs,
	- not end with a hyphen or underscore,
	- and not be longer than 30 characters.
/

HLP4:	ASCIZ /
DATATRIEVE uses this file name to locate the file
which contains the data for the domain.

A file name has the format - DEVICE:<DIRECTORY>NAME.TYPE
Only name is required. Often the domain name is used.
For example, if the domain name is EMPLOYEE, the file
name could be EMPLOYEE.DAT
/

HLP5:	ASCIZ /
A field is a part, or segment, of a data record.

An elementary field is a record segment containing one
item of information.

Each record contains one or more elementary fields.

For example, in the YACHTS domain, the elementary fields
in each record include MANUFACTURER, MODEL, BEAM, and PRICE.

A group field is a record segment containing one or more
elementary fields. A group field can also contain other
group fields. You can access all the subordinate elementary
and group fields by using the name of the group field.

For example, in the record definition YACHT, the group field
TYPE contains the elementary fields MANUFACTURER and MODEL.
When you enter the statement PRINT TYPE, DATATRIEVE displays
the values in both elementary fields.
/

HLP6:	ASCIZ /
Choose the word which best describes the type of data
you want to store in this field:

  DATE -- if you want to easily print it as a date
	  or you need to sort a date.

  PERCENT -- if you want to store a 3 digit percentage and
	     have it print with a percent sign (%).

  MONEY -- if you want to store a sum of money and
	   have DATATRIEVE print that sum with a $ and 2 decimal positions.

  NUMBERS -- if you want to use the values in this field for arithmetic
	and statistical functions like TOTAL and AVERAGE. The number
	may be signed and have decimal positions.

  CHARACTERS -- if the data you want to store is none of the types
	above. You may not use this field in arithmetic operations.

  GROUP -- if you want to give one name to a sequence of subordinate
	elementary and group fields.
Please enter/

HLP7:	ASCIZ /
Enter the maximum number of digits permitted to the left
of the decimal point. Your answer cannot exceed 21.

For example, if the largest number to be entered is
9999.99999, your answer to this question is "4".
Please enter a/

HLP8:	ASCIZ /
Enter the maximum number of digits permitted to the right
of the decimal point. Your answer may be between 0 and 21,
but the total number of digits both right and left
of the decimal point must be between 1 and 21.

For example, if the largest number to be entered is
9999.99999, your answer to this question is "5".
Please enter a/

HLP9:	ASCIZ /
The number 00274 has two "leading" zeros. If you suppress
the leading zeros, DATATRIEVE displays that number on your
terminal as 274.

If you do not suppress leading zeros, DATATRIEVE displays
the number on your terminal as 00274.
Please enter/

HLP10:	ASCIZ /
Enter the maximum number of characters which will be stored
in this field.

For example, if the field will hold a name, and the longest
name to be stored has ten characters, your answer would be "10".
Please enter a/

HLP11:	ASCIZ /
You can specify another name, called a query name,
for this field. You can use the query name
where ever you can use a field name, that is, in value
expressions and in record selection expressions.

For example, in YACHTS, the field LENGTH-OVER-ALL has
a query name of LOA. The query name LOA is more
convenient to type than LENGTH-OVER-ALL.
/

HLP12:	ASCIZ /
Indexed files are stored in such a way that access to
records with specific field values (keys) is much faster than for
non-indexed files. In addition, the records in an indexed file
are stored sorted in alphabetical order by one field
in the record, the primary key.

An indexed file must have one primary key field, and ADT allows
you to define any number of alternate key fields. You cannot modify
data stored in a primary key field, but you can allow duplicate values
in primary keys fields of different records. You can allow both
duplicate values and changes for alternate key fields.

For example, if you define a domain of employee records, you could
use the employee number as the primary key (there are no duplicate
numbers and the numbers do not change). Employee name would make
a poor primary key because you might need to change a name.

In a sequential file you can only store a record at the end of
the file. In an indexed file, each record is stored in the proper
order based on its primary key.

In a sequential file, all fields can be modified. In an indexed file,
all fields except the primary key field can be modified.

Please enter/

HLP13:	ASCIZ /
Indexed files are stored in such a way that access to
records with specific field values (keys) is much faster than for
non-indexed files. In addition, the records in an indexed file
are stored sorted in alphabetical order by one field
in the record, the primary key.

Defining a field as a primary index key reduces the time
DATATRIEVE uses to find records with specific values in that field.

Define as the primary key the field you use most often
when referring to the records.

The primary index key must be a field you have already defined.
You can choose to allow duplicate values for the primary key field,
but you cannot modify the data stored in a primary key field.

Because you have specified that your data file be an indexed file,
you must enter the name of a field as the primary index key.
/

HLP14:	ASCIZ /
Indexed files are stored in such a way that access to
records with specific field values (keys) is much faster than for
non-indexed files.

Defining a field as an alternate index key reduces
the time DATATRIEVE uses to find records with
specific values in that field.

The alternate index key must be a field you have already
defined. You can choose to allow duplicate values and changes
to the values stored in an alternate key field.

Please enter/

HLP15:	ASCIZ /
Indexed files are stored in such a way that access to
records with specific field values (keys) is much faster than for
non-indexed files.

Defining a field as an alternate index key reduces
the time DATATRIEVE uses to find records with
specific values in that field.

The alternate index key must be a field you have already
defined. You can choose to allow duplicate values and changes
to the values stored in an alternate key field.
/

HLP16:	ASCIZ /
ADT builds a command file that contains the DATATRIEVE
commands which define a domain, a record, and a data file.

If you answer YES to this question, the command file is
executed for you.
Please enter/
;
;	Cannot REENTER error message
;
	LOC 124
	JRST REENT
	RELOC
REENT:	HRROI 1,[ASCIZ /?Cannot REENTER ADT
/]
	PSOUT%
	HALTF%
	JRST REENT

	END