Display messages to the user

Posted by
Print Friendly, PDF & Email

Display a simple message

Example of coding:

TEXT =  "Your input overrides tolerance of"
      TEXT := "<CR>"
      TEXT :" MAX.TOL : "%"
      CALL REM

Display a message to block the inputter

Example of coding: block the user as long as a field has not been input

            IF (COMI = '') THEN 
                TEXT = "Barrier mandatory for exotic option"
                CALL REM
                E = TEXT
                CALL STORE.END.ERROR
            END

Note that depending on how the program is written, you may replace E = TEXT by ETEXT = TEXT

Display a message and store an override if a user forces it

Example of coding:

   IF (SUM(R.NEW(SC.ESO.NOMINAL.RECD)) > SUM(R.NEW(SC.ESO.NOMINAL.BALANCE))) THEN
      OUT.TEXT = 'NOMINAL GREATER THAN THE ORDER'
      TEXT     = OUT.TEXT
      CURR.NO  = R.NEW(SC.ESO.CURR.NO)
      CALL STORE.OVERRIDE(CURR.NO)
      IF TEXT = 'NO' THEN
         ETEXT = OUT.TEXT
         CALL STORE.END.ERROR
      END
   END

Display a message and manage the user answer

Example of coding:

        IF ID.COMPANY = 'US0010001' AND CREATE.DCD = 1 THEN

            IN.TEXT := 'GENERATE A MIRRORED DEAL OPTION FOR SUBSIDIARY BANK SIDE'
            IN.TEXT := '<CR>'
            IN.TEXT := 'ARE YOU SURE Y/N?'
            IN.TEXT := '<CR>'
            T.CONTROLWORD = ''
            CALL TXTINP(IN.TEXT, 10, 22, 3.1, '':FM:'YES_NO')

            IF COMI = 'YES' THEN
                GOSUB PROCESS.MAPPING
                GOSUB PROCESS.DX
            END ELSE
                TEXT = "NO MIRRORED DEAL OPTION GENERATED"
                CALL REM
            END

        END

With, in this example of CALL TXTINP:

IN.TEXT= Text to be displayed
10 = Line position (in classic mode)
22= Column position (in classic mode)
3.1= answer must have 3 characters maximum, with a minimum of 1 (meaning answer is mandatory)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.