Working with z/OS UNIX System Services files


This section discusses working with z/OS UNIX System Services (USS) files and folders.

To add a filter

  1. Right-click an HCI connection name and select Add Filter or click + next to an HCI connection name.
    If no HCI connection is displayed, follow the prompts to create one.
  2. In the z/OS UNIX file filter criteria field,
    1. Enter the file path
    2. (Optional)Enter the filter name. The filter name must be up to 40 characters. By default, the filter name takes the file path criteria as the filter name and shows the files based on the file path. 
  3. Expand the filter to view its files. The symlink file will have a different file icon image-2024-3-19_19-49-47.pngin the file list. You can check the file type in the properties of the file.

To edit a filter

  1. Right-click the filter name and click Edit.
  2. In the Edit Filter field, edit the filter criteria and filter name as required.
  3. Press Enter to save your changes.

To delete a filter

Right-click on the filter name and click Delete. A confirmation message is displayed to delete the filter.

To create a new z/OS UNIX file

  1. Right-click on the folder or filter and click New File.
  2. In the z/OS UNIX file name field enter the file name up to 1,023 characters including alphanumeric characters (A–Z, a–z, and 0–9), blanks, mathematical symbols (+ - = | ~ ( ) < > { } \), punctuation marks (? , . ! ; : ' " / [ ]), and the following special characters: &, %, $, #, @, ^, *, and _.
     An error message is displayed if the entered file name already exists or you are not authorized to create the file in that path.
  3. Select if you want to tag the file with an encoding or not.
    1. If you select No, the file will be created with CCSID as 0.
    2. If you select Yes, then from the drop-down list, select any of the options from ASCII or UTF-8. You can specify a custom CCSID. If the CCSID is not a valid one, you will see an error message. You can also select it from the five most recently used CCSID history.

The file is created and highlighted in the USS tee view.

To search a z/OS UNIX file

  1. Right-click an HCI connection name.  If no HCI connection is displayed, follow the prompts to create one.
  2. Click Search for USS Files and then click + New Search Criteria in the z/OS UNIX file filter criteria field. You can view and select the five most recently created search criteria.
    When you search a USS file,  a temporary node is added to the USS tree view that would disappear when you log out or restart the VS Code. If you try to search for a pattern that already exists as a filter, you will be notified about the same. You can add a filter for existing search criteria but must provide a different name as the search node already takes the default name.

To create search criteria

  1. Click the search icon next to the HCI connection in the tree view.
  2. In the field, enter the required search criteria. The search criteria are added under the HCI connection.

To edit the search criteria

  1. Right-click the search criteria name, click Edit USS Search Criteria, or click image-2024-2-13_13-57-3.pngpresent beside the search criteria. 
  2. . In the Edit USS Search Criteria field, edit the filter criteria.
  3. Press Enter to save your changes.

To create a new z/OS UNIX folder

  1. Under z/OS UNIX, create a filter. For more information, see To add a Filter.
  2. Right-click on the filter and select New Folder.
  3. In the z/OS UNIX folder name field enter the folder name of up to 1,024 characters, including all special characters except an apostrophe ('), and press the Enter key. 

    If a folder already exists or you do not have permission to create this folder, an error message is displayed.
    The folder is created and highlighted in the USS tree view. To create a new folder inside a folder, right-click on the folder and select New Folder.

To delete a z/OS UNIX file and folder

  1. Right-click one or more USS files or folders that you want to delete and select Delete
  1. When prompted, confirm the deletion.
    The file or folder is deleted.

To view z/OS UNIX file or folder properties

Under z/OS UNIX, right-click on the file or folder and select Properties.
The properties file containing the file or folder properties is displayed.

To update permissions for z/OS UNIX files and folders

  1. Under  z/OS UNIX, right-click on the USS file or folder and select Permissions.
  2. On the Permissions for folder filename/folder name page, select the required permissions for each user type (owner, group, and other) and click Apply to save your changes.

To rename the z/OS UNIX files and folders

  1. Under z/OS UNIX, right-click the USS file or folder and select Rename.
  2. When prompted, enter the file or folder name and press Enter. If the renaming is successful, the renamed file or folder is highlighted in the USS tree view.
    An error message is displayed in the following scenarios:

    • A file or folder in that path with the same name already exists.
    • The file that you have renamed is opened in the editor.
    • The Permissions window for a file that has been renamed is open in the editor that has been renamed.

To open az/OS UNIX file in browse mode

  1. Expand the filter to view its files. 
  2. Right-click the required file and select Browse. Alternatively, you can click on the file. 

    The file is displayed in the editor in the read-only mode. If the file size is more than 20 MB, you receive a message that the file is larger and might take longer to open. To open the file anyway, click Yes. Otherwise, click Cancel.

To open a z/OS UNIX file in edit mode

  1. Expand the filter to view its files. 
  2. Right-click on the required file and select Edit. If the file is opened in browse mode and you try to edit it, you are prompted to switch to edit mode.
    When the file is opened in the edit mode, image2022-8-19_17-4-27.pngis displayed next to the file name, indicating that the file is locked. If you then close the editor then the lock is released.
  3. On the menu bar, click File and click Save to save your changes. You can also press Ctrl+S to save your changes. If you have enabled the Autosave option, the changes are saved automatically.
    If you don't have write permission (edit permission), you will see the following error message:

    image-2024-5-24_19-48-23.png

    Important

    Workbench Explorer supports edit functionality for a file size maximum of 20 MB. 

To browse a z/OS UNIX file using encoding

  1. Expand the filter to view its files. 
  2. Right-click the required file and select Browse using encoding.
  3. From the drop-down list, select any of the encoding options (default, ASCII, or UTF-8) that you want to use.
    You can also specify a custom CCSID. If the CCSID is not a valid one, you will see an error message. 
    You see a confirmation message when you select any encoding option other than the default one. After your confirmation, the file is displayed in the editor in the read-only mode.

To edit a z/OS UNIX file using encoding

  1. Expand the filter to view its files. 
  2. Right-click on the required file and select Edit using encoding.
  3. From the drop-down list, select any of the encoding options (default, ASCII, or UTF-8) that you want to use.
    You can also specify a custom CCSID. If the CCSID is not a valid one, you will see an error message. 
    You see a confirmation message when you select any encoding option other than the default one. After your confirmation, the file will be displayed in edit mode in the editor.
  4. On the menu bar, click File and click Save to save your changes. You can also press Ctrl+S to save your changes. If you have enabled the Autosave option, the changes are saved automatically.

To change the encoding of the z/OS UNIX file

  1. Expand the filter to view its files. 
  2. Right-click on the required file and select Change Tag.
  3. From the drop-down list, select any of the encoding options (default, ASCII, or UTF-8) that you want to use.
    You can also specify a custom CCSID. If the CCSID is not a valid one, you will see an error message. 
    You see a confirmation message when you select any encoding option other than the default one. After your confirmation, the file encoding is changed.

To copy the z/OS UNIX file to another z/OS UNIX directory

  1. Expand the filter to view its files. 
  2. Right-click on the required file or select multiple files by pressing ctrl, select the multiple files you want to copy, and select Copy. Then right-click the target directory and select Paste
    If files already exist at the destination, you will see an overwrite message.

To upload files from your local system to the z/OS UNIX directory

  1. Under  z/OS UNIX, right-click on the USS folder and select Upload Files.
  2. Browse and select the required files you want to upload and click Select
  3. Select your preference if you want to tag the file with an encoding. If you select No, the files are uploaded without any tagged encoding. If you select Yes, select any of the encoding options (default, ASCII, or UTF-8) that you want to use or you can also specify a custom CCSID. Once the encoding is selected, the files are uploaded to the z/OS UNIX directory. 
    If any file is already present with the same name, a prompt is displayed to take action with the following options:

    • Replace: It will replace the existing file in the directory.
    • Skip: It will skip uploading the current individual file which is already present.
    • Rename: You can rename the file and upload it. When you click Rename, a field is displayed to enter the file name.
    • Cancel: I will cancel the entire upload operation. The rest of the files will not be uploaded.


If the selected file is not supported, you see an error message. If you still want to continue to upload, click Proceed.

All the results are displayed in a summarized manner in the Output channel.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*