IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

VB Macro - Get and Put String from/to excel with PCOM


IBM Mainframe Forums -> FAQ & Basics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
PANIGRAHI,DEVA

New User


Joined: 20 Aug 2012
Posts: 3
Location: India

PostPosted: Mon Aug 27, 2012 2:40 pm
Reply with quote

Hello Everyone,
I am writing a VB Script macro in an Excel to connect and get data from IBM Personal Communication Emulator.
As of now i'm able to establish connection between Excel and PCOMM, however unable to receive and send text strings from/to excel. Below is the piece of code I have tried -

Sub deva()
Dim PSObj As Object
Dim autECLConnList As Object
Dim PSText As String
Set autECLConnList = CreateObject("PCOMM.autECLConnList")
Set PSObj = CreateObject("PCOMM.autECLPS")
autECLConnList.Refresh
PSObj.SetConnectionByHandle (autECLConnList(2).Handle)
X = PSObj.StartCommunication()
PSText = PSObj.GetText(1, 1, 80)
MsgBox "PsText -" & PSText
End Sub

Please suggest the issue with the above code.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Aug 29, 2013 7:04 pm
Reply with quote

I love this!

How do you know you are successfully connecting? Are you checking the value of X after the StartCom command?

Do you have two windows open? (Why are you using the second handle?)

The connection list might be zero based.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> FAQ & Basics

 


Similar Topics
Topic Forum Replies
No new posts Cobol code- to find a string in a str... COBOL Programming 3
No new posts passing stem variable with VPUT/VGET ... CLIST & REXX 6
No new posts How to replace a string dynamically i... CLIST & REXX 16
No new posts Control M features to check string in... Compuware & Other Tools 1
No new posts Need to split single line into two li... DFSORT/ICETOOL 7
Search our Forums:

Back to Top