iSeries Access PC5250 keyboard does not have the Hex key that the old 5250 keyboard did. Assign this script to...
a key to get this function back.
To create the script, go to Edit->Preferences->Macro/Script... in the emulator. Click on the Customize button. Then go to File->New->VB Script. Paste the code below into the edit window and save it. I call it HEX.MAC.
Now go to the keyboard mapping editor of PC5250 and assign this macro to a key combination like Shift-Ctrl-X.
If you want to be able to enter display attributes, change the lower limit to 32 (x20) as needed.
LANGUAGE=VBSCRIPT [PCOMM SCRIPT HEADER] LANGUAGE = VBSCRIPT DESCRIPTION=Hex input [PCOMM SCRIPT SOURCE] Option Explicit Dim input_value, hex_value autECLSession.SetConnectionByName (ThisSessionName) subHex_ Sub subHex_() input_value = InputBox("Enter a decimal number between 64 and 254, or a hex value between x40 and xFE (either uppercase or lowercase") If input_value = "" Then MsgBox ("invalid input") Exit Sub ElseIf (IsNumeric(input_value) Or _ (Len(Trim(input_value)) = 3 And _ UCase(Left(input_value, 1)) = "X") And _ IsNumeric("&H" & Mid(input_value, 2, 2))) Then If (UCase(Left(input_value, 1)) = "X") Then input_value = "&h" & Mid(input_value, 2, 2) End If If (input_value >= 64 And input_value <= 254) Then hex_value = Hex(input_value) Else MsgBox ("value '" & input_value & "' out of range") Exit Sub End If Else MsgBox ("non numeric input '" & input_value & "'") Exit Sub End If autECLMacro "apl " & Hex(input_value) End Sub
MORE INFORMATION ON THIS TOPIC
The Best Web Links: Tips, tutorials and more.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
Read this Search400.com Featured Topic: Monitoring your iSeries system .
Ask the Experts yourself: Our systems management gurus are waiting to answer your technical questions.