View Full Version : Field Exit in manual Rpg
David Abramowitz
03-25-2002, 03:12 AM
The field exit key is not a function key, and therefore undetectable by an RPG program. You would specify use of the field exit key in DDS, rather than RPG. Dave
Guest.Visitor
03-26-2002, 04:48 AM
Dave, Thanks for the quick response. I specified field exit in the DDS source. I want to relate this action in my RPG program so that I need to execute some routines. Is there any way to do this. Thanks in advance Arun.K.Gopinath.
Guest.Visitor
03-26-2002, 06:36 AM
You can specify CHECK(ER) on the field to have control returned to the program when the user does a field exit. CHECK(ER) presses "ENTER" on a field exit. Chris
kudret
05-25-2007, 02:00 PM
I used to write all my entry programs from subfile, controlling cursor and reading field by field. Once you have template, it's easy and fast entry method. All of my users loved it. I was designing subfiles as close as possible to their papers. So they were typing the data very fast. Since everything became electronic, they don't type anything from a paper anymore, so I don't need to write like this anymore. 1) Use CHECK(ER) keyword in all input fields. 2) Use RTNCSRLOC(&CSRRCD &CSRFLD) and CSRLOC(CSRROW CSRCOL) keywords Then structure is something like this DOW FOREVER EXFMT SCREEN SELECT (function keys) WHEN F3-Exit WHEN Fn-Some function etc.... OTHER (which is ENTER) SELECT (input fields) WHEN CSRFLD = "S1ITEM" (eg. S1ITEM is the name of the 1st field in subfile) IF S1ITEMCHECK (this can be a subroutine too) item check is ok, do whatever you want, for example update item description next to item field and update CSRROW and CSRCOL fields to send the cursor to the next input field ELSE item has problem, do message subfile processing to give an error message, make it reverse S1ITEM field and keep cursor on S1ITEM field by updating CSRROW and CSRCOL field ENDIF WHEN CSRFLD = '2nd field' WHEN CSRFLD = '3rd field' ... ENDSL (for input field) If this is a subfile, after the last field check, update eg. order totals and send the cursor to the next line's first field ENDSL (for function keys) ENDDO (forever loop)
Guest.Visitor
05-30-2007, 11:48 AM
I am having a maintenance program wherein I need to specify field exit for certain fields. While specifying field exit for some particular field I need to execute some subroutines. How do I di this in Manual RPG/ ILE RPG. I wonder if any one could help me out. Thanks in Advance. Arun.K.Gopinath
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.