Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSO14S user Exit: Warning message on hazarduos mat

Status
Not open for further replies.

Calator

Programmer
Feb 12, 2001
262
AU
Hi,


I need to write a user exit for MSO14S (Issue Requision), which checks catalogue if the material is flagged as 'hazarduos' and if yes, displays a warning message, allowing the user to proceed.

MSO14S.Cbl as for MIMS 4.1
I have inserted my user exit at the end of 3100 paragraph (display item warnings). My code does not work as expected, I have 2 problems:
1. after issuing my warning, the program exits without creating the requisition, ie it handles the warning as an error; my guess was that the "W" flag on the 'ER' error code would tell the program how to handle the event (a warning as opposed to an error) but this does not appear to be the case. Any ideas what I need to do?
2. my warning is issued 2 times even if there is only one item on the screen; if I have 2 items, the first stock code is displayed twice in the warning - no warning for the sencond item. any ideas?

MSO14S PROCEDURE/3100-DISPLAY-ITEM-WARNINGS/3100EXIT//B OPG14SP1


here is my OPG14SP1 code (nutshell):
IF MSF100-HAZARD-MAT NOT = SPACES

EXEC ERROR-SCREEN
MAP (MSM14SA)
FIELD (PART-NO1 (W30-SUB))
*** Using standard error code 3649 which only says 'Warning'
*** and adding our own text to the message:
ERROR (3649)
ERRMESS-EXTRA ('Hazarduos Material. See MSDS:',
PART-NO1I (W30-SUB) )
ERROR-GOTO (3100-EXIT)
END-EXEC
END-IF.



 
In general, Mincom MSO programs which display warnings, keep track of a working storage variable (Y/N flag) (prefixed by W10- or WX10-) which determines if a warning should be displayed (set to Y), and then if the user has Ok'd the warning (set back to N).

I would have a look as MSO14S to see if it processed any other warnings (hopefully it does) and then try and code the new warning in a similar manner.

I'm fairly certain the X(error) or W(warning) indicator on the ER table codes have no particular smarts behind them. Nice try though ;-)
 
Thanks for the reply,
yes the trick here was to add some variables to keep track of Hazardous material warnings as you suggested, but it became even trickier, while the Mincom flags are in the comm area, where we cannot insert more variables with a user exit, we needed to use "exec scroll work store" to save our variables after each update
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top