AS400 SendKeys not sending data to screen

bigeldm

New Member
Joined
Apr 25, 2013
Messages
12
I have a very simple module that connects to AS400 and sends "022" to the screen but the "022" never shows up on the screen when I run this. I know I'm making a connection because the gettext line returns data.

What am I missing? Any help wuld be greatly appreciated. TX

Here is the code
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public autECLSession As Object
Public autECLPS As Object
Public autECLOIA As Object
Sub ObjGetExtra()
Set autECLSession = CreateObject("pcomm.auteclsession")
Set autECLPS = CreateObject("Pcomm.auteclps")
Set autECLOIA = CreateObject("Pcomm.autecloia")
autECLSession.SetConnectionByName ("A")
autECLSession.autECLPS.SetCursorPos 24, 17
autECLSession.autECLPS.SendKeys ("022")
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForInputReady
MsgBox autECLSession.autECLPS.GetText(6, 7, 15)
End Sub
 
I am in the US. Everyone I talk to says this should work so something is very strange. I've tried other forums too but will just keep trying. I'll post what I find out when it gets resolved. Thanks so much for your help.
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi mkvarious:

I have solved this problem in a sense in that I gave up on pcomm and used attachmate instead. I have a question for you though about your as400 sessions that you use. In order to use attachmate I had to create a session.edp file that I use to connect. When I usually connect I use a session.ws file on my desktop (just double click it and it opens). Out of curiosity mostly, are you using a workstation profile (.ws) file when you connect and are running your code above or are you using some other type of session setup?
 
Upvote 0
Ok I was curious because I thought maybe there was an issue with the way we were connecting to as400. I guess that isn't it. Thanks
 
Upvote 0
... which is even more strange as .ws profile is working for us and we do not have to bypass it by any .edp session file.
that makes me think your setup is wrong/blocked in the first place and my call is you should contact the vendor on that.

cheers,
mkvarious
 
Upvote 0
Hello Everyone, I also facing same issue as Excel is not writing text into AS400 screen thought it was able to read the text using PCOMM objects. And more over this issue is system specific. The code is not working on two of the machines where everything is set and installed properly but still having an issue. Can anyone suggest the best solution or workaround for this ?
We tried reinstalling IBM personal communications software as well but still didn't help us.
 
Upvote 0

Forum statistics

Threads
1,221,692
Messages
6,161,327
Members
451,697
Latest member
pedroDH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top