895 pts.
 CF03, CF12 doesnt work
hi can you please help me...why CF12 and CF03 are not working in my display file.

file is -

A*%%EC                                                        A                                      DSPSIZ(24 80 *DS3)     A                                      INDARA                 A          R ORDER                                            A*%%TS  SD  20090825  13321843       REL-V5R4M0  2225722-WDS A  03                                  CF03(03 'Exit')        A  04                                  CF04(04 'Prompt')      A  12                                  CF12(12 'Previous')    A                                      RTNCSRLOC (&v1, &v2)  A                                      CSRLOC(ROW        COL) A            @REC          10A  H                             A            @FLD          10A  H      

 

program code is

// DISPLAY SCREEN               DOU Exit = Yes;                  Exfmt order;                                              Select;                //F3=Exit                          When (*IN03 or *in12);             Exit = Yes;                            



Software/Hardware used:
ASKED: August 25, 2009  5:27 PM
UPDATED: September 1, 2009  6:17 PM

Answer Wiki:
With this statement: A 03 CF03(03 'Exit') The only way CF03 is available is if Indicator 03 is on. Remove the 03 (and others) from positions 8-9 of your specs ________________________________________ Actually, the use of the 03 in positions 8-9 may be what is desired in the program. The reason the *in03 and *in12 do not work is the INDARA keyword in the DSPF. When you use the INDARA keyword in the display file, you must use the INDDS keyword in the RPGLE program. <pre> fdisplay cf e workstn indds(ind_display) d ind_display ds 99 d ind_exit n overlay(ind_display:3) d ind_cancel n overlay(ind_display:12) c dou ind_exit or ind_cancel </pre> ///////////////////////// INDARA does not require INDDS, we never use INDDS and always use INDARA in our DSPF and it works fine. INDARA just tell to compiler that all indicators used in a DPSF uses a separate area from input/output buffer. If it's not used each indicator occupies one byte on buffers (depending if the indicator is conditional or result). The error is probably due to what is answered in first place. Indicators 03 and 04 are conditioning the operation of keys. We don´t have enough code to confirm that... Regards, Wilson
Last Wiki Answer Submitted:  August 31, 2009  4:22 pm  by  BigKat   7,185 pts.
All Answer Wiki Contributors:  BigKat   7,185 pts. , CharlieBrowne   32,915 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

For that matter, get rid of the indicator in the function key keyword entirely. Either use the indicator defined for the function key (*INKA, *INKB, etc.) or use the value returned in the display file infds in pos. 369 – 369 (I prefer the latter).

The infds return values (the ones I know about) are as follows:

D F1              C                   const(x'31')
D F2              C                   const(x'32')
D F3              C                   const(x'33')
D F4              C                   const(x'34')
D F5              C                   const(x'35')
D F6              C                   const(x'36')
D F7              C                   const(x'37')
D F8              C                   const(x'38')
D F9              C                   const(x'39')
D F10             C                   const(x'3A')
D F11             C                   const(x'3B')
D F12             C                   const(x'3C')
                                                  
D F13             C                   const(x'B1')
D F14             C                   const(x'B2')
D F15             C                   const(x'B3')
D F16             C                   const(x'B4')
D F17             C                   const(x'B5')
D F18             C                   const(x'B6')
D F19             C                   const(x'B7')
D F20             C                   const(x'B8')
D F21             C                   const(x'B9')
D F22             C                   const(x'BA')
D F23             C                   const(x'BB')
D F24             C                   const(x'BC')
                                                  
D Clear           C                   const(x'BD')
D Enter           C                   const(x'F1')
D Help            C                   const(x'F3')
D Roll_down       C                   const(x'F4')
D Page_up         C                   const(x'F4')
D Roll_up         C                   const(x'F5')
D Page_down       C                   const(x'F5')
D Print           C                   const(x'F6')
D Home            C                   const(x'F8')
D Auto_enter      C                   const(x'3F')
 5,670 pts.

 

If you’re not one to remember all the Hex Codes, and want a simple way to do it, here’s what you do.
(I only used free form code at the bottom for example purposes only)
*======================================================================*
FINDARADF CF E WORKSTN INDDS(INDICATORS) DISPLAY FILE
*————————————————————————————————————————–*
D INDICATORS DS
D F1Help N OVERLAY(INDICATORS:1)
D F2MoreInfo N OVERLAY(INDICATORS:2)
D F3Exit N OVERLAY(INDICATORS:3)
D F4Prompt N OVERLAY(INDICATORS:4)
D F5Refresh N OVERLAY(INDICATORS:5)
D F6NewRequest N OVERLAY(INDICATORS:6)
D F10Submit N OVERLAY(INDICATORS:10)
D F24Cancel N OVERLAY(INDICATORS:24)
*======================================================================*
DOW NOT F3EXIT;
EXFMT #INDARA;
CLEAR *IN;

SELECT;
WHEN F6NewRequest;
F6_DESC = ‘DENIED REQ’;

WHEN F10Submit;
F10_DESC = ‘SUBMITTED’;

WHEN F24Cancel;
F24_DESC = ‘CANCELLED’;
ENDSL;

ENDDO;

*INLR = *ON;
*======================================================================*

 685 pts.

 

Wilson,

I stand corrected — sit actually :)

I was passing along (incorrect) information that had been taught to me!

The RPGLE Guide (i6.1) for the INDDS keyword says “If this keyword is not specified, the *IN array is used to communicate indicator values for all files defined with the DDS keyword INDARA.”

 7,185 pts.