MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Reference and Help > Technical Support > Key Concepts and Procedures > Help Text Facility > Context-Sensitive Processing

Context-Sensitive Processing

 

 

This section describes the sections of code that must exist in your programs and display files to provide context-sensitive help and Valid Values.  This information will allow you to change how any screen is divided into help areas or to add context-sensitive processing to your own programs.

The DDS for each screen includes a table that identifies what help area and valid values program is associated with each area of the screen.  A sample of the DDS for DE100S02 is shown below.  Figure 2 shows the DE100S02 screen as it is divided into areas. 

 

0222.01 01950A*                                                                

0222.02 01960A            ROWPOS    R        H                                 

0222.03 01970A            COLPOS    R        H                                 

0222.04 01980A*                                                                

0222.05 01990A*&&                     CZPLNT  01  13  01  19  &&                

0222.06 02000A*&&  VVDE100MW   02  4  CZPN    04  03  04  38  &&               

0222.07 02010A*&&  VVREFERW2   01  4  CDTYPE  04  50  04  67  &&               

0222.08 02020A*&&                     CDDESC  06  03  06  48  &&               

0222.09 02030A*&&  VVREFERW1   01  3  CZACD   06  50  06  67  &&               

0222.10 02040A*&&  VVREFERW1   02  3  ACDACC  08  03  08  25  &&               

0222.11 02050A*&&                     CZIASO  08  50  08  70  &&               

0222.12 02060A*&&  VVREFERW1   03  4  CDUTMS  10  03  10  25  &&               

0222.13 02070A*&&                     CZSUMN  10  50  10  78  &&               

0222.14 02080A*&&  VVREFERW1   04  4  CZSUOM  12  03  12  25  &&               

0222.15 02090A*&&                     CZPUMN  12  50  12  78  &&               

0222.16 02100A*&&  VVREFERW1   05  2  CZPUOM  14  03  14  25  &&               

0222.17 02110A*&&  VVREFERW2   02  3  CZPROD  14  50  14  67  &&               

0222.18 02120A*&&  VVREFERW1   06  2  CZPDCL  16  03  16  25  &&               

0222.19 02130A*&&  VVREFERW1   07  1  CZPSCL  16  50  16  68  &&               

0222.20 02140A*&&                     CZRGEN  18  03  18  24  &&               

0222.21 02150A*&&  VVDE170MW   01  1  ACDERL  18  50  18  69  &&               

0222.22 02170A*&&                     ACDDRW  20  03  20  38  &&               

0222.23 02170A*&&  VVIC172MW   02  1  CZSRPL  20  50  20  69  &&               

0222.24 02180A*&&                     CMDKEY  22  01  23  80  &&                

0223.00 02190A*                                                                

          DDS Code for Context Sensitivity in DE100S02.

 

 

WILLIAMS   PLT MFG            DESIGN ENGINEERING                       1/08/92

 DSP01                    PART MASTER FILE MAINTENANCE            CHANGE (DESC)

                                                                               

  Part Number          A-MOUNT                   Part Type        1            

                                                                                

  Part Description     ALUMINUM MOUNTING         Part Status      1            

                                                                               

  Accounting Code      01                        Scrap/Var Option Y  1         

                                                                               

  Stockkeeping UM      EA                        SU/SKU Factor        1      1 

                                                                                

  Selling UM           EA                        PU/SKU Factor        1      1 

                                                                               

  Purchasing UM        EA                        Production Type  1            

                                                                               

  Product Class        01                        Subclass                      

                                                                               

  Auto Rev Gen Flag    N                         Revision Level   000          

                                                                               

  Drawing Number                                 Sourcing Plant                

                                                                               

 F2=Command          F3=Exit             F4=Prompt           F9=Inquiry        

 F10=Function Select F11=Part Comments   F15=Rekey Data                        

     DE100S02 with Screen Areas Marked.

 

Note the following:

·     The Row and Position variables are used to pass cursor location information to the program.

·     Each line of the table begins and ends with a double ampersand ('&&').

·     Positions 20 through 29 indicate what valid values program is associated with the screen area.  For example, when the cursor is in the Part Number (CZPN) screen area of DE100S02 and F4 is pressed, program VVDE100MW is called.  Refer to the Valid Values section of the Common Features manuals for more information.

·     Positions 39 through 44 indicate what help text is associated with the screen area.   For example, when the cursor is in the Part Number field of DE100S02 and the Help key is pressed, a window is displayed containing all records from HP100M where the screen name (HPSCNM) is DE100S02 and the tag name (HPFLD) is CZPN.

·     Positions 47 through 52 indicate the upper right corner of the screen area.  Positions 55 through 60 indicate the lower left corner of the screen area.  For example, the Part Number (CZPN) screen area begins in line 4 and column 3.  It covers the next 36 characters in line 4, through column 38.  As you can see, this corresponds to both the 'Part Number' literal and the Part Number data field.  In general, both the screen literals and the fields themselves are included in the same screen area.

The figure below shows the code contained in the DE100E program to access context-sensitive help processing.

 

0318.90 00920C****************************************************************E

0319.00 00930C* HELP KEY PRESSED                                             *E

0319.10 00940C****************************************************************E

0319.20 00950C*                                                               E

0319.30 00960C         IN26     DOWEQON                                    E

0319.31 00961C                     MOVE *BLANKS   VVCRDS                      E

0319.32 00962C                     EXSR ZCSPOS                                E

0319.33 00963C                     MOVE *BLANKS   VGENDS                      E

0319.34 00964C                     MOVELDSPFMT    VVCSCR                      E

0319.35 00965C                     EXSR ZVLCUR                                E

0319.36 00966C                     MOVELVVCSCR    DSPFMT                      E

0319.37 00967C                     MOVE VVCFLD    DSPFLD                      E

0319.38 00968C                     MOVE OFF       *IN46                       E

0319.39 00969C*                                                               E

0319.40 00970C*   HELP FUNCTION REQUESTED, CALL HELP MODULE.                  E

0319.41 00971C*                                                               E

0319.42 00972C                     CALL HLPPGM    HLPKY                       E

0319.50 00980C                     READ DE100S02                 40           E

0319.60 00990C                     END                                        E

     Code to Access Context-Sensitive Help Processing.

 

Note:    Indicator 26 is turned on when the Help key is pressed.  The two common subroutines, ZCSPOS (which retrieves the cursor position) and ZVLCUR (which validates the cursor position) are copied into each online program.