IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Receive a file using PCOMM macro


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Harald.v.K

New User


Joined: 08 May 2009
Posts: 7
Location: Netherlands

PostPosted: Thu Mar 23, 2017 6:50 pm
Reply with quote

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]
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 7
No new posts SDUMPX macro fails to dump requested ... PL/I & Assembler 5
No new posts how to eliminate null indicator value... DB2 7
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Access to macro definitions PL/I & Assembler 4
Search our Forums:

Back to Top