• Aucun résultat trouvé

BUILD INPUT LINE

Dans le document COS 300/310 (Page 168-176)

---Answer NO and the CR key if there is no more input. Otherwise, put additional paper tape in the reader and type Y and the CR key to continue reading data.

When input is complete, BUILD closes the output data files and prints the number of records written and records not written and any hash totals requested and returns control to the Monitor.

When BUILD reaches the end of cards in the reader, the terminal alarm sounds. If there are more cards put them in card reader and type any key to resume operation. Otherwise type CTRL/Z to terminate input.

6.3 BUILD INPUT LINE

The data input line is free form, i.e., specific data fields need not be in· prespecified column positions. However, the fields must be input in the same order within a keyword line as specified in the INPUT section. Data input lines entered at the keyboard mayor may not contain keywords depending on the answer to the prompting question. Data input lines prepared on paper tape or cards must contain keywords, unless an asterisk was specified in the control program.

The following conventions must be observed when entering input lines.

3. The fields, if more than one is entered per line, must be separated from each other by spaces, tabs, or commas. For example, an input line described in the control program as

DEFINE FI,D6 F2,A30 F5,D6 INPUT KBD PART, FI F2 F5

can be entered as

PART,126789, HEX BOLT, 500 or if described as:

PART FI F2 F5

can be entered as

PART~126789~'HEX BOLT'~500

4. A field can be omitted by actually omitting it if there are no fields to the right or by typing two consecutive commas if there are fields to the right. For example

PART,126789,HEX BOLT PART" HEX BOLT,lOO

Omitting a field may cause an error depending on the options (SKIP, default field or ERROR) specified for the field in the control program.

5. Decimal data must be entered in one of the following forms:

digits +digits -digits

digits-The plus sign is optional and minus can be placed at the beginning or end of the data. Decimal data cannot have embedded blanks, i.e., 12 34 is illegal. The number of digits must be less than or equal to the field size specified

in the ~ontrol program in the corresponding field.

If the number entered is smaller than the field size, right justified and zeros are inserted on the left.

number is too long, an error results.

it is If the

6. Alphanumeric data must be entered in one of the following forms:

'data' or data

In the first form ('data') any legal COS character (including spaces and tabs) is permitted except a single quotation mark (apostrophe). BUILD treats tabs inside quotes as single spaces, but echoes them as backslashes on the terminals.

In the second form any legal COS character except spaces, tabs, and commas is permitted. The first character, however, must not be a single quotation mark. If the keyword PART did

not have a comma, then input would be

PART~175~WASHER~100

The number of alphanumeric characters must be less than or equal to the size of the corresponding field specified in the control program. If the data is smaller than the field, it

is left justified and padded with blanks. If the data is too large, an error results.

7. If comma was specified as the field delimiter in the INPUT section of the control program, then alphanumeric data not enclosed in single quotation marks may have embedded spaces and tabs but no commas and must be separated from the next field by a comma. For example, if the control program specified:

DEFINE Fl,A30 F2,A30 F3,A30 INPUT KBD NAME,l

Fl F2 F3

the input line would be typed as

NAME, JOHANSEN'S MARKET, 2 MAIN ST., 'MAYNARD, MASS.' Extra text at the end of a data record is illegal except for comments which must be preceded by a semicolon.

8. The arrangement of

*

and keyword records is immaterial at run time. BUILD inserts records in the asterisk fields by the order of input and in keyword records by matching keywords.

For example,

Descriptor

*

*

*

*

Keywordl

Keyword2

Input Lines Keywordl .••

*

Keyword2 •••

* *

etc.

There is a current asterisk record pointer in BUILD keeps track of the next asterisk record to be filled.

inputting the last

*

record, BUILD goes back to the one.

6.4 ERROR MESSAGES

which After first

BUILD error messages are output to the line printer as the errors are encountered.

BUILD checks each section of the control program and the input data for errors.

If editing is being done on line, the line in error, error message, and RETYPE message are displayed on the terminal. The keyword is displayed if prompting is in effect. Otherwise, the keyword must be retyped. If no input editing is being done, data input errors are logged on the line printer in the form

input line

****

error message

Failure to correct a field in error causes the field to become undefined. The record containing an undefined field is not written on a storage device.

Error messages followed by an explanation point (1) indicate fatal errors. The error messages for the Field Description section of the control program are:

Message Meaning BAD DIGIT IN DECIMAL INITIAL VALUE

DATA TABLE OVERFLOW!

DESCRIPTOR TABLE OVERFLOW!

EXTRA CHARS AT STMNT END

Characters not relating to statement appear with statement.

Field number or default unit number is

Beginning quotation mark missing for initial alpha value. MISSING INITIAL VALUE

NO COMMA AFTER FIELD NAME

Error messages for the INPUT/OUTPUT sections of the control program BAD RANGE CONSTRUCTION C-FIELD NOT PERMITTED

DESTINATION FIELD NOT DECIMAL

FIELD NOT DECIMAL

Missing or misspelled END statement.

Default field does not agree with size

Statement missing or misspelled.

Something other than C or + is specified

Maximum keywords, approximately 121.

Approximate maximum fields for all keywords 192. Too many fields in OUTPUT section. Approximate maximum 128.

Record exceeds 510 characters.

Message UNDEFINED FIELD

UNDEFINED FORMAT

UNEXPECTED END OF FILE

Meaning

Field referenced was not defined in Field Descriptor section of control program or a decimal field was being equated to an alpha field, or an alpha field was specified for a flag.

Format number referenced but not defined (error given on END statement) .

Missing END statement.

Error messages for data input are:

Message BAD ALPHA FIELD BAD CHECKDIGIT BAD DECIMAL FIELD BAD DELIM

BAD KEYWORD

EXTRA CHARS AT END OF DATA

FIELD OUT OF RANGE NECESSARY FIELD MISSING TOO BIG

Meaning

Illegal entry in alpha field.

Checkdigit calculated by BUILD does not match the one entered.

Illegal entry in decimal field.

Fields are separated by an delimiter, i.e., by a or 1.

illegal Keyword entered not described in the control program.

More data was entered than was defined in the control program, i.e., 4 fields entered when only 3 were defined.

Data entered is not within the range specified in the control program.

Field specified as necessary in control program was not entered.

Data entered is greater than the size of the field as defined in the control program.

CHAPTER 7 SORT

SORT arranges COS data files in order according to a key specified in the SORT control program. The key consists of certain fields or parts of fields which appear in each record of the file being sorted. The data records can be sorted in ascending or descending order based on

the key.

Before SORT can be run, a SORT control program must be written. The control program defines the fields of the records to be sorted, specifies labels for input and output files, and the key to be used in the sort.

SORT handles one file per run and there must be a separate SORT control program for each file sorted. Files to be sorted must contain fixed length records.

If a multi-reel file is to be sorted, the SORT program sorts separately. A separate merge pass of the same SORT program be done to combine the file. To sort a multi-reel DECtape disk without going through a merge phase, PIP the data file before sorting. (See PIP option D.)

Dans le document COS 300/310 (Page 168-176)

Documents relatifs