Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts exec macro in the end of edit anatol CLIST & REXX 8 Fri Sep 22, 2017 5:10 am
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts How to Run Rexx Macro? Kalaivignesh CLIST & REXX 5 Fri Sep 01, 2017 9:08 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us