× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



There is an Hexadecimal value associated with the enter key. The hexadecimal 
value for the enter key is X'F1'. On your display file information data 
structure (INFDS), POSITION 369 to 369, you need to define an alpha field. That 
field will tell you which key has been pressed. You need to define as a 
constant the name of the enter key that you are going to use.

Example:

  * Display File                                  
 FTEST01    CF   E             Workstn InfdS(DSPDS)

 D #ENTER           C              CONST(X'F1')

* Display information data Structure
 D DSPDS        SDS  
 D  @FKEY                   369      369

   IN YOUR LOGIC, you will say;

           If @FKEY = #ENTER

              

 

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On 
Behalf Of M.Effenberg@xxxxxxxxxxxx
Sent: Thursday, September 01, 2005 5:10 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: when user presses ENTER key in Display screen How to detect it in 
an RPG program?

> My problem is because of the lack any such indicator associated with the 
ENTER
> Key .In the program I need to figure out using a single IF condition 
whether user
> Has pressed the ENTER key.

Hi Shijith,
i'm not that pro then it comes to interactive programs, but in our 
displayfiles we define a valid command key.

VLDCMDKEY(26 'return') 
on filelevel.

I guess then you could do a 
if *in26=*on

This should be true if the user just hits enter.
If the user presses F1 to leave the display *in26 shouldn't be *on.

greets,
 Martin


----------------------------------------------------------------------------------
Offergeld Zentralverwaltung GmbH & Co. KG
IT-Anwendungsentwicklung
Grüner Weg 1-3
52146 Würselen/ Deutschland

Tel.:  +49 2405-456-267
Fax:  +49 2405-456-285
eMail: m.effenberg@xxxxxxxxxxxx
http://www.offergeld.de




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.