Your browser does not support HTML5 local storage or you have disabled it. Some functionality on this site, including saving your privacy settings and offering you special discounts, uses local storage and may not work with local storage disabled. We recommend allowing the use of local storage in your browser. In some browsers, it is the same setting used for disabling cookies.

SSH Tectia 
PreviousNextUp[Contents] [Index]

    About This Document >>
    Installing SSH Tectia Server for IBM z/OS >>
    Getting Started with SSH Tectia Server for IBM z/OS >>
    Configuring the Server >>
    Configuring the Client >>
    Authentication >>
    File Transfer Using SFTP >>
        Handling MVS Datasets and HFS File System Access>>
        Controlling File Transfer>>
        Staging
        Listing Datasets with SFTP Clients>>
        Secure File Transfer Examples Using the z/OS Client>>
        Secure File Transfer Examples Using Windows and Unix Clients>>
            File Transfers Using Windows GUI
            File Transfers Using Command-Line Applications
            File Transfers Using FTP/SFTP Conversion
    File Transfer Using Transparent FTP Tunneling >>
    Tunneling on the Command Line >>
    Troubleshooting SSH Tectia Server for IBM z/OS >>
    Advanced Information >>
    Man Pages >>
    Log Messages >>

File Transfers Using Command-Line Applications

In most of these examples, SSH Tectia Client 5.2. is used. Examples can be used also with other clients if not mentioned otherwise. These examples apply to both Unix and Windows command-line clients.

Interactive File Transfers Using Command-Line Applications

SSH Tectia Client on Windows and Unix contain two file transfer applications.

  • scpg3 is a secure replacement for remote copy and provides easy secure interactive and non-interactive file transfers.
  • sftpg3 is a secure replacement for FTP and provides a user interface for interactive file transfers and a batch mode for unattended file transfers.

The file transfer formats are the same as described earlier.

Example 1: scpg3 file transfer from Unix file to MVS partitioned dataset member using default file transfer profile.

$ scpg3 textfile.txt user1@zos:/__USER1.TEST2.PDS/MEMBER1

Example 2: scpg3 file transfer from MVS sequential dataset to Windows file using a Windows profile.

C:\> scpg3 user1@zos:/ftadv:P=WIN/___USER1.TEST2.PS.FILE c:\temp\my_file.txt

Example 3: scpg3 file transfer of a partitioned dataset with members to Unix directory and files using the default profile.

$ scpg3 -r user1@zos:/_TEST2.PDS /tmp/pds/

Example 4: File transfers between Unix and z/OS using sftpg3 (the sput and sget commands are available on SSH Tectia Client 5.2 and later).

$ sftpg3 user1@zos
user1@zos's password: 
sftp> sget /_TEST2.PDS/MEMBER1 /tmp/member1
sftp> sget /FTADV:X=BIN/__TEST.PS.FILE1
sftp> sput /tmp/local_file.txt /FTADV:P=FB80/___&SYSUID..SSZ.SAMPLIB/JCL1

Example 5: Using the site command to define additional dataset parameters (available on SSH Tectia Client 5.2 and later).

Parameters can be entered either one by one, or several parameters can be delimited by commas or spaces. Both long parameters and abbreviations can be used. The plain site command outputs the list of entered parameters.

sftp> site LRECL=80
sftp> site RECFM=FB,VOLUMES=TEST
sftp> site X=TEXT,C=ISO8859-1,D=IBM-1047
sftp> site
Remote site parameters:
O=FB,R=80,VOLUMES=TEST,X=TEXT,C=ISO8859-1,D=IBM-1047

Example 6: File transfers using Unix OpenSSH client.

$ sftp user1@zos
Connecting to zos
user1@zos's password: 
sftp> get /_TEST2.PDS/MEMBER1 /tmp/member1
sftp> get /FTADV:X=BIN/__TEST.PS.FILE1
sftp> put /tmp/local_file.txt /FTADV:P=FB80/___&SYSUID..SSZ.SAMPLIB/JCL1

Unattended File Transfers Using Command-Line Applications

scpg3 commands can be used as Scheduled Tasks on Windows, or as cron jobs on Unix. With sftpg3, batch mode can be used. The syntaxes for scpg3 and sftpg3 are the same as described before.

PreviousNextUp[Contents] [Index]


[ Contact Information | Support | Feedback | SSH Home Page | SSH Products ]

Copyright © 2007 SSH Communications Security Corp.
This software is protected by international copyright laws. All rights reserved.
Copyright Notice

===AUTO_SCHEMA_MARKUP===