── MARKID ─┬────────────────────┬──────────────────────────────────────┤ ├─ - ────────────────┤ └─<dlm>──<ID>──<dlm>─┘
Explanation
The MARKID command is used to place a value in the ID field of new or modified records. This command affects only the current work file.
Changing the Value of the MARKID Field
Any line in the work file that is changed receives the current MARKID value in its ID field. (Refer to Record Formats in this manual for a description of the ID field.) When you change the value of the MARKID, only subsequent changes in the work file will contain the new MARKID. Records updated prior to the MARKID change retain the old MARKID value.
Retaining the Current Value of the MARKID Field
A record is not considered changed and its MARKID unaffected for the following CANDE commands and circumstances:
-
You use the RESEQUENCE command to change the sequence number of a record or range of records.
-
You use the MOVE command to move records from one place to another within the work file.
-
You add or change a record, but no MARKID is specified.
-
You interrogate the current setting of the MARKID.
MARKID
When the MARKID command is transmitted without a specified option, CANDE displays one of the following messages:
-
#FILE TYPE CANNOT USE MARKID
This display indicates that the FILETYPE does not have an ID field.
-
#MARKID IS NOT IN USE
This display indicates that no MARKID has been established for the work file.
-
#MARKID <ID>
This display indicates that the value of the MARKID is <ID>.
MARKID –
The MARKID – command form removes the MARKID from use. If this command form is entered, CANDE displays one of the following messages:
-
#MARKID IS NOT NOW IN USE
This display indicates that a MARKID was in use before the MARKID -- command was entered, and has been canceled.
-
#MARKID IS NOT IN USE
This display indicates that no MARKID was in use before the MARKID -- command was entered.
MARKID <dlm> <ID> <dlm>
The MARKID <dlm> <ID> <dlm> command form replaces the old value of the MARKID (if any) with the new value specified by <ID>. If this command form is entered, CANDE displays one of the following messages:
-
#FILE TYPE CANNOT USE MARKID
This display indicates that the FILETYPE does not have an ID field.
-
#MARKID CAN ONLY BE <number> CHARACTERS LONG
The <ID> was too long.
-
#MARK <ID>
This display indicates that the value of the MARKID is <ID>.
Displaying the MARKID Field Values
If a MARKID is in use, several commands display the correspondence between the ID field of a record and the current value of MARKID. The following commands are included:
-
FIND with FILE and TEXT options
-
RANGE with FILE and TEXT options
-
LIST of the work file without UNSEQUENCED or PUNCH options
-
REPLACE with TEXT option before the record ID field is replaced
The display from these commands includes the following information:
-
The sequence number
-
An asterisk (*) if the record has the current MARKID; otherwise, a blank
-
The text
Examples
MAKE EXAMPLE ALGOL:MARK /FIRST/ #WORKFILE EXAMPLE: ALGOL, MARKID "FIRST " 100BEGIN 200 REAL I, K; 300 FILE REM(KIND=REMOTE); 400 READ(REM, /, I, K); 500 WRITE(REM, <"DIVIDE = " U>, I/K); 600END. MARK /SECOND/ #MARKID "SECOND " FIX 400/R/WHILE NOT R # FIX 400/;/ DO # FIX 500/W/ W # REPLACE /K//J/:T #WORKFILE EXAMPLE #UPDATING 200 REAL I, J; 400* WHILE NOT READ(REM, /, I, J) DO 500* WRITE(REM, <"DIVIDE = " U>, I/J); # L 100 BEGIN 200* REAL I, J; 300 FILE REM(KIND=REMOTE); 400* WHILE NOT READ(REM, /, I, J) DO 500* WRITE(REM, <"DIVIDE = " U>, I/J); 600 END. # MARK- #MARKID IS NOT NOW IN USE L @1-90:U BEGIN 00000100FIRST REAL I, J; 00000200SECOND FILE REM(KIND=REMOTE); 00000300FIRST WHILE NOT READ(REM, /, I, J) DO 00000400SECOND WRITE(REM, <"DIVIDE = " U>, I/J); 00000500SECOND END. 00000600FIRST # MARK #MARKID IS NOT IN USE GET SYM/MINE:MARK .81 MAY 8. #WORKFILE SYM/MINE: ALGOL, 756 RECORDS, SAVED, MARKID "81 MAY 8 " FIX 59450/BEGON/BEGIN # 61400 REAL MARKID .81 MAY 11. #MARKID "81 MAY 11 " 61470 RECCS, MARK #MARKID "81 MAY 11 "