To execute sftp on z/OS using USS, you will need to install IBM Ported Tools.  
This is a no cost feature available on the IBM website 
http://www-03.ibm.com/servers/eserver/zseries/zos/unix/port_tools.html
The ssh daemon has to be running.

I have recently set this up at our shop.  sftp itself will not work under OMVS 
just as ssh won't.  These are open source commands, not TSO/OMVS.  
Therefore, sftp does not (and should not if it is to remain open source) 
recognize MVS data set structures.  You can use sftp in batch but you need 
extra steps.  First you copy the data, the commands, then execute the 
transfer with those 2 files.  Here is an example of going from z/OS to Unix:

//xxxxxxxx JOB (33000),'sftp batch',
//            NOTIFY=&SYSUID,
//            CLASS=2,MSGCLASS=X,MSGLEVEL=1
//*====================================================
//* INITIATE script via ssh, copy to omvs
//*====================================================
//JS010    EXEC PGM=IKJEFT01
//INMVS   DD DSN=YOUR.MVS.INPUT.FILE,
//            DISP=SHR
//OUTHFS   DD FILEDATA=TEXT,
//            PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//            PATHMODE=SIRWXU,
//            PATH='/u/omvs.file'
//SYSTSIN  DD *
  OCOPY IND(INMVS) OUTDD(OUTHFS)
/*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//*
//JS020    EXEC PGM=IKJEFT01
//INMVS    DD DSN=your.sftp.commands,    
//            DISP=SHR
//OUTHFS   DD FILEDATA=TEXT,
//            PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//            PATHMODE=SIRWXU,
//            PATH='/u/sftp.cmds'
//SYSTSIN  DD *
  OCOPY IND(INMVS) OUTDD(OUTHFS)
/*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//*
//JS030    EXEC PGM=BPXBATCH,
// PARM='sh sftp -b /u/sftp.cmds [EMAIL PROTECTED] name'
//STDOUT   DD PATH='/u/sftp.stdout',
//            PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//            PATHMODE=SIRWXU
//STDERR   DD PATH='/u/sftp.stderr',
//            PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//            PATHMODE=SIRWXU
//SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*

within the sftp.commands file are your login information and the copy 
commands

Apologies to anyone who has already sent this information - didn't read 
through all the posts on this question.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to