Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Current »

Content Freeze

As of July 25th, 2023, there is a content freeze on this page.

PUIATEXLAU – Retrieve Menu Item Launch State 

This exit program is responsible for returning the launch ‘state’ and ‘text’ for a specific menu ‘code’ item.  

This exit program goes really hand in hand with PUIATEXMNU. Where PUIATEXMNU is used to load the menu structure with each menu item having a unique ‘Code’, PUIATEXLAU uses this ‘Code’ or ‘ItemID’ to locate and find the launch settings for the menu item from the external database. This is then returned back to determine how Atrium will launch the menu item. 

Below is exit program PUIATEXLAU procedure prototype. 

Fixed Format Exit Program Procedure Prototype
	 D PUIATEXLAU      PR                  ExtPgm('PUIATEXLAU')
     D  iUser                       128A   Const
     D  iItemID                     128A   Const
     D  oLaunchConfig                      LikeDS(dsLaunchConfig)
     D  oError                         N
     D  oErrorMsg                   256A
Free Format Exit Program Procedure Prototype
Dcl-PR Main ExtPgm('PUIATEXLAU');
   iUser         Char(128);
   iCode         Char(128);
   oLaunchConfig LikeDS(dsLaunchConfig);
   oError        Ind;
   oErrorMsg     Char(256);
End-PR;


Exit Program Parameter Descriptions 

Parameter 

Data Type (Length) 

Description 

iUser 

Char(128) 

User ID 

iItemID 

Char(128) 

Unique reference value for the menu item as assigned by PUIATEXMNU. 

oLaunchConfig 

LikeDS(dsLaunchConfig) 

Returned launch state and associate free text. Free text is shown in the dialog box. 

oError 

Ind (true/false) 

Returned from exit program. If 0 then success otherwise failure. 

oErrorMsg 

Char(256) 

Returned error message describing the error from exit program. 

 

Data structure definition that has return launch config for a passed ‘iItemID’ in the arguments. 

Fixed Format Launch Config Data Structure
    // data structure for launch item config from exit program...
  D dsLaunchConfig  DS                  Qualified
  D  LaunchState                   1A   Inz('0')
  D  LaunchText                  512A   Inz('')


Free Format Launch Config Data Structure
Dcl-DS dsLaunchConfig Qualified;
  LaunchState char(1)   Inz('0');
  LaunchText  char(512) Inz('');
End-DS;


The valid launch config values are defined in the below table. The external database will need to assign, for each menu item, the configs. The table below provides the details. 

LaunchState 

LaunchText  

Description (not a config item) 

0 

No text required. 

Launches item immediately 

1 

‘Item needs confirmation’ free text field required. 

Launches only if the user clicks ‘yes’ in the confirmation box. 

2 

‘Item is unavailable’ free text field required.

Item does not launch. User can only click on ‘ok’ to close the dialog box.  



  • No labels