FTP put file doesn't work with Mainframe
-
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