How to use a string in a sendkeys statement?



Post anything related to mainframes (IBM & UNISYS) if not fit in any of the above categories

How to use a string in a sendkeys statement?

Postby PuddinPie » Tue Jan 08, 2013 12:47 am

Hello,

I'm trying to DIM out a string variable and then use it in a send keys.
I can't seem to get he syntax correct for the sendkeys using the AccountMSCD variable.

For example:
DIM AccountMSCD as string
'Getting a variable from PComm using VBA.
    AccountMSCD = objECLPS.GetText(7, 36, 6)
‘Trying to send that string but I can't get the syntax correct.
    objECLPS.SendKeys = (AccountMSCD, 6, 16)


Thank you.
PuddinPie
 
Posts: 20
Joined: Wed Sep 15, 2010 1:51 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to use a string in a sendkeys statement?

Postby nareshv_99 » Tue Jan 08, 2013 1:24 pm

Hello,

use objECLPS.SendKeys(AccountMSCD, 6, 16). I think this should work.
nareshv_99
 
Posts: 17
Joined: Sat Feb 18, 2012 3:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to use a string in a sendkeys statement?

Postby PuddinPie » Tue Jan 08, 2013 7:45 pm

It did not work. It's erroring saying that it's expecting "=" and adding the "=" does not work either.
PuddinPie
 
Posts: 20
Joined: Wed Sep 15, 2010 1:51 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to use a string in a sendkeys statement?

Postby BillyBoyo » Tue Jan 08, 2013 7:50 pm

You have to post the full details of any messages and show the exact statement you used.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: How to use a string in a sendkeys statement?

Postby nareshv_99 » Tue Jan 08, 2013 8:12 pm

I use below code to interact Excel with Mainframe

Sample given below:

Set autECLConnMgrObj = CreateObject("PCOMM.autECLConnMgr")
Set autECLOIAObj = CreateObject("PCOMM.autECLOIA")
Set autECLSessionObj = CreateObject("PCOMM.autECLSession")
Set autECLPSObj = CreateObject("PCOMM.autECLPS")
autECLOIAObj.SetConnectionByName ("A")
autECLPSObj.SendKeys ("abcd")

and it works for me.. check if you are using correct Object to call SendKeys
nareshv_99
 
Posts: 17
Joined: Sat Feb 18, 2012 3:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to use a string in a sendkeys statement?

Postby NicC » Wed Jan 09, 2013 2:32 am

Looks to me like this is NOT mainframe topic but a PC topic, in particular Excel. Just because you are going to send the file to the mainframe does not make it a topic for a mainframe forum. Find an Excel forum.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: How to use a string in a sendkeys statement?

Postby Ed Goodman » Wed Jan 09, 2013 7:20 pm

Nic,

I vote for giving this some leeway because it's a terminal emulator issue. The idea of using PC tools to work with mainframe tech seems to be at least somewhat relevant.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: How to use a string in a sendkeys statement?

Postby dick scherrer » Wed Jan 09, 2013 8:31 pm

Hello,

And there is more of this kind of "overlap" coming rather than less . . . ;)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to All other Mainframe Topics

 


  • Related topics
    Replies
    Views
    Last post