Using the Editor Screen

If you specify a new object name for editing, an editor screen similar to the following appears:

EDIT-NAT:NATLIB1(JOB1JCL)-Program->Struct-Free-78K ------------ Columns 001 072
 COMMAND===>                                                    SCROLL===> CSR 
****** ****************************** top of data *****************************
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
''''''                                                                         
****** **************************** bottom of data ****************************
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
      Help  Split End   Suspe Rfind Rchan Up    Down  Swap  Left  Right Curso

The layout of this screen can vary depending on the Software AG product you use.

The first line on the screen identifies the object to be edited according to the environment from which the Software AG Editor is called. In the above example, JOB1JCL is the name of the new object and NATLIB1 identifies the object library which is a Natural library.

The input areas contained on the editor screen are explained in the following section.


Using the Input Areas

The Software AG Editor screen contains four input areas:

  • Command Line

    The command line is indicated by COMMAND===>.

    It is used for entering an editor main command described in Summary of Main Commands.

  • Scroll Field

    The scroll field is indicated by SCROLL===>.

    It is used for specifying default scrolling amounts described in Settings for Scroll Field.

  • Prefix Area

    The leftmost six columns of the editor screen are referred to as the prefix area. The prefix area can contain a series of apostrophes ('''''') or asterisks (******), a source-line number or text. The prefix area is used for entering line commands described in Summary of Line Commands.

  • Editing Area

    The editing area is to the right of the prefix area. It is used for entering data.

    You can start your editing session by entering data into the Software AG Editor screen and using editor main commands (Summary of Main Commands) and line commands (Summary of Line Commands).

Scrolling the Data in the Editing Area

This section describes the commands and settings that can be used for scrolling the data contained in the editing area of the editor screen.

PF Keys

Commands for scrolling data are often assigned to the following PF keys:

  • PF7 (main command UP) to scroll toward top of data.

  • PF8 (main command DOWN) to scroll toward bottom of data.

  • PF10 (main command LEFT) to scroll data to the left

  • PF11 (main command RIGHT) to scroll to the right.

Settings for Scroll Field

In the scroll field (SCROLL===>), you can enter scroll settings. These settings are used to set the scroll amount for the PF keys, above, and some are also used with the scrolling main commands on the following page.

Possible settings for the scroll field are:

Scroll Setting Explanation
number Scrolls up or down a specified number of lines.

Scroll right or left a specified number of columns.

CSR

(default)

Scrolls down to cursor position if cursor is on a line of text. Cursor line becomes first line of text.

When scrolling up, cursor line becomes last line of text.

Scroll a page length, if cursor is in the command line.

Scroll right or left to cursor position.

DATA Scrolls a page length minus one line.

When scrolling down, the bottom line becomes the top line. When scrolling up, the top line becomes the bottom line.

When scrolling right, the last column becomes the first column. When scrolling left, the first column becomes the last column.

HALF Scrolls half a page in any direction.
LINE Scrolls up to beginning of line or down to end of line.
MAX Scrolls to top or bottom of data.

Scroll to extreme right or left of data.

PAGE Scrolls a page length in any direction.
PARA Scrolls up or down to first character of next paragraph.
SENT Scrolls up to first character of current sentence or down to first character of following sentence.

When scrolling up, if cursor is on first character of sentence, scroll to first character of previous sentence.

WORD Scrolls up to first character of next word or down to first character of following word.

Main Commands for Scrolling

Apart from the LOCATE main command which scrolls data to a specified line, several main commands are available for vertical and horizontal scrolling.

The following table shows all possible scrolling commands and their meaning:

Main Command Explanation
BOTTOM

or

++

Scrolls to the end of the object being edited.
TOP

or

--

Scrolls to the beginning of the object being edited.
DOWN Scrolls forward by the amount specified in the scroll field.
DOWN n Scrolls forward by n lines.
+n Scrolls forward by n lines.
UP Scrolls backwards by the amount specified in the scroll field.
UP n Scrolls backwards by n lines.
-n Scrolls backwards by n lines.
LEFT Scrolls to the left by the amount specified in the scroll field.
LEFT n Scrolls to the left by n columns.
RIGHT Scrolls to the right by the amount specified in the scroll field.
RIGHT n Scrolls to the right by n columns.
FIX n Specifies the number of columns n, starting with column 1, to remain in display when scrolling to the right.

Locating a Line

If you want to display a specific line at the top of your editor screen (that is, make it the current line), use the LOCATE main command with a parameter describing the line you want to become the current line.

Examples:

L 32

Makes line 32 the current line.

32

Same as above.

L .X

Makes the line labeled .X the current line.

L 'ABC'

Makes the first line that starts with the string ABC the current line (useful when browsing sorted data such as directory lists).

Differences between the LOCATE and FIND Commands

Note the following differences between the LOCATE and FIND commands:

  • If you issue the LOCATE command with a character string (L 'ABC'), the string is only found if it starts in column 1. The FIND command searches the whole source work area;

  • With the LOCATE command, it is assumed that the data to be searched is sorted in ascending alphabetical order;

  • When a line is located with the LOCATE command, the cursor is placed in the prefix area; with the FIND command, the cursor is placed on the found string and the line is not necessarily made the current line.

Showing or Hiding Lines

You can exclude specific lines from the display by using the EXCLUDE main command. For example, the command:

EXC 'ABC' .X .Y ALL

excludes all lines with the string ABC within the block labeled .X and .Y from display. An unqualified EXCLUDE command excludes the current line. Each excluded line or block of lines is replaced by a line of dashes and a message informing you how many lines are excluded.

To recall excluded lines to display, use the INCLUDE main command. For example, the command:

IN C'Abc' ALL

includes all excluded lines containing the string Abc exactly as entered here. An unqualified INCLUDE command recalls the first line in the excluded block.

The EXCLUDE and INCLUDE main commands can be issued with the same string and search operands as described for the FIND command, except that the ALL search direction operand means exclude or include all lines with the given string.

Lines can also be excluded or recalled to display by using any of the line commands listed below.

Line Command Explanation
X Excludes this line from display.
Xn Excludes the next n lines from display.
XX Marks the first line of a block of data to be excluded from display. A second XX line command is required to delineate the block. The exclusion is performed after the second XX is entered.
F Recalls this line to display or recall the first line of the excluded block to display.
Fn Recalls the first n lines of the excluded block to display.
Ln Recalls the last n lines of the excluded block to display.

You can issue the main command XSWAP to exchange excluded lines with displayed lines.

Displaying Boundaries, Tab and Column Positions

You can display the positions of your boundaries (set with a BNDS main command) and tabs (set by a TABS main command), as well as the editing area column positions on any line by using the appropriate line command as listed below:

Line Command Explanation
BNDS Displays the boundary positions on this line.
COLS Displays the column positions on this line.
TABS Displays the tab positions on this line.

For detailed instructions and examples of setting boundaries and tabs, see the relevant sections in Creating and Modifying Data.