Hi,
I'm trying to send a file using the Ehllapi command "Sendfile". It works but when I want to add option I get the return code 318.
This is the code I wrote:
F = WD_SendFile(1, fichierWindows " H:" pds " ASCII CRLF LRECL(10000)")
the correponding command wrote in the command line is:
IND$FILE PUT DNAPI.NAP.PZTBPAR2.RESULTAT.D020715 ASCII CRLF LRECL(10000)
Does someone knows why this doesn't work?
#Rumba#EHLLAPIVBSENDFILEHi Xavier,
the following code works for me from VBA in Rumba 9.2
Note: My dataset is record lenght is 100.
Private Declare Function WD_ConnectPS Lib "C:\\Program Files (x86)\\Micro Focus\\RUMBA\\System\\EhlApi32.dll" (ByVal hInstance As Integer, ByVal ShortName As String) As Integer
Private Declare Function WD_DisconnectPS Lib "C:\\Program Files (x86)\\Micro Focus\\RUMBA\\System\\EhlApi32.dll" (ByVal hInstance As Integer) As Integer
Private Declare Function WD_SendFile Lib "C:\\Program Files (x86)\\Micro Focus\\RUMBA\\System\\EhlApi32.dll" (ByVal hInstance As Integer, ByVal TransferData As String) As Integer
Sub TestCopy()
RetC = WD_ConnectPS(1, "B")
pds = "'BVTST01.TOM.TEST'"
LocalFileName = "TEST"
RerC = WD_SendFile(1, "C:\\temp\\Test" " B:" pds " ASCII CRLF LRECL(100)")
RetC = WD_DisconnectPS(1)
End Sub
I'm not sure why your code is not working, maybe you have a space somewhere in your PCfile name or path to it, maybe it's failing because you don't have single quotes around your dataset name, which appears to be the case in the command line you gave in your problem description.
Alternatively it may be that the parameters you are passing are indeed incorrect and TSO is rejecting it, if you are manually able to upload a file using this command line then you can rule it out as a problem..
Hi,
I'm trying to send a file using the Ehllapi command "Sendfile". It works but when I want to add option I get the return code 318.
This is the code I wrote:
F = WD_SendFile(1, fichierWindows " H:" pds " ASCII CRLF LRECL(10000)")
the correponding command wrote in the command line is:
IND$FILE PUT DNAPI.NAP.PZTBPAR2.RESULTAT.D020715 ASCII CRLF LRECL(10000)
Does someone knows why this doesn't work?
#Rumba#EHLLAPIVBSENDFILEHi Xavier,
the following code works for me from VBA in Rumba 9.2
Note: My dataset is record lenght is 100.
Private Declare Function WD_ConnectPS Lib "C:\\Program Files (x86)\\Micro Focus\\RUMBA\\System\\EhlApi32.dll" (ByVal hInstance As Integer, ByVal ShortName As String) As Integer
Private Declare Function WD_DisconnectPS Lib "C:\\Program Files (x86)\\Micro Focus\\RUMBA\\System\\EhlApi32.dll" (ByVal hInstance As Integer) As Integer
Private Declare Function WD_SendFile Lib "C:\\Program Files (x86)\\Micro Focus\\RUMBA\\System\\EhlApi32.dll" (ByVal hInstance As Integer, ByVal TransferData As String) As Integer
Sub TestCopy()
RetC = WD_ConnectPS(1, "B")
pds = "'BVTST01.TOM.TEST'"
LocalFileName = "TEST"
RerC = WD_SendFile(1, "C:\\temp\\Test" " B:" pds " ASCII CRLF LRECL(100)")
RetC = WD_DisconnectPS(1)
End Sub
I'm not sure why your code is not working, maybe you have a space somewhere in your PCfile name or path to it, maybe it's failing because you don't have single quotes around your dataset name, which appears to be the case in the command line you gave in your problem description.
Alternatively it may be that the parameters you are passing are indeed incorrect and TSO is rejecting it, if you are manually able to upload a file using this command line then you can rule it out as a problem..
Hi,
I'm trying to send a file using the Ehllapi command "Sendfile". It works but when I want to add option I get the return code 318.
This is the code I wrote:
F = WD_SendFile(1, fichierWindows " H:" pds " ASCII CRLF LRECL(10000)")
the correponding command wrote in the command line is:
IND$FILE PUT DNAPI.NAP.PZTBPAR2.RESULTAT.D020715 ASCII CRLF LRECL(10000)
Does someone knows why this doesn't work?
#Rumba#EHLLAPIVBSENDFILEHi Xavier,
the following code works for me from VBA in Rumba 9.2
Note: My dataset is record lenght is 100.
Private Declare Function WD_ConnectPS Lib "C:\\Program Files (x86)\\Micro Focus\\RUMBA\\System\\EhlApi32.dll" (ByVal hInstance As Integer, ByVal ShortName As String) As Integer
Private Declare Function WD_DisconnectPS Lib "C:\\Program Files (x86)\\Micro Focus\\RUMBA\\System\\EhlApi32.dll" (ByVal hInstance As Integer) As Integer
Private Declare Function WD_SendFile Lib "C:\\Program Files (x86)\\Micro Focus\\RUMBA\\System\\EhlApi32.dll" (ByVal hInstance As Integer, ByVal TransferData As String) As Integer
Sub TestCopy()
RetC = WD_ConnectPS(1, "B")
pds = "'BVTST01.TOM.TEST'"
LocalFileName = "TEST"
RerC = WD_SendFile(1, "C:\\temp\\Test" " B:" pds " ASCII CRLF LRECL(100)")
RetC = WD_DisconnectPS(1)
End Sub
I'm not sure why your code is not working, maybe you have a space somewhere in your PCfile name or path to it, maybe it's failing because you don't have single quotes around your dataset name, which appears to be the case in the command line you gave in your problem description.
Alternatively it may be that the parameters you are passing are indeed incorrect and TSO is rejecting it, if you are manually able to upload a file using this command line then you can rule it out as a problem..