Page 1 of 1

sFTP and site command to MVS

Posted: Mon Sep 15, 2014 8:27 am
by Harold76
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.

Re: sFTP and site command to MVS

Posted: Wed Oct 01, 2014 12:00 pm
by Support_Rick
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.

Re: sFTP and site command to MVS

Posted: Thu Oct 02, 2014 12:28 pm
by Harold76
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.