Hi,
I'm trying to use the autECLXfer.ReceiveFile method from a terminal macro (using VB-script). Tried to google for examples and found some shreds.
Created the macro below:
Code:
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=Test view menu
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
REM This line calls the macro subroutine
subSub1_
sub subSub1_()
autECLSession.autECLOIA.WaitForAppAvailable
Dim strFileName, strDataSet, strOptions
strFileName = "Y:\b.MFData\Testxx.txt"
strDataSet = "'DATA.SET(TESTXX)'"
strOptions = "CRLF ASCII NOCLEAR"
On Error Resume Next
autECLSession.autECLXfer.ReceiveFile strFileName, strDataSet, strOptions
If Err <> 0 Then
MsgBox ("FOUT:" & Chr(13) & "(" & Err.Number & "-" & Err.Description & ")")
End If
On Error Goto 0
End Sub
It seems to work (executed on a TSO session using PCOMM, ispf option 6).
However: I do not find my file in the directory that I stated.
... when using the SendFile method, I can send files from the directory towards a dataset...
That strikes me as weird...
Can any of you help me spot the thing I do wrong? It's probably something very simple, but just beyond my reach...
By the way: I want to use VB-variables in the call, so I can use it more flexibly...
Thanks in advance!
[/u]
_________________
That's All Folks,
Harald van Kesteren
Read more: http://ibmmainframes.com/viewtopic.php? ... z4e85ljwUm