── PAGE ─┬──────────────────────────────────────┬──────────────────────► └─<sequence range>─┬───────────────────┤ └─ DOWN ──<integer>─┘ ►─┬─────────────────────┬──────────────────────────────────────────────┤ ├─<column range spec>─┤ └─ * ─────────────────┘
<sequence range>
──┬─────────────────────────────────────────────┬──────────────────────┤ ├─<sequence number>─┬─────────────────────────┤ │ └─ ─ ─┬─<sequence number>─┤ │ └─ END ─────────────┤ └─ END ───────────────────────────────────────┘
<column range spec>
── @ ─┬─<start column>─┬───────────────────┬───────────────────────────┤ │ └─ - ──<end column>─┤ ├─ + ─┬─<integer>────────────────────┘ └─ - ─┘
Explanation
The PAGE command initiates page mode and enables you to move through the work file. You can specify a sequence range and column range to view portions of a work file.
PAGE
By transmitting only PAGE from the CANDE command line, you invoke page mode, and CANDE displays the first page (screenful) of records from the work file. The default range of records listed is from the first record to the last record of the file.
If the terminal can display only one or two lines, this command and page mode cannot be used. For more information, refer to Page Mode Operations.
If a terminal is not capable of page mode, use the LIST command to display the number of records the terminal is capable of accepting.
PAGE <sequence range>
You can specify a sequence range of a file in any of the following ways:
-
<sequence number>
The PAGE <sequence number> command displays the work file beginning from the specified sequence number to the last record in the file.
Note that the meaning of a single sequence number as a sequence range for the LIST command is different from that for the PAGE command. LIST <sequence number> displays the single record at the specified sequence number, while PAGE <sequence number> displays a page of records, the first record of which is the specified sequence number.
-
<sequence number> - <sequence number>
The PAGE <sequence number> - <sequence number> command displays a page of records beginning with the first sequence number. You can continue to page through the file with the NEXT+ command to the last specified sequence number.
If the first sequence number specified in a sequence range does not exist, the page begins with the next higher existing sequence number.
If the last sequence number in the range is not reached by the end of the page, you can use NEXT+ to page through the file until the last sequence number in the range is displayed.
CANDE retains the sequence range specified in a PAGE command; therefore, even if you discontinue paging through a file, you can return to the work file and continue paging from where you left off to the end of the specified sequence range.
-
<sequence number> - END
The PAGE <sequence number> - END command displays the work file beginning from the specified sequence number to the last record in the file.
-
END
The PAGE END command displays the last page of the work file. It uses the session DOWN <integer> option set by the TERMINAL command. This command is similar to the PAGE <sequence number> DOWN <integer> command, where <sequence number> is the last sequence number of the work file.
The DOWN option is ignored if its value is zero. Instead, the PAGE END command displays the last full page of the work file that ends with the last sequence number.
PAGE <sequence range> DOWN <integer>
The DOWN <integer> option of PAGE <sequence range> enables you to shift any number of lines backwards from the current line position before the page is displayed. The value of <integer> must be between zero (0) and the page size. This option shifts and displays the specified lines preceding the current line the specified number of lines.
PAGE <column range spec>
The PAGE <column range spec> command enables you to display a specific range of columns of the work file and to shift a range of columns either to the right or left of the current position on the screen.
A column range can be specified with the following <column range spec> options:
-
@ <start column>
-
@ <start column> - <end column>
You can specify a column range with the PAGE command to display any portion of the records of a work file, which can include the sequence number field and the MARKID field, as well as the text field. The column ranges for the text field, sequence number field, and MARKID field vary depending on the file type of your file. Refer to Record Formats for the field sizes and column ranges for the text, sequence number, and MARKID fields.
When you specify a column range, all subsequent page mode commands entered, such as PAGE, NEXT, SAME, +, and -, will continue to show that column range.
If a specified column range is larger than can be displayed on a screen, the display starts with the beginning column and spans the width of the screen. The remaining specified columns that do not fit are truncated. No attempt is made to wrap around the columns that do not fit the width of the screen.
The column range can be changed at any time in page mode and can be changed to the default column range with the PAGE * command.
The PAGE @ <start column> command enables you to view a single column of each record in the file.
The PAGE @ <start column> - <end column> command enables you to view your work file beginning at the specified start column to the specified end column of each record in the file.
A previously specified column range can be shifted left or right on the screen with the following <column range spec> options:
-
@ + <integer>
-
@ - <integer>
These options shift a previously defined column range of records the specified number of columns to the right (-) or left (+). If a column range is not user-defined, the default column range for the file type of your work file is used.
For example, the default column range for a work file of type SEQ is columns 1 through 72, but the default for a file of type C74 is columns 7 through 72.
The PAGE @ + <integer> command shifts the column range of records to the left.
The following example shows a two-line work file in page mode. The column range is specified with the CANDE command PAGE @ 20-50. On the top line of the page, the CANDE command PAGE @ + 10 is entered, which shifts the file to the left 10 columns to display columns 30 through 60; the column range size (30 columns wide) remains the same.
PAGE @ 20-50 NEXT+ 2:::*::::3::::*::::4::::*::::5 00002000tuvwxyzABCDEFGHIJKLMNOPQRSTUVWX 00004000TUVWXYZabcdefghijklmnopqrstuvwx #DISPLAY COMPLETE PAGE @ +10::::*::::3::::*::::4::::*::::5 00002000tuvwxyzABCDEFGHIJKLMNOPQRSTUVWX 00004000TUVWXYZabcdefghijklmnopqrstuvwx #DISPLAY COMPLETE NEXT+ 3::::*::::4::::*::::5::::*::::6 00002000DEFGHIJKLMNOPQRSTUVWX 00004000defghijklmnopqrstuvwx #DISPLAY COMPLETE
The PAGE @ - <integer> command shifts the column range of records to the right.
The following example shows a two-line work file in page mode. The column range is specified with the CANDE command PAGE @ 20-50. On the top line of the page, the CANDE command PAGE @ + 5 is entered, which shifts the file to the right 5 columns to display columns 15 through 45; the column range size (30 columns wide) remains the same.
PAGE @ 20-50 NEXT+ 2....*....3....*....4....*....5 00002000tuvwxyzABCDEFGHIJKLMNOPQRSTUVWX 00004000TUVWXYZabcdefghijklmnopqrstuvwx #DISPLAY COMPLETE PAGE @ -5 ....*....3....*....4....*....5 00002000tuvwxyzABCDEFGHIJKLMNOPQRSTUVWX 00004000TUVWXYZabcdefghijklmnopqrstuvwx #DISPLAY COMPLETE NEXT+ *....2....*....3....*....4....* 00002000opqrstuvwxyzABCDEFGHIJKLMNOPQRS 00004000OPQRSTUVWXYZabcdefghijklmnopqrs #DISPLAY COMPLETE
PAGE *
The PAGE * command changes the user-specified column range to the default column range specification. The default column range depends on the file type of your work file.
Using the Sequence Number Field and MARKID Field
Although the sequence number field can be displayed, you cannot write in this area. CANDE removes anything you enter in this field and overwrites the field with appropriate sequence numbers.
The MARKID field can also be displayed, but unlike the sequence number field, the MARKID field is treated like a user data field. You can edit it the same way that you edit the text portion of file records. Only those records whose MARKID fields are displayed in page mode can be edited and are unaffected by the MARKID command.
If you change the column range specification so that the MARKID field is not displayed for the rest of the file, the MARKID fields of those records are updated by the MARKID command.
If all or part of the MARKID field is specified for display with the PAGE <column range spec> command, CANDE does not place a MARKID value, as might be specified through the MARKID command, in that field. In this case, if new records are created, spaces are entered in the portion of the MARKID field that is not displayed on the screen. The portion of the MARKID field that is displayed is considered a user data field.
Note: | If you want CANDE to enter MARKID values in the MARKID field, do not specify the columns of the MARKID field for display. If the MARKID field is displayed, regardless of whether the field has been edited, the MARKID field of those records is not updated by the MARKID command. |
Implicit file updates are performed after each column range change if the work file is changed. If a column range is specified, that range applies to the current work file and remains with that work file, even through a CANDE work file recovery.
When the columns of a page that includes the sequence number field or MARKID field are displayed, the top line (ruler) indicates the sequence number field with an S and the MARKID field with an M.The following example shows the sequence number and MARKID fields of a work file of file type TEXT resulting from the CANDE command PAGE 2000 @ 30-90:
NEXT+ 5....*....6....*....7..SSSSSSSSMMMMMMMMMM 00002000DEFGHIJKLMNOPQRSTUVWXYZ #DISPLAY COMPLETE
Examples
The following examples demonstrate some of the PAGE command and options:
Example 1
The following example displays records that are in the file beginning at sequence number 1000 to the end of the work file.
PA 1000-END NEXT+ ....*....1....*....2....*....3.... 00001000THIS IS A SAMPLE PROGRAM 00001100COMMENTS 00001200SOME VARIABLES 00001300SOME DEFINES 00001400CODE 00001500PROCEDURE ONE 00001600PROCEDURE TWO 00001700MORE COMMENTS 00001800MORE CODE 00001900SOME MORE COMMENTS 00002000END OF PROGRAM #DISPLAY COMPLETE
Example 2
The following example displays records that are in the work file with the sequence line number 1700 four lines from the top of the page.
PAGE 1700 DOWN 3 NEXT+ ....*....1....*....2....*....3.... 00001400CODE 00001500PROCEDURE ONE 00001600PROCEDURE TWO 00001700MORE COMMENTS 00001800MORE CODE 00001900SOME MORE COMMENTS 00002000END OF PROGRAM #DISPLAY COMPLETE