SendKeyFromText PF24 Issue

Topics: Developer Forum
Feb 19, 2007 at 9:21 PM
I'll start with the standard, Thank you very much for this library Mike. It's very powerful and easy to use. I would love to talk to you about helping port it to linux so it can play nice with PHP5 and the like. Anyway that's another discussion.

I'm trying to issue a PF24 and the library has no problems, sends the command, but the mainframe is returning a 'Invalid Key Pressed' I've manually navigated to this screen using a CICS client and it does indeed accept the PF24 command. I'm not sure how to proceed past this and I am unable to download the source.

Thanks for your time,

Dan

PS Let me know your thoughts on
Feb 20, 2007 at 8:19 PM
Edited Feb 20, 2007 at 8:21 PM
I am having similar issues attempting to send PF11, PF12 or PF3. Please advise.
Mar 2, 2007 at 3:15 AM
We're having similar issues trying to send PF11 - PF15. They're not performing the intended actions when sent via the terminal emulator. Is there a way to change the keyboard mapping? Is this even necessary? Any input would be appreciated.
Mar 2, 2007 at 4:23 PM
I figured out how to send PF11 - PF15 key commands. I found what I consider to be a small issue within the TNEmulator.cs module.

In the TNEmulator.cs module, the program recognizes that a PF key was invoked, and proceeds to send the corresponding PF number that was sent along with it - only the program is only taking the 4th position of the PF command, not the whole 2-digit number.

For instance, if you send a "PF03" command, the program will submit a "PF3" command. However, if you sent "PF14" command, his program will only send "PF4". It ignores the preceding "1". Take a look:

if (text.Substring(0,2)=="PF")
{
submit = this.currentConnection.KeyboardCommandCausesSubmit("PF", System.Convert.ToInt32(text.Substring(3)));
}

if (text.Substring(0,2)=="PF")
{
ok = this.currentConnection.ExecuteAction(submit, "PF", System.Convert.ToInt32(text.Substring(3)));
}

I substituted "text.Substring(3)" with "text.Substring(2,2)", recompiled, and it worked as expected.
Mar 2, 2007 at 9:36 PM
Don't forget to also update the code for the "PA" commands:

else if (text.Substring(0,2)=="PA")
{
submit = this.currentConnection.KeyboardCommandCausesSubmit("PA", System.Convert.ToInt32(text.Substring(2,2)));
}


else if (text.Substring(0,2)=="PA")
{
ok = this.currentConnection.ExecuteAction(submit, "PA", System.Convert.ToInt32(text.Substring(2,2)));
}

Mar 2, 2007 at 9:41 PM
I was going to Post this as well. I found the day before. Thanks