PUIATEXLAU
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
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.  |