SSH Client Output

By default, the SSH Client program returns results to the terminal from where the job or program was started. You can direct this output to a file by using the label equation of the STDOUT file.

If the label equation is used to change KIND to DISK, the following rules apply:

  • If no other attributes are specified, or if FILESTRUCTURE is set to STREAM, a stream file is created. For example,

    RUN *SYSTEM/SSHCLIENT ("SSH -P pass user@server command");
    FILE STDOUT (KIND = DISK); 
  • If FILEKIND is set, the file is created with the appropriate characteristics. For example,

    RUN *SYSTEM/SSHCLIENT ("SSH -P pass user@server command");
    FILE STDOUT (KIND = DISK, FILEKIND = TEXTDATA);
  • If FILENAME is set, and the file name has a Programmer’s Workbench extension (for example, “.TXT_M”), the file is created with the appropriate FILEKIND. For example,

    RUN *SYSTEM/SSHCLIENT ("SSH -P pass user@server command");
    FILE STDOUT (KIND = DISK, TITLE = SSHOUTPUT/"COMMAND.TXT_M");