On Sun, 29 Jan 2017 19:37:41 +0300, venkat kulkarni wrote:
>
>We tested SFTP on our test z/OS system to Test AIX box and we are able to
>transfer data between these host. But now, I am trying in production system
>with below detail.
>    ...
>****** ***************************** Top of Data ****
>000800 OPUT 'SFTPSFT.SFTP.TEST(SFTP1)'  '/u/SFTPSFT/vp12'
>000900 OSHELL { echo 'lcd /u/stcsys' ; +
>001000          echo 'ascii'; +
>001100          echo 'cd /home/ftp4rpt/';  +
>001200          echo 'mput test.txt'; } | +
>001300        sftp -v [email protected]
>001400 /*
>
I'd be inclined to add commands to do some probing:

>****** ***************************** Top of Data ****
>000800 OPUT 'SFTPSFT.SFTP.TEST(SFTP1)'  '/u/SFTPSFT/vp12'
>000900 OSHELL {
>001000        set -x; id; echo ~; ls -al ~/.ssh; +
>001000        { echo 'lcd /u/stcsys' ; +
>001000          echo 'ascii'; +
>001100          echo 'cd /home/ftp4rpt/';  +
>001200          echo 'mput test.txt'; } | +
>001300        sftp -v [email protected]
>001400 /*
>
(What's the maximum length of a TSO command?)

Oops!  I just RTFM and notice that by default stderr is discarded.  So, the
probe command becomes:
>001000        set -x; exec 2>&1; id; echo ~; ls -al ~/.ssh; +

You might do better to CALL *(BPXBATCH) directly since OSHELL FREEs STDERR.

(Why are these "utilities" so inappropriate!?)

I'd use BPXWUNIX instead, allocating stdout and stderr in SYSOUT
in JCL DD statements.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to