Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Receive a file using PCOMM macro

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
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    Post subject: Receive a file using PCOMM macro
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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us