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 ISREDIT Macro is not returning back t... nico_neoz CLIST & REXX 11 Sat Nov 18, 2017 7:40 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm

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