PCOMMS VBScript - Upload to Dataset

Ask queries about other IBM Tools like Tivoli, COBTEST, Fault Analyzer, z/OS File Manager, Workload Simulator, APA, SCLM, Merge & Migration Tools etc...
redcliffe
Posts: 2
Joined: Tue Jan 28, 2014 4:54 am
Skillset: VBScript automation
Referer: Google

PCOMMS VBScript - Upload to Dataset

Postby redcliffe » Tue Jan 28, 2014 5:03 am

Hi,

I'm trying to build a VBScript macro for IBM Personal Communications that will automatically allocate a dataset and upload an xml file to that dataset. I've already successfully got the dataset allocation working and getting it to the ISPF command shell, but the final step, the actually upload fails. It looks like the system if sending data as text to the command line then it tries to edit a protected field. The progress status window appears but never progresses beyond 0%.

When I do the upload manually(which works), the settings are:

Under MVS /TSO in file transfer settings, ASCII and CRLF are checked, record format is set to variable.

Here's my code to do the upload:

[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

autECLSession.autECLOIA.WaitForInputReady

' Create File Transfer Object
Dim objXfer
Set objXfer = CreateObject("PCOMM.autECLXfer")

' Initialize the Connection
objXfer.SetConnectionByName(ThisSessionName)

' Confirm that connection is ready to send
If objXfer.Ready = False Then

' Unable to transfer
msgbox "Not ready to submit file!"
Exit Sub

Else

objXfer.SendFile "C:\Users\Public\Temp\upload.xml", "TCELL.MYDATA.XML.UPLOAD.G0038V00", "CRLF ASCII"

end if

end sub

I've not been able to figure out how to properly put the Record Format in as a parameter. I have tried RECFM V, as it seemed to be indicated in the manuals online, but it didn't make a difference. The IBM PCOMM Class reference says to consult the programming guide, but the programming guide doesn't elaborate on how to configure this. Could anyone give me some suggestions on how to proceed? Thanks,

David

redcliffe
Posts: 2
Joined: Tue Jan 28, 2014 4:54 am
Skillset: VBScript automation
Referer: Google

Re: PCOMMS VBScript - Upload to Dataset

Postby redcliffe » Tue Jan 28, 2014 11:25 am

I ended up solving it. I managed to find the answer as part of this page: http://publib.boulder.ibm.com/infocente ... ence14.htm

The expression required for uploads to MVS/TSO via the Command Shell was:

objXfer.SendFile "C:\Users\Public\Temp\upload.xml", strDsName, "CRLF ASCII RECFM(V) NOCLEAR"

The NOCLEAR attribute was the big one I was missing. Thanks,

David

User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am

Re: PCOMMS VBScript - Upload to Dataset

Postby dick scherrer » Tue Jan 28, 2014 7:50 pm

Hello and welcome to the forum,

Good to hear it is working and thank you for posting your solution :)

d


  • Similar Topics
    Replies
    Views
    Last post