sFTP and site command to MVS

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
3 posts Page 1 of 1

Harold76

Posts: 6
Joined: Wed Apr 30, 2014 11:06 am

Post by Harold76 » Mon Sep 15, 2014 8:27 am
I've got an issue in that I need to sFTP a file to the mainframe, and pass the quote site command to specify a record format and record length. From what I can find, sFTP doesn't natively support this, but the CO:Z software has methods around this that require a special "ls" command. How can I pass this command during an sFTP task, since the task doesn't have an "execute command" option.

Support_Rick

Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Wed Oct 01, 2014 12:00 pm
Instead of using the SFTP|Put command, use the SFTP|ManualPut to place the file. There is a "list" command that on the Target system should give you the "ls" if it's a Unix/Linux based system.

Also, under version 4.6+, you'll find that you can now perform an SSH Command (separate task) that might do what you need to do. Please review our release notes on the SSH Command Task:
Added a new "Execute SSH Commands" Task which allows Projects to run commands on a remote SSH server. Parameters can be passed to the SSH command as constants or variables. The output from the remote SSH command can be directed to the job log or an output file.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696

Harold76

Posts: 6
Joined: Wed Apr 30, 2014 11:06 am

Post by Harold76 » Thu Oct 02, 2014 12:28 pm
I did try the "Execute SSH Command" but I get this error:
10/2/14 1:26:04 PM ERROR ls: FSUM6785 File or directory "/+lrecl=80" is not found
10/2/14 1:26:04 PM ERROR [9003 - execSSH] The command encountered an error with a return code of '1'. To ignore this error, set the attribute 'errorIfCommandFails' to false.
The formatting of the command is correct according to the CO:Z manual. I've also tried opening the connection with the sFTP task, and passing the session id to the execSSH task, but that fails because the execSSH task is expecting an sFTP connection type.

I am using the manualPUT command.
3 posts Page 1 of 1