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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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