AS400 Mid Range/AS400 emulator keyboard

Advertisement


Question
Hi there.

Hope someone can help me. In a normal dspf if you have a numeric input/output field defined when you press the "-" key on the keypad it registers a minus sign in the input/output field in your emulator. If you press the "-" on the main pad it registers a dash in your i/o field. The minus on the keypad makes the value entered negative but the dash entered is ignored when passed to my program. Is there some way to determine which one of these keys were pressed? If you look at the keyboard map for the emulator it defaults the "-" on the keypad as [field-] and the "-" on the mainpad as "-". I cannot go and change every keyboard map as the dash key is a valid key.

So as far as the user sees on the input screen he typed for eg -245 but my program gets either -245 or 245 depending on which "-" key was pressed.

Thanks in advance

Answer
The - key on the keyboard pad in most emulation software represents a "FIELD MINUS" key.  The user keys a number and presses FIELD MINUS to make the number negative and right-justify it in the field. This is a counterpart to the FIELD PLUS KEY or the FIELD EXIT key on a 5250 keyboard.

The dash (-), when keyed as the right-most character of numbers in a numeric field [example: 1234-] also makes the number negative. This can be confusing, since in a PC or network environment, the dash leads a negative field, not follows it. A dash in the left-most position of a numeric field has no effect.

- Laird  

AS400 Mid Range

All Answers


Answers by Expert:


Ask Experts

Volunteer


Concise Systems/Laird Scranton

Expertise

General AS/400, RPG/400, SDA and CL programming questions. AS/400 performance tuning.

Experience


Past/Present clients
CB Sportswear
Coca-Cola of New York
Encore Paper Company
Golub Corporation
HBO Home Video
Imperial Pools
Kaiser Permanente of NE New York
Mallinckrodt Medical
Marigold Foods
Manpower & Associates
National Datacomputers
New York State Easter Seals Society
New York State Food Merchants Association
Pepsi-Cola Allied Bottlers
Petricca Construction
Taconic Telephone Corporation
TOMRA Recycling
Unistress Corporation

©2012 About.com, a part of The New York Times Company. All rights reserved.