Your browser does not allow this site to store cookies and other data. Some functionality on this site may not work without them. See Privacy Policy for details on how we would use 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 >>
    Setting up Non-Interactive Server and User Authentication >>
    Setting up Non-Interactive Secure File Transfer >>
        Controlling File Transfer >>
        File Transfer Examples>>
            File Transfer Example Using scpg3
            File Transfers Using REXX Scripts and a JCL Procedure

File Transfer Example Using scpg3

This example uses the SCPGET JCL that can be found from SAMPLIB. SAMPLIB contains also other scpg3 and sftpg3 non-interactive file transfer examples.

This example executes scpg3 and copies a remote file textfile.txt into a dataset //'USERID.TEST.TEXTFILE'. If the dataset does not exist, it is created with default values recfm VB and lrecl 1024.

//SCPGET EXEC PGM=IKJEFT1A,
//             DYNAMNBR=75,
//             TIME=1440,
//             REGION=6M
//SYSPRINT DD  SYSOUT=*
//SYSTSPRT DD  SYSOUT=*
//SYSTERM  DD  DUMMY
//STDOUT   DD  PATH='/tmp/&SYSUID.-SCPGET.out',
//             PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//             PATHMODE=(SIRUSR,SIWUSR)
//STDERR   DD  PATH='/tmp/&SYSUID.-SCPGET.err',
//             PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//             PATHMODE=(SIRUSR,SIWUSR)
//STDENV   DD  DSN=&SYSUID..SSZ.SRVR608.PARMLIB(SSHENV),
//             DISP=SHR
//SYSTSIN  DD  *
  BPXBATCH PGM /opt/tectia/bin/scpg3 +
        user1@remote_host:textfile.txt +
        //'USERID.TEST.TEXTFILE'
/*
//STDPR   EXEC PGM=IKJEFT1A,
//             DYNAMNBR=75,
//             TIME=1440,
//             REGION=6M
//SYSPRINT DD  SYSOUT=*
//SYSTSPRT DD  SYSOUT=*
//SYSTERM  DD  DUMMY
//STDOUT   DD  PATH='/tmp/&SYSUID.-SCPGET.out',
//             PATHOPTS=(ORDONLY),
//             PATHDISP=(DELETE,KEEP)
//STDERR   DD  PATH='/tmp/&SYSUID.-SCPGET.err',
//             PATHOPTS=(ORDONLY),
//             PATHDISP=(DELETE,KEEP)
//STDOUTPR DD  SYSOUT=*,
//             DCB=(LRECL=4000,RECFM=VB)
//STDERRPR DD  SYSOUT=*,
//             DCB=(LRECL=4000,RECFM=VB)
//SYSTSIN  DD  *
  OCOPY INDD(STDOUT) OUTDD(STDOUTPR) TEXT
  OCOPY INDD(STDERR) OUTDD(STDERRPR) TEXT
/*

PreviousNextUp[Contents] [Index]


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

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

===AUTO_SCHEMA_MARKUP===