Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SFTP to a Unix Pipe file

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

New User


Joined: 10 Jan 2006
Posts: 20
Location: India

PostPosted: Tue Jan 28, 2020 9:04 pm    Post subject: SFTP to a Unix Pipe file
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: 1691
Location: Tiruppur, India

PostPosted: Tue Jan 28, 2020 11:57 pm    Post subject:
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: 20
Location: India

PostPosted: Wed Jan 29, 2020 5:14 pm    Post subject:
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: 1691
Location: Tiruppur, India

PostPosted: Thu Jan 30, 2020 1:09 am    Post subject:
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: 20
Location: India

PostPosted: Tue Feb 04, 2020 5:27 pm    Post subject:
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    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 Problem getting record length of a re... amitc23 COBOL Programming 2 Thu Jul 02, 2020 10:52 pm
No new posts Want to check if trailer count is 0 a... rohanthengal JCL & VSAM 10 Fri Jun 26, 2020 10:47 am
No new posts File transfer to remote system using ... kalyan.lc5 TSO/ISPF 2 Wed Jun 24, 2020 1:24 pm
No new posts How to remove remote file older than ... ssuthagar All Other Mainframe Topics 4 Thu Jun 04, 2020 6:26 am
No new posts How to fetch the latest record from a... Dinesh Mani DFSORT/ICETOOL 8 Tue Jun 02, 2020 5:34 pm

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