Opening a remote file

You can open a remote file for browsing, editing, or viewing in the default editor for the file.

  • Browsing a file opens it in read-only mode in the editor.
  • Editing a file opens it for write access.
  • Viewing a file opens it for write access without locking the file.
For more information about using the editors, see the related links.
You must be connected to the remote system and locate the file you want to open.
You can set several preferences that control what happens when you open a file:
  • You can choose the default editor action for MVS files by setting the Default action for opening MVS files preference on the MVS Files preference page. This preference setting determines whether a file is opened for browsing, editing, or viewing when you double-click the file name. If you drag a file from the Remote Systems view to the editor, however, the file is opened in edit mode in the default editor that is associated with the file extension. Setting the Default action for opening MVS Files preference does not change this behavior.
  • To open a warning window when you edit a file that does not have a property group, select Show missing property group warning message on opening files on the MVS Files preference page. Property group association is not verified for sequential data sets.
  • Opening large files (greater than 2500 KB) can cause out-of-memory errors and a forced shutdown of the workbench. Use the Show warning message on opening files setting on the z/OS Solutions preference page to enable the product to check the size of files and display a warning when they are larger than the specified threshold.
    Tip: You can check the size of a file before you open it by opening the Properties view. This view shows the file size for remote resources in bytes or in kilobytes.
For more information about these preferences, see the related topics.

Browsing a file

  1. In the Remote Systems view or z/OS Projects view, select a file.
  2. From the menu, click Browse. The file is opened in read-only mode for you to view.
    Note: If you browse a load module file, non-displayable characters that range from 0x00 to 0x3F and 0xFF are replaced with a dot (.). CRLF characters are added to the file records. All editor browse functions are available when you browse a load module file.

Editing a file

If you associate a file with a property group and specify the SYSLIB in the property group settings, then the editor resolves dependencies in the file. If a file does not have a property group that is associated with it, then you are prompted to create one or to associate one with the file. For more information about creating a property group and setting properties that are required to resolve dependencies, see the related topics.

  1. In the Remote Systems view or z/OS Projects view, select a file.
    • To edit the file with the default editor, double-click the file or right-click and select Open from the menu.
    • To open the file with a different editor, right-click it and select Open With from the menu.
    If you open a COBOL or PL/I partitioned data set member that does not have a property group, the Missing Property Group window prompts you to create one or associate one with the file. This window opens only if the content type of the file is COBOL Source File or PL/I Source File. For more information about content types, see the related topics.
  2. To open the file without associating a property group, click OK.
  3. To create or associate a property group, choose one of the following actions:
    • Create and associate a property group Opens the property group editor and sets the Application language to COBOL or PL/I, according to the content type. Use this editor to create a property group and associate it with the file.
    • Create and associate a property group with the parent data set or Create and associate a property group with the parent subproject Opens the property group editor and sets the Application language to COBOL or PL/I. Use this editor to create a property group and associate it with the data set or the MVS subproject that contains the file.
      Tip: If you select COBOL or PL/I, the property group editor does not show unrelated tabs. If you choose COBOL, for example, all other categories, such as PL/I and Assembler, are disabled, and their tabs are removed from the editor.
    • Associate an existing property group Opens the Associate Property Group window. Choose a property group from the list and click OK.
    • Associate an existing property group with the parent data set or Associate an existing property group with the parent subproject. Opens the Associate Property Group window. Choose a property group from the list and click OK.
    If you choose to associate an existing property group, the file is opened after the association is made. If you choose to create a property group, then you must request the Open or Open with action again.

The file opens in the editor. The file is locked on the remote system while you are editing it.

If the file does not have a mapping definition, the file type scanner examines the file contents to determine the file type. The scanner then adds the determined file type extension to the file name and opens the file with the default editor. For example, if you double-click a file named MYJCL, the product scans the file to determine the file type, assigns the .jcl file type extension to it, and then opens it in the JCL Editor.

Viewing a file

The View action opens a file in the default editor, but does not lock the file. You can change the file while you are viewing it, but to save your changes you must specify a new data set member name.

You can see the lock status of a remote file by looking in the Properties view for the file. A locked file shows a user ID in the Lock Owner row of the properties table. An unlocked file shows no user ID in this row.
Remote file Properties with and without a lock owner.
  1. In the Remote Systems or z/OS Projects view, right-click the sequential data set or partitioned data set member name and click View. The file opens in the default editor. The Lock Owner field of the Properties view remains empty or, if another user locked the file, shows the user ID of that user.
  2. Change the file, if necessary. Some editor actions that require automatic saves, such as Save and Syntax Check and Refactor, are disabled when you open a file by using the View action.
  3. Close the file.If you changed the file, you are prompted to save it by using the Save As window for the editor in which the file was opened.