On Mon, 25 Feb 2008 09:41:26 -0600, Betsy Jeffery wrote:
>
>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:
>
Lots of comments on this:

>//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=*
>//*

o You could use IEBGENER and avoid the OCOPY lines.

o Or, better, put two OCOPY commands in a single IKJEFT01 step.

o Or, best, keep your.sftp.commands in HFS and entirely avoid
  copying them.

o In the customary OMVS setup, a nonprivileged user might be
  unable to create files in /u.

o What use is SYSPRINT in an IKJEFT01 step?

>//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=*
>
o Nowadays, BPXBATCH can use JES data sets for STDOUT and STDERR
  (but, alas, not STDIN).

o What use is SYSPRINT in a BPXBATCH step?

--gil

----------------------------------------------------------------------
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