IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SFTP to a Unix Pipe file


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
yuvan

New User


Joined: 10 Jan 2006
Posts: 23
Location: India

PostPosted: Tue Jan 28, 2020 9:04 pm
Reply with quote

Hi ,

We are using FTP to a file Unix pipe , and able to do it successfully .




FTP card :"

host
user password
put '/XXX.FILE.SFTP' /XXABC
quit



XXX.TEST.FILE has contents
1234|xxxx|567|

This contents directly placed in the the pipe file through FTP method and based on the pipe file content few process are triggered.

But when we use SFTP , we are not able to do it .

using

lfile="//XXX.FILE.SFTP"
rfile=/XXABC/XXX.FILE.SFTP

geting error

Ý38.598¨ remote open("/XXABC"): Failure

using SSH key based in SFTP.

Please provide inputs.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Jan 28, 2020 11:57 pm
Reply with quote

From your post, where is this file - XXX.TEST.FILE being used?

Your question is not clear, you need to take your time and format the question and use code tags to make the text readable.
Back to top
View user's profile Send private message
yuvan

New User


Joined: 10 Jan 2006
Posts: 23
Location: India

PostPosted: Wed Jan 29, 2020 5:14 pm
Reply with quote

XXX.FILE.SFTP is created in Mainframe, and pushed to Unix as below to location
/XXABC.

FTP card :

Code:
host
user password
put 'XXX.FILE.SFTP'    /XXABC
quit


XXX.FILE.SFTP has data in below format : for example
Code:
1234|xxxx|567|

Once the Pipe data is placed in PIPE in Unix , next set of process started. for example next job is pushed to mainframe.

Now Unix server is migrated to Linux also FTP need to be converted to SFTP.
SSH Key based is enabled in Linux and were able to upload files in Linux from mainframe.

But when i try upload this file 'XXX.FILE.SFTP' which is having the data in pipe format not able to push it and it throws error as below

Code:
lfile="//XXX.FILE.SFTP"
rfile=/XXABC/XXX.FILE.SFTP

geting error

Code:
Ý38.598¨ remote open("/XXABC"): Failure



Is it possible to write in PIPE - in Linux from mainframe?

Coded for you. Do itself, as requested, next time
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu Jan 30, 2020 1:09 am
Reply with quote

Hello,

Are you using the same USERID for both FTP and SFTP? One possibility is that the SFTP userid may not have access to that path.

The error message you posted does not point to a specific cause,
In the SFTP JCL proc, change this
Code:
$coz_bin/cozsftp  $ssh_opts -b- $remoteuser@$server <<EOB 

to
Code:
$coz_bin/cozsftp  $ssh_opts -b- -vvv $remoteuser@$server <<EOB


and run it, -vvv would give detailed debugging information. Maybe that would have more details of the failure.
Back to top
View user's profile Send private message
yuvan

New User


Joined: 10 Jan 2006
Posts: 23
Location: India

PostPosted: Tue Feb 04, 2020 5:27 pm
Reply with quote

We used a different approach to place the file in one folder and then placed a script to copy the data from that folder and place it in pipe. This works fine
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top