C H A P T E R  2

File Editor

The Sun MTP File Editor enables you to select files to edit and to open the default editor. The default editor is the vi editor; however, you can customize the kixed shell script to run another editor. Refer to the Sun Mainframe Transaction Processing Software Administrator's Guide for information about customizing Sun MTP shell scripts.

This chapter contains the following topics:


Starting the File Editor and Selecting a File


procedure icon  To Start the File Editor and Select a File

1. Press PF1 on the Development System main menu to display the File Menu screen shown in FIGURE 2-1.

The fields at the top of the screen show the display criteria. TABLE 2-1 describes these fields.

The lower portion of the screen lists the files you can select, based on the criteria you specified. TABLE 2-2 describes the columns in the file display area.

  FIGURE 2-1 File Editor - File Menu Screen

Screen shot showing the File Editor's File Menu screen.

2. Specify the file criteria at the top of the screen and press PF4 to display the files that meet the criteria.

If you type a name in the New filename field and press PF5, the editor opens an empty file with this name.

3. Press the Tab key to move the cursor from the display criteria fields to the selection column, labeled S, at the left of the screen.

4. Select one or more files by typing the letter S or s next to the file name.

If you select "..", the Directory field changes to the parent directory and the screen refreshes showing the contents of the parent directory.

5. Press PF2 to open the editor with the selected file.

If you select multiple files, the files are displayed in sequence until you have edited all of them.


Display Criteria Fields

The following table lists the display criteria fields, the default values associated with the fields, and valid values.

TABLE 2-1 Display Criteria Fields

Field Name

Default Value

Valid Values

Directory

$KIXSYS

Complete path name specifying the location of the files to be edited. The first parameter in the directory can be an environment variable, which must have a dollar sign ($) as the first character.

Extensions

bms, clt, cl2, cbl, ppl, plt, pli, pl1

You can specify up to eight different extensions. Each extension contains three characters and is case-sensitive. The system automatically tabs to the next location where you can type another extension.

List Null Extensions

N

If you type Y, files with no extensions are included in the display.

New filename

blank

The file name must conform to the Sun MTP file naming conventions. You can include an extension, if you want. The new file is created when you press PF5 - Edit New File.



File Information Fields

The following table describes the file information fields on the File Menu screen.

TABLE 2-2 File Menu Screen--File Information Fields

Field Name

Description

Name of file

First 14 characters of the file name.

The first two lines in the file display area are "." and "..", indicating the current (.) and the parent (..) directories. The remaining lines list the names of the files and directories in the directory.

Owner

Owner of the file.

In most cases, the listed files are owned by the current user. If files have an owner other than the current user, they might be read-only.

Mode

Ten-character field that indicates the file type and permissions. The first character identifies the file type; the two most common file types are:

  • d: directory
  • -: normal text file

For a complete list of the file types, refer to your operating system documentation.

The remaining nine characters show the permissions for the file. The permissions are divided into three sets of three characters each:

  • Characters 2, 3 and 4 set the permissions for the owner of the file.
  • Characters 5, 6 and 7 set the permissions for the group.
  • Characters 8, 9 and 10 set the permissions for all other users. The values listed apply only to file names, not to directories.

Each 3-character set has the same meaning:

  • First character - r grants read permission.
  • Second character - w grants write permission.
  • Third character - x indicates the file is considered an executable file.

Date and Time of last modification

Two columns: The first column shows the date in MM/DD/YYYY format. The second shows the time using a 24-hour clock: HR:MIN:SEC.

Size (bytes)

Size of the file in bytes.



File Editor Function Keys

The following keys are active on the File Editor-File Menu screen.

TABLE 2-3 File Editor Function Keys

Function Key

Action

PF2

Starts the editor defined in the kixed shell script.

PF3

Closes the File Editor and returns to the Development System main menu.

PF4

Refreshes the data in the file list portion of the screen. After editing a file, press PF4 to display any changes to the file's information.

PF5

Opens an empty file with the name shown in the New filename field. If you do not specify a file name, an error message is displayed and you are prompted for a file name.

PF7

Displays the previous page of files. If the top of the file list is displayed, this message is displayed:

Beginning of data reached

PF8

Displays the next page of files. If the bottom of the file list is displayed, this message is displayed:

End of data reached

PF9

Redisplays the contents of the directory, sorted by file name.

PF10

Redisplays the contents of the directory, sorted by the file's last modification date.

PF11

Redisplays the contents of the directory, sorted by file size.

Enter

Makes effective any changes to the display criteria fields. The screen refreshes, and files matching the new criteria are displayed.