|
Hello, If you don't want to use indicator why not use program-to-system-field parameter like this. DDS Reference: Display Files Version 5. DSPATR (Display Attribute) keyword for display files The format for the keyword is one of the following: DSPATR(attribute-1 [attribute-2 [attribute-3 [...]]]) or DSPATR(&program-to-system-field); The program-to-system-field parameter is required and specifies that the named field must be defined in the record format, alphanumeric (A in position 35), length of one, and usage P (P in position 38). The program uses this P-field to set the display attribute for the field this DSPATR keyword applies to. Example 3: The following example shows how to specify the DSPATR keyword with P-field usage: A R RECORD 2DSPATR(&PFLD1); A FLD1 5A 2 6DSPATR(&PFLD2); A FLD2 5A 2 6DSPATR(&PFLD2); A PFLD1 1A P A PFLD2 1A P A A INDARA A CA03(03 'EXIT') A R GCO104001 A ATTR_FIELD 1A P A ATTR_CPR 1A P A E07CPR R B 5 20REFFLD(B07CPR *LIBL/GCB07P01) A DSPATR(&ATTR_CPR) A LIBCPR15 15A O 5 28COLOR(WHT) A E07ENS R B 6 20REFFLD(B07ENS *LIBL/GCB07P01) A DSPATR(&ATTR_FIELD) A LIBENS 30A O 6 28COLOR(WHT) A 23 2'F3=Exit' A COLOR(BLU) FYAN1040FM CF E WORKSTN INDDS(DS_IND) D* ----- D True C *ON D False C *OFF D* ----- D ND C CONST( X'27' ) D PR_ND C CONST( X'A7' ) D Normal C CONST( X'20' ) D PR_Normal C CONST( X'A0' ) D RI C CONST( X'21' ) D PR_RI C CONST( X'A1' ) D HI C CONST( X'22' ) D HI_RI C CONST( X'23' ) D PR_HI C CONST( X'A2' ) D PR_HI_RI C CONST( X'A3' ) D UL C CONST( X'24' ) D UL_RI C CONST( X'25' ) D UL_HI C CONST( X'26' ) D PR_UL C CONST( X'A4' ) D PR_UL_RI C CONST( X'A5' ) D PR_UL_HI C CONST( X'A6' ) D BL C CONST( X'28' ) D BL_RI C CONST( X'29' ) D BL_HI C CONST( X'2A' ) D BL_HI_RI C CONST( X'2B' ) D BL_UL C CONST( X'2C' ) D BL_UL_RI C CONST( X'2D' ) D BL_UL_HI C CONST( X'2E' ) D PR_BL C CONST( X'A8' ) D PR_BL_RI C CONST( X'A9' ) D PR_BL_HI C CONST( X'AA' ) D PR_BL_HI_RI C CONST( X'AB' ) D PR_BL_UL C CONST( X'AC' ) D PR_BL_UL_RI C CONST( X'AD' ) D PR_BL_UL_HI C CONST( X'AE' ) *** COLORS *** D White C CONST( X'22' ) D White_UL C CONST( X'26' ) D White_RI C CONST( X'23' ) D White_RI_CS C CONST( X'33' ) D PR_White C CONST( X'A2' ) D PR_White_UL C CONST( X'A6' ) D PR_White_RI C CONST( X'A3' ) D PR_White_RI_CS C CONST( X'B3' ) D Green C CONST( X'20' ) D Green_RI C CONST( X'21' ) D Green_UL C CONST( X'24' ) D Green_UL_RI C CONST( X'25' ) D PR_Green C CONST( X'A0' ) D PR_Green_RI C CONST( X'A1' ) D PR_Green_UL C CONST( X'A4' ) D PR_Green_UL_RI C CONST( X'A5' ) D Red C CONST( X'28' ) D Red_RI C CONST( X'29' ) D Red_HI C CONST( X'2A' ) D Red_HI_RI C CONST( X'2B' ) D Red_UL C CONST( X'2C' ) D Red_UL_RI C CONST( X'2D' ) D Red_UL_BL C CONST( X'2E' ) D PR_Red C CONST( X'A8' ) D PR_Red_RI C CONST( X'A9' ) D PR_Red_HI C CONST( X'AA' ) D PR_Red_HI_RI C CONST( X'AB' ) D PR_Red_UL C CONST( X'AC' ) D PR_Red_UL_RI C CONST( X'AD' ) D PR_Red_UL_BL C CONST( X'AE' ) D Turq_CS C CONST( X'30' ) D Turq_CS_RI C CONST( X'31' ) D Turq_UL_CS C CONST( X'34' ) D Turq_UL_RI_CS C CONST( X'35' ) D PR_Turq_CS C CONST( X'B0' ) D PR_Turq_CS_RI C CONST( X'B1' ) D PR_Turq_CS_UL C CONST( X'B4' ) D PR_Turq_CSULRI C CONST( X'B5' ) D Yellow_CS C CONST( X'32' ) D Yellow_CS_UL C CONST( X'36' ) D PR_Yellow_CS C CONST( X'B2' ) D PR_Yellow_CSUL C CONST( X'B6' ) D Pink C CONST( X'38' ) D Pink_RI C CONST( X'39' ) D Pink_UL C CONST( X'3C' ) D Pink_UL_RI C CONST( X'3D' ) D PR_Pink C CONST( X'B8' ) D PR_Pink_RI C CONST( X'B9' ) D PR_Pink_UL C CONST( X'BC' ) D PR_Pink_UL_RI C CONST( X'BD' ) D Blue C CONST( X'3A' ) D Blue_RI C CONST( X'3B' ) D Blue_UL C CONST( X'3E' ) D PR_Blue C CONST( X'BA' ) D PR_Blue_RI C CONST( X'BB' ) D PR_Blue_UL C CONST( X'BE' ) D* --------- Redéfini Les Indicateurs Du Fichier. DDS_IND DS D* --------- Indicateur Fichier Ecran (Touche Fonction) D F03Exit 3 3N D F04Recherche 4 4N D F05Validation 5 5N D F06Creation 6 6N D F12Precedent 12 12N D* ----- D ReactiverInd 94 94N D CreationInd 95 95N D* --------- Tableau Indicateurs Aves DS (Indicateurs Nommés) D IndicatorP S * INZ(%ADDR(*IN)) D Indicators DS BASED(IndicatorP) D MessagMQIFnd 89 89 C DOW F03Exit = False C EVAL ReactiverInd = True C EVAL CreationInd = False C EVAL Attr_Field = PR_Yellow_CSUL C EVAL Attr_Cpr = Yellow_CS_UL C EXFMT GCO104001 C IF F03Exit = True C LEAVE C ENDIF C ENDDO C EVAL *INLR = True Best regards. Yannick.Jacqueline Service Informatique Tél : 02-31-66-46-69 E-Mail : yjacqueline@xxxxxxxxxxxxxx Visitez notre site Web à : http://www.guydegrenne.fr/ Barbara Morris <bmorris@xxxxxxxxxx Pour : rpg400-l@xxxxxxxxxxxx > cc : Envoyé par : Objet : Re: Indicators -- not needed anymore??? rpg400-l-bounces@mi drange.com 30/11/04 19:40 Veuillez répondre à RPG programming on the AS400 / iSeries Andy Hautamaki wrote: > > Nobody is mentioning this one so maybe you can do this without an indicator > and I'm just missing the obvious......... > > On a display file you want to enable and disable a command key........ > > 67 CF06 > You can use an INDDS in your RPG program for this: A INDARA A R REC A CA03(03) A 67 CF06(06) A FLD 1A 2 2 A 67 23 2'F3=Exit F6=Shazzam!' A N67 23 2'F3=Exit' Fjunkdsp cf e workstn indds(dspInds) D dspinds ds D ca06 n overlay(dspinds : 3) D cf06 n overlay(dspinds : 6) D allowCf06 n overlay(dspinds : 67) ****** (Makes no difference if you seton *IN67) C****** eval *in67 = *on C eval allowCf06 = *off C exfmt rec C cf06 dsply C C eval allowCf06 = *on C exfmt rec C cf06 dsply C return output (if I hit F6 when it says I can): DSPLY 0 DSPLY 1 -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.