Home Forums ActiveX components Xceed FTP for ActiveX Append to datasets

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #42625 |

    How do I append a file to a dataset on a mainframe computer? Here is the mail I sent to Xceed, I thought that I just as well could post it here in the forum aswell. Thanks! /Mikael

    When I do the following in a DOS window it works just fine:
    C:\>ftp 10.100.242.1
    Connected to sto1.ica.se.
    220-FTPD1 IBM FTP CS V2R10 at STO1.ICA.SE, 08:12:33 on 2003-10-07.
    220 Connection will close if idle for more than 5 minutes.
    User (sto1.ica.se:(none)): XXXX
    331 Send password please.
    Password:
    230 XXXX is logged on. Working directory is “XXXX.”.
    ftp> appe
    Local file ftpmainframe.txt
    Remote file ‘ICA2.BP1010.HOR.TEST.FTP’
    200 Port request OK.
    125 Appending to data set ICA2.BP1010.HOR.TEST.FTP
    250 Transfer completed successfully.
    ftp: 46 bytes sent in 0,00Seconds 46000,00Kbytes/sec.
    ftp> bye
    221 Quit command received. Goodbye.
    C:\>

    My question is how to accomplish the same thing with xceed ftp library. This code (C#) will result in an error:
    XceedFtpLib.XceedFtp objFtp = new XceedFtpLib.XceedFtpClass();
    objFtp.License(strFTPLicenseKey);
    objFtp.ServerAddress = “10.100.242.1”;
    objFtp.UserName = “XXX”;
    objFtp.Password = “XXX”;
    objFtp.Connect(); // Connect works without problems

    // However, this command doesnt work
    objFtp.SendFile(“ftpmainframe.txt”, 0, “‘ICA2.BP1010.HOR.TEST.FTP'”, true);

    I have also tried setting the following parameters to different values:
    objFtp.PassiveMode = true;
    objFtp.AllocateStorage = true;
    objFtp.RepresentationType = XceedFtpLib.EXFRepresentationType.frtBinary;
    objFtp.AccountName = strFTPUserName;
    But the error returned is always:
    ?ee
    {“The remote file could not be opened by the FTP server.
    ” }
    [System.Runtime.InteropServices.COMException]: {System.Runtime.InteropServices.COMException}
    System.Object: {System.Runtime.InteropServices.COMException}
    _COMPlusExceptionCode: -532459699
    _className: null
    _exceptionMethod: null
    _exceptionMethodString: null
    _message: “The remote file could not be opened by the FTP server.

    _innerException: null
    _helpURL: null
    _stackTrace: {System.Array}
    _stackTraceString: null
    _remoteStackTraceString: null
    _remoteStackIndex: 0
    _HResult: -2147213293
    _source: “XceedSoftware.XceedFtp.1”
    _xptrs: 0
    _xcode: -532459699
    Message: “The remote file could not be opened by the FTP server.

    InnerException: null
    TargetSite: {System.Reflection.RuntimeMethodInfo}
    StackTrace: ” at XceedFtpLib.XceedFtpClass.SendFile(String sLocalFilename, Int32 lLocalOffset, String sRemoteFilename, Boolean bAppend)
    at CareFTPService.CareFTPService.SendFile(String strFileFullName, String strOrigFileFullName, String strFTPAddress, String strFTPRemoteDirectory, String strFTPUserName, String strFTPPassword, String strFTPDataset, Boolean bolFTPAppend, Boolean bolFTPSendOK, Boolean bolFTPCompressFile) in e:\projekt\care\clearbox\dev\careftpservice\ftpservice.cs:line 257″
    HelpLink: “”
    Source: “XceedSoftware.XceedFtp.1”
    HResult: -2147213293

    Your help is appreciated!

    Regards,

    Mikael Dahlberg

    Imported from legacy forums. Posted by Mikael (had 6807 views)

    User (Old forums)
    Member
    Post count: 23064

    The ftp server is an OS390 MVS if that helps. Can it be that XceedFTP isn’t compatible with this server? If so, is there a workaround for sending a file using send commands?

    Thanks,
    Mikael

    Imported from legacy forums. Posted by Mikael (had 503 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks for the great support, all questions answeard by mail within a couple of hours!

    /Mikael

    Imported from legacy forums. Posted by Mikael (had 552 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Mikael,

    Thank you for the comments ! 🙂 I hope to get you back on track shortly !

    Cheers (h)

    Imported from legacy forums. Posted by Matt (had 560 views)

    User (Old forums)
    Member
    Post count: 23064

    Out of curiosity, I’m wondering if there ever was a resolution to this old dog?

    Currently we’re FTPing to a secondary layer just so we can apply sequence numbers to our files to “append” them before using Xceed FTP to send them as one file to the mainframe. It’s been too much work and wondering if it’s ever been resolved…

    Lemme know, thanks,
    Al.

    Imported from legacy forums. Posted by Alan (had 5716 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.