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
PCOMMS VBScript - Upload to Dataset
Re: PCOMMS VBScript - Upload to Dataset
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
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
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: PCOMMS VBScript - Upload to Dataset
Hello and welcome to the forum,
Good to hear it is working and thank you for posting your solution
d
Good to hear it is working and thank you for posting your solution

d
-
- Similar Topics
- Replies
- Views
- Last post
-
- 12
- 3926
-
by RalphEagle
View the latest post
Fri Jul 30, 2021 1:00 pm
-
- 2
- 2749
-
by willy jensen
View the latest post
Sat Mar 04, 2023 12:41 pm
-
- 3
- 2708
-
by sergeyken
View the latest post
Sat Nov 16, 2024 11:05 pm
-
-
SMTPNOTE - can a font be specified for a dataset?
by Proddish2348 » Sat Jul 01, 2023 5:31 am » in Operating Systems - 0
- 4245
-
by Proddish2348
View the latest post
Sat Jul 01, 2023 5:31 am
-
-
- 1
- 1262
-
by sergeyken
View the latest post
Wed Feb 07, 2024 11:48 pm