Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: PutFiles (SFTP) to mainframe dataset

Please post session log files both from GUI and the code.
mvannie9

PutFiles (SFTP) to mainframe dataset

Good day.

I am able to put a file on a mainframe with the interface.
The output is a dataset.

Generated code is this:
using (Session session = new Session())
{
    session.Open(sessionOptions);
    session.PutFiles(@"C:\temp\New Text Document.txt", "/FTADV:P=WIN,lrecl=160,recfm=fb/*").Check();
}

This is the remote location I put in to put the file:
/FTADV:P=WIN,lrecl=160,recfm=fb/___SS.APP.TEST.SOLMIS.CIF856

(As per the attachment.)

It works 100% with the GUI.
When trying the API, it puts the dataset on the default folder when using the API and not the actual dataset.
(Hope this makes sense.)

If someone can push me in the correct direction to configure the API to upload the local (Windows) file as a dataset on a mainframe?

Thank you
Mike