MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Reference and Help > Technical Support > Key Concepts and Procedures > Control Language > Application Menu Processing

Application Menu Processing

 

 

The following processing takes place in each application menu program:

1.   Top Level Menu.  The first time a menu is called, file open commands are executed to open the shared data paths on the master files. 

2.   Call a Program.  If an option on the menu is selected, control is given to the control language program specified on the Menu/Options File in Menu Authorization.  The control language program controls the corresponding RPG program.  When the control language and RPG program are finished processing, control is returned to the menu (unless a fast path code or mnemonic has been specified within the program).

3.   Process Command or Fast Path.  On all menus, a command line is displayed at the bottom of the screen.  This line can be used to enter an option from the displayed menu, enter a fast path code or mnemonic command.  Entering a fast path code or mnemonic has the same effect as accessing the corresponding menu and selecting the option from that menu.  More information is provided in the Menu Authorization chapter of this manual.  If a command is entered on the command line, the command is performed.  After the command finishes processing (typically when the user presses F3 to escape from the function), the menu is re-displayed.

4.   Review Transactions.  Batch jobs such as report requests are submitted through application menu options.  For all manufacturing and distribution modules, you can review these requests before they are submitted for processing.  When the Transaction Review option is chosen from an application menu, the corresponding Transaction Review program is called (as specified on the Menu/Options File within Menu Authorization).  This program is always XX300E.  For example, the Design Engineering Transaction Review Program is DE300E, which is called by DE300CLP.  The transactions are displayed using the same screen format where the request was entered.  In some cases, the original display file is accessed.  For other modules, a separate display file was created for the 300E program.

5.   Release Submitted Jobs:  Manufacturing and Distribution Modules

When this option is chosen for a manufacturing or distribution module, the following processing occurs:

a.   Check Operations Pending.  The Pending Operations Check Program associated with the module is called.  This program determines which batch options have transactions waiting to be processed; it passes this information to CF070E.  The pending operations program for each module is XX030E.

b.   Display and Validate.  The Pending Operations Driver Program (CF070E) is called to display all pending jobs.  From the list of pending jobs, you can select one or more jobs to be submitted.

c.   Process Selections.  If one of the "All" options is requested, all of the pending options of the specified type are processed as if an X had been placed in the adjoining request field for that option.  For each individual job, the request data is formatted and submitted.  A SBMJOB command is issued to job queue QBATCH, in subsystem QBATCH.  The job description for the non-financial modules in MPPROCJOB in the data library.  The job description for the financial modules is found below.

·     When the SBMJOB command is used, control language program variables must be converted to literals before the command can execute.  The *CAT (concatenate) function is used to change the Horizon Date (&HDATE) to a numeric literal.

·     Decimal constants are passed in packed form and with a length of (15.5) (i.e. the value is 15 digits long, and 5 digits are decimal positions).  Thus, if a parameter of 12345 is passed, the receiving program must declare the decimal field as (15.5); the parameter is received as 000001234500000 (12345.00000).

Release Submitted Jobs:  Financial Modules

Batch jobs for any of the three financial modules (Accounts Payable, Accounts Receivable, General Ledger) are submitted directly to the job queue QBATCH when they are requested.  These jobs use the corresponding job description of APJOBD, ARJOBD, or GLJOBD, which are all located in FPLIB.  The jobs were submitted to QBATCH with a status of held.  When the Release Submitted Jobs option is chosen for a financial module, the job queue is displayed, allowing you to request that these jobs be submitted.

6.   Display Messages Option.  Online menus can display messages via option 95.  When selected, the DSPMSG command is executed; any messages for the workstation are displayed.  The most common use for this option is to determine whether asynchronous transactions, which send status messages to the workstation after a transaction has been processed, have posted successfully.

7    Return Option.  All online menus have option 98.  When this option is selected, control is returned one level to the previous menu program.  A return from the top level menu will exit the user from the system.  The command entry screen will be displayed.  Pressing F3 performs the same function.

8    Signoff Option.  All online menus have option 90  When selected, the command SIGNOFF LOG (*NOLIST) is executed.

9    Process Invalid Option.  If an option selected is not shown on the menu, or if the Option and Fast Path Code fields are left blank, or if characters are entered in both, an error message (MPC0028 INVALID OPTION SELECTION) is displayed.

10   Process System Errors.  When any serious or unusual error is encountered by the menu program or the operating system, control is passed to the system error section through the global MONMSG command.  The first message in the program message queue is then displayed.  (For more information on  message handling, see Chapter 13 of the IBM Manual "CPF Programmer's Guide" - SC21-7730.  The section on receiving low-level messages is important.)