Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SFTP from mainframe to UNIX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
VenkateshMuthiyalu

New User


Joined: 11 Sep 2006
Posts: 4

PostPosted: Fri Oct 19, 2007 3:41 pm    Post subject: SFTP from mainframe to UNIX
Reply with quote

Anyone has sample JCL for Secure FTP which ftps data from mainframe to unix systems?
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Oct 19, 2007 4:33 pm    Post subject: Reply to: SFTP from mainframe to UNIX
Reply with quote

Start here with this previous topic.
Back to top
View user's profile Send private message
VenkateshMuthiyalu

New User


Joined: 11 Sep 2006
Posts: 4

PostPosted: Fri Oct 19, 2007 4:39 pm    Post subject: Reply to: SFTP from mainframe to UNIX
Reply with quote

That link contain only the explanation. But JCl is not there. Any one provide the JCL for this with explanation..
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Tue Oct 23, 2007 10:07 am    Post subject: Reply to: SFTP from mainframe to UNIX
Reply with quote

VenkateshMuthiyalu, that is how these Forums operate. Had the original poster provided some follow-up, maybe there'd be more information to go on. Hopefully, as you discover what needs to be done, you can provide your follow-up so the next poster can benefit.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Tue Oct 23, 2007 10:20 am    Post subject: Reply to: SFTP from mainframe to UNIX
Reply with quote

I just found a website with an SFTP example job:

http://itc.virginia.edu/mss/OpenSSH.html
Back to top
View user's profile Send private message
Jeevasuthan
Currently Banned

New User


Joined: 19 Oct 2007
Posts: 2
Location: India

PostPosted: Tue Oct 23, 2007 1:41 pm    Post subject: Reply to: SFTP from mainframe to UNIX
Reply with quote

Hi Kevin

i just saw that link. Can you explain the working of this JCL

//STEPNAME EXEC PGM=BPXBATCH,
// PARM='sh sftp -b sftp-batch userid@is-delphi.admin.virginia.edu'
//SYSPRINT DD SYSOUT=*
//STDOUT DD PATH='/home/userid/bpxout.txt',
// PATHOPTS=(OCREAT,OTRUNC,OWRONLY),PATHMODE=SIRWXU
//STDERR DD PATH='/home/userid/bpxerr.txt',
// PATHOPTS=(OCREAT,OTRUNC,OWRONLY),PATHMODE=SIRWXU
//

/home/userid/sftp-batch on mercury contains:
cd /home/userid
lcd /home/userid
pwd
lpwd
ascii
put hello.c
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Wed Oct 24, 2007 1:22 am    Post subject: Re: Reply to: SFTP from mainframe to UNIX
Reply with quote

Jeevasuthan wrote:

Can you explain the working of this JCL

//STEPNAME EXEC PGM=BPXBATCH,
// PARM='sh sftp -b sftp-batch userid@is-delphi.admin.virginia.edu'
//SYSPRINT DD SYSOUT=*
//STDOUT DD PATH='/home/userid/bpxout.txt',
// PATHOPTS=(OCREAT,OTRUNC,OWRONLY),PATHMODE=SIRWXU
//STDERR DD PATH='/home/userid/bpxerr.txt',
// PATHOPTS=(OCREAT,OTRUNC,OWRONLY),PATHMODE=SIRWXU
//


I'm no Unix expert, but ...

PGM=BPXBATCH is the MVS to Unix interface program. You can see more information here in the 11.2 The BPXBATCH utility from the z/OS V1R8.0 UNIX System Services User's Guide.

PARM='sh sftp -b sftp-batch ... tells BPXBATCH to run the shell command "sftp". The "-b" switch tells sftp to use the batch file "sftp-batch" for its input. The next parameter would be the TCP/IP address of the Unix server to connect to.

STDOUT and STDERR are your standard-output and standard-error designations.
Back to top
View user's profile Send private message
Jeevasuthan
Currently Banned

New User


Joined: 19 Oct 2007
Posts: 2
Location: India

PostPosted: Wed Oct 24, 2007 9:21 am    Post subject: Reply to: SFTP from mainframe to UNIX
Reply with quote

Thanks Kevin.

home/userid/sftp-batch on mercury contains:
cd /home/userid
lcd /home/userid
pwd
lpwd
ascii
put hello.c

IF i am correct the above mentioned script are to be written in the sftp-batch file in unix to SFTP the file name hello.c.
I went through the BXPBATCH UTILITY. Their its given that we have mention about STDENV. Can you guide me about STDENV.
Back to top
View user's profile Send private message
autobox

New User


Joined: 19 Aug 2005
Posts: 48

PostPosted: Thu Aug 26, 2010 3:43 pm    Post subject:
Reply with quote

Hi,

If I want to user USERID/PWD in the JCL above, where to code the USERID and PASSWORD?

Thanks.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8189
Location: East Dubuque, Illinois, USA

PostPosted: Thu Aug 26, 2010 5:17 pm    Post subject:
Reply with quote

Quote:
Can you guide me about STDENV.
From the manual Unix System Services User's Guide, which contains a lot about BPXBATCH:
Quote:
| 11.2.3 Passing environment variables to BPXBATCH

When you are using BPXBATCH to run a program, you typically pass the program a file that sets the environment variables. If you do not pass an environment variable file when running a program with BPXBATCH, or if the HOME and LOGNAME variables are not set in the environment variable file, those two variables are set from your logon RACF profile. LOGNAME is set to the user name, and HOME is set to the initial working directory from the RACF profile.

Note: When using BPXBATCH with the SH option (SH is the default), environment variables specified in the STDENV DD are overridden by those specified in /etc/profile and .profile (which overrides /etc/profile). This is because SH causes BPXBATCH to execute a login shell that runs the /etc/profile script and runs the user's .profile.

To pass environment variables to BPXBATCH, you define a file containing the variable definitions and allocate it to the STDENV ddname. The file can be one of the following:

* A z/OS UNIX file identified with the ddname STDENV
* An MVS data set identified with the ddname STDENV
There is more in the manual about the details, but you can read it yourself.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Thu Aug 26, 2010 7:38 pm    Post subject:
Reply with quote

autobox wrote:
Hi,

If I want to user USERID/PWD in the JCL above, where to code the USERID and PASSWORD?

Thanks.


I don't know. I can't find any documentation that supports the concept of sub-commands for providing a userid and/or password for SFTP. I belive that's because the user authentification takes place when the connection is first made between the client and server.

Maybe someone more familiar with Unix and/or SFTP will know.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Mainframe Blocks to Tracks conversion upendrasri JCL & VSAM 1 Sat Nov 18, 2017 10:52 am
No new posts NDM 300 files from mainframe to linux shreya19 All Other Mainframe Topics 2 Thu Oct 26, 2017 11:40 am
No new posts Need help on SFTP alternate for LOCSI... ashok_uddaraju JCL & VSAM 2 Thu Oct 26, 2017 12:43 am
No new posts Identifying Interfaces in CICS/mainframe Ashishpanpaliya CICS 5 Fri Oct 13, 2017 3:21 pm
No new posts Mainframe scheduling tool ddhar Compuware & Other Tools 2 Wed Sep 27, 2017 12:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us