Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. FTP put file doesn't work with Mainframe

FTP put file doesn't work with Mainframe

Scheduled Pinned Locked Moved COM
comsysadminhelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rahman Mahmoodi
    wrote on last edited by
    #1

    hello guys, I am having a VB6 COM FTP application that is being called by some VBScript. It works perfectly fine in Windows based ftp server. However, one of the client is trying to use it in IBM Mainframe box (don't know the version yet) but it doesn't work. connection to mainframe occurs ok however when trying to put the file to mainframe it doesn't work. The vb6 code is as below: In an ideal windows ftp environment I call it as: myFTP.PutRemoteFile("c:\test.txt", "", "/MyFTPFoder") and it works fine. However, the client has some funny naming convension of their mainframe file system. eg RemoteFolder is as F1.Test.ASL.Mne.FTS (they call it dataset)etc. my questions are: Is it a valid naming convension for the mainframe eg F1.Test.ASL.Mne.FTS?? or it needs to be mapped to a physical drive? Is there any reason the ftp shouldn't work in mainframe while working in windows? Thx Public Function PutRemoteFile(LocalFilename, RemoteFilename, RemoteFolder) As Boolean On Error GoTo handler Dim bRet As Boolean PutRemoteFile = False LocalFilename = Trim$(LocalFilename) RemoteFilename = Trim$(RemoteFilename) RemoteFolder = CStr(Trim(RemoteFolder)) ''''set the directory as per user's input and check if there is no error. If error returns false. If FtpSetCurrentDirectory(hConnection, RemoteFolder) = False Then Err.Raise vbObjectError, TypeName(Me), "Directory doesn't exist in Remote folder : " & ExtendedError(Err.LastDllError) PutRemoteFile = False Exit Function End If 'Is the local file set? If LocalFilename = "" Then Err.Raise vbObjectError, TypeName(Me), "LocalFilename is blank - it must refer to a valid local file" End If 'Does the local file actually exist? If (Not FS.FileExists(LocalFilename)) Then Err.Raise vbObjectError, TypeName(Me), "LocalFilename '" & LocalFilename & "' does not exist or the user context does not have read-access" End If 'Are we connected? If (Not Me.FTPServerIsOpen) Then Err.Raise vbObjectError, TypeName(Me), "Must call OpenFTPServer first" End If 'If it ends in \ then we assume the caller wants to use the same filename as the RemoteFilename RemoteFilename = Trim$(RemoteFilename) '''If remote file name doesn't exist assuming it will be same as local! If RemoteFilename = "" Then RemoteFilename = FS.GetFileName(LocalFilename) End If 'Some/most f

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups