Home page  Up a level  CL Menu Display File  CL Menu Program Source  PopMnu Data Area Edit Program  CL Menu Data Area Edit program  PopMnu Screen Shots

CL Menu Data Area Edit Program

This is the program that maintains the POPMNU data area.  It uses the PopMnuDF display file.

/**************************************************************************/
/***        NAME: POPMNUC                                               ***/
/*** DESCRIPTION: Maintain the POPMNU program data area.                ***/
/***                                                                    ***/
/*** Copyright 1995 by John H. Daily III                                ***/
/**************************************************************************/

PGM

/**************************************************************************/
/*** DECLARE VARIABLES                                                  ***/
/**************************************************************************/

             DCL        VAR(&DATE) TYPE(*CHAR) LEN(10)
             DCL        VAR(&TIME) TYPE(*CHAR) LEN(6)
             DCL        VAR(&LOCK) TYPE(*CHAR) LEN(4)

             DCLF       FILE(POPMNUDF)


/**************************************************************************/
/*** ON-LINE PROCESSING                                                 ***/
/**************************************************************************/

/***                                                                    ***/
/*** Retrieve the variables from the data area.                         ***/
/***                                                                    ***/
             RTVDTAARA  DTAARA(POPMNU (1 10)) RTNVAR(&DATE)
             RTVDTAARA  DTAARA(POPMNU (11 10)) RTNVAR(&S11ATNPGM)
             RTVDTAARA  DTAARA(POPMNU (21 10)) RTNVAR(&S11GROUP1)
             RTVDTAARA  DTAARA(POPMNU (31 10)) RTNVAR(&S11GROUP2)
             RTVDTAARA  DTAARA(POPMNU (41 10)) RTNVAR(&S11GROUP3)
             RTVDTAARA  DTAARA(POPMNU (51 10)) RTNVAR(&S11GROUP4)
             RTVDTAARA  DTAARA(POPMNU (61 10)) RTNVAR(&S11GROUP5)
             RTVDTAARA  DTAARA(POPMNU (101 2)) RTNVAR(&S11DISP1)
             RTVDTAARA  DTAARA(POPMNU (103 2)) RTNVAR(&S11DISP2)
             RTVDTAARA  DTAARA(POPMNU (105 2)) RTNVAR(&S11DISP3)
             RTVDTAARA  DTAARA(POPMNU (107 2)) RTNVAR(&S11DISP4)
             RTVDTAARA  DTAARA(POPMNU (109 2)) RTNVAR(&S11DISP5)
             RTVDTAARA  DTAARA(POPMNU (171 6)) RTNVAR(&TIME)
             RTVDTAARA  DTAARA(POPMNU (186 3)) RTNVAR(&S11REFWAIT)
             RTVDTAARA  DTAARA(POPMNU (189 4)) RTNVAR(&LOCK)
             RTVDTAARA  DTAARA(POPMNU (201 10)) RTNVAR(&S11UTILLIB)
             RTVDTAARA  DTAARA(POPMNU (250 1)) RTNVAR(&S11REMOVE)
             RTVDTAARA  DTAARA(POPMNU (301 1)) RTNVAR(&S11SHOWGRP)

             RTVDTAARA  DTAARA(POPMNU (302 30)) RTNVAR(&S11MENU0)
             RTVDTAARA  DTAARA(POPMNU (332 30)) RTNVAR(&S11MENU1)
             RTVDTAARA  DTAARA(POPMNU (362 30)) RTNVAR(&S11MENU2)
             RTVDTAARA  DTAARA(POPMNU (392 30)) RTNVAR(&S11MENU3)
             RTVDTAARA  DTAARA(POPMNU (422 30)) RTNVAR(&S11MENU4)
             RTVDTAARA  DTAARA(POPMNU (452 30)) RTNVAR(&S11MENU5)
             RTVDTAARA  DTAARA(POPMNU (482 30)) RTNVAR(&S11MENU6)
             RTVDTAARA  DTAARA(POPMNU (512 30)) RTNVAR(&S11MENU7)
             RTVDTAARA  DTAARA(POPMNU (542 30)) RTNVAR(&S11MENU8)
             RTVDTAARA  DTAARA(POPMNU (572 30)) RTNVAR(&S11MENU9)

/***                                                                    ***/
/*** Set up the date, last time used and lock wait time.                ***/
/***                                                                    ***/

             CHGVAR     VAR(&S11DATE) VALUE(&DATE)
             CHGVAR     VAR(&S11LASTTIM) VALUE(&TIME)
             CHGVAR     VAR(&S11LCKWAIT) VALUE(&LOCK)

/***                                                                    ***/
/*** Display the screen for user input until F03, F10 or F12 is pressed ***/
/***                                                                    ***/
Send:
             SNDRCVF    RCDFMT(SCRN11)
             IF         COND(&IN03 *OR &IN12) THEN(GOTO CMDLBL(ENDPGM))v
             IF         COND(*NOT &IN10) THEN(GOTO CMDLBL(SEND))

/***                                                                    ***/
/*** Change the date, time and lock back to character variables.        ***/
/***                                                                    ***/
             CHGVAR     VAR(&DATE) VALUE(&S11DATE)

             CHGVAR     VAR(&TIME) VALUE(&S11LASTTIM)
             CHGVAR     VAR(&LOCK) VALUE(&S11LCKWAIT)

/***                                                                    ***/
/*** Update the data area.                                              ***/
/***                                                                    ***/
             CHGDTAARA  DTAARA(POPMNU (1 10)) VALUE(&DATE)
             CHGDTAARA  DTAARA(POPMNU (11 10)) VALUE(&S11ATNPGM)
             CHGDTAARA  DTAARA(POPMNU (21 10)) VALUE(&S11GROUP1)
             CHGDTAARA  DTAARA(POPMNU (31 10)) VALUE(&S11GROUP2)
             CHGDTAARA  DTAARA(POPMNU (41 10)) VALUE(&S11GROUP3)
             CHGDTAARA  DTAARA(POPMNU (51 10)) VALUE(&S11GROUP4)
             CHGDTAARA  DTAARA(POPMNU (61 10)) VALUE(&S11GROUP5)
             CHGDTAARA  DTAARA(POPMNU (101 2)) VALUE(&S11DISP1)
             CHGDTAARA  DTAARA(POPMNU (103 2)) VALUE(&S11DISP2)
             CHGDTAARA  DTAARA(POPMNU (105 2)) VALUE(&S11DISP3)
             CHGDTAARA  DTAARA(POPMNU (107 2)) VALUE(&S11DISP4)
             CHGDTAARA  DTAARA(POPMNU (109 2)) VALUE(&S11DISP5)
             CHGDTAARA  DTAARA(POPMNU (171 6)) VALUE(&TIME)
             CHGDTAARA  DTAARA(POPMNU (186 3)) VALUE(&S11REFWAIT)
             CHGDTAARA  DTAARA(POPMNU (189 4)) VALUE(&LOCK)
             CHGDTAARA  DTAARA(POPMNU (201 10)) VALUE(&S11UTILLIB)
             CHGDTAARA  DTAARA(POPMNU (250 1)) VALUE(&S11REMOVE)

             CHGDTAARA  DTAARA(POPMNU (301 1)) VALUE(&S11SHOWGRP)

             CHGDTAARA  DTAARA(POPMNU (302 30)) VALUE(&S11MENU0)
             CHGDTAARA  DTAARA(POPMNU (332 30)) VALUE(&S11MENU1)
             CHGDTAARA  DTAARA(POPMNU (362 30)) VALUE(&S11MENU2)
             CHGDTAARA  DTAARA(POPMNU (392 30)) VALUE(&S11MENU3)
             CHGDTAARA  DTAARA(POPMNU (422 30)) VALUE(&S11MENU4)
             CHGDTAARA  DTAARA(POPMNU (452 30)) VALUE(&S11MENU5)
             CHGDTAARA  DTAARA(POPMNU (482 30)) VALUE(&S11MENU6)
             CHGDTAARA  DTAARA(POPMNU (512 30)) VALUE(&S11MENU7)
             CHGDTAARA  DTAARA(POPMNU (542 30)) VALUE(&S11MENU8)
             CHGDTAARA  DTAARA(POPMNU (572 30)) VALUE(&S11MENU9)


/**************************************************************************/
/*** END OF PROGRAM                                                     ***/
/**************************************************************************/

Endpgm:
ENDPGM