× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi All,

 

In my RPG code, I have this:

 

If %trim(pqcat) ='';

  MissingCat = *ON;

  Message = '        Please enter a category';

  write Msg;

  Exfmt prompt_fmt;

  Eerror = *ON;

endif;

 

When this code executes, and a category is not entered, it will turn on
the indicator to highlight the field, but it will not display the
message.

 

However, when I change the code to this:

 

If %trim(pqcat) ='';

  MissingCat = *ON;

  Message = '        Please enter a category';

  write Msg;

  Exfmt PQCTRL;

  Eerror = *ON;

endif;

 

The message will appear along with the field being highlighted.  Can
someone explain why one way it will display, but the other way it won't?
Here's the DDS code that controls it:

 

     A** Subfile Control Format

     A          R PQCTRL                    SFLCTL(PQDATA)

     A                                      SFLSIZ(50)

     A                                      SFLPAG(10)

     A  40                                  SFLEND(*MORE)

     A  75                                  SFLCLR

     A  85                                  SFLDSPCTL

     A  95                                  SFLDSP

     A                                      OVERLAY

     A                                  1  3'PQREJR'

     A                                  1 31'      PQ INQUIRY      '

     A                                      DSPATR(HI)

     A                                      DSPATR(RI)

     A                                  1 70DATE

     A                                      EDTCDE(Y)

     A                                  2 70TIME

     A            PLANT          7      2  3

     A                                  4  8'PQ Category:'

     A            PQCAT          1A  O  4 21

     A  60                                  DSPATR(RI)

     A                                  4 25'[A=ALL  Q=QUARANTINED
R=RELEASED -

     A                                       S=SCRAPPED]'

     A                                  5  8'Date In:'

     A            PQDIYYYY       4A  O  5 21

     A  61                                  DSPATR(RI)

     A                                  5 26'/'

     A            PQDIMM         2A  O  5 28

     A  61                                  DSPATR(RI)

     A                                  5 31'/'

     A            PQDIDD         2A  O  5 33

     A  61                                  DSPATR(RI)

     A                                  5 36'[ie: 2005/07/28]'

     A                                  6  8'Date Out:'

     A            PQDOYYYY       4A  O  6 21

     A  62                                  DSPATR(RI)

     A                                  6 26'/'

     A            PQDOMM         2A  O  6 28

     A  62                                  DSPATR(RI)

     A                                  6 31'/'

     A            PQDODD         2A  O  6 33

     A  62                                  DSPATR(RI)

     A                                  6 36'[ie: 2005/07/30]'

     A            DASHES        75A  O  9  3

     A                                  8  3'*'

     A                                  8  5'Part Number'

     A                                  8 20'Colour'

     A                                  8 29'Serial Number'

     A                                  8 49'Qty'

     A                                  8 57'Date In'

     A                                  8 66'Date Out'

     A                                  8 75'STS'

     A** Prompt Format

     A          R PROMPT_FMT

     A                                      OVERLAY

     A                                  1  3'PQREJR'

     A                                  1 31'      PQ INQUIRY      '

     A                                      DSPATR(HI)

     A                                      DSPATR(RI)

     A                                  1 70DATE

     A                                      EDTCDE(Y)

     A                                  2 70TIME

     A            PLANT          7      2  3

     A                                  4  8'PQ Category:'

     A            PQCAT          1A  B  4 21

     A  60                                  DSPATR(RI)

     A                                  4 25'[A=ALL  Q=QUARANTINED
R=RELEASED -

     A                                       S=SCRAPPED]'

     A                                  5  8'Date In:'

     A            PQDIYYYY       4A  B  5 21

     A  61                                  DSPATR(RI)

     A                                  5 26'/'

     A            PQDIMM         2A  B  5 28

     A  61                                  DSPATR(RI)

     A                                  5 31'/'

     A            PQDIDD         2A  B  5 33

     A  61                                  DSPATR(RI)

     A                                  5 36'[ie: 2005/07/28]'

     A                                  6  8'Date Out:'

     A            PQDOYYYY       4A  B  6 21

     A  62                                  DSPATR(RI)

     A                                  6 26'/'

     A            PQDOMM         2A  B  6 28

     A  62                                  DSPATR(RI)

     A                                  6 31'/'

     A            PQDODD         2A  B  6 33

     A  62                                  DSPATR(RI)

     A                                  6 36'[ie: 2005/07/30]'

     A                                  8  3'*'

     A                                  8  3'*'

     A                                  8  5'Part Number'

     A                                  8 20'Colour'

     A                                  8 29'Serial Number'

     A                                  8 49'Qty'

     A                                  8 57'Date In'

     A                                  8 66'Date Out'

     A                                  8 75'STS'

     A                                 22 32'Enter = Search'

     A                                      COLOR(WHT)

     A                                 22 15'F3 = Exit'

     A                                      COLOR(WHT)

     A** Error Messages

     A          R MSG                       OVERLAY

     A

     A            MESSAGE       40   O 21 15

     A                                      COLOR(RED)

     A                                      DSPATR(HI RI)

 

Thank you!

 

Brian.

 

-=-=-=-=-=-=-=-=-=-=-=-=-=-

Brian Piotrowski

Specialist - I.T.

Simcoe Parts Service, Inc.

Ph: 705-435-7814 x343

Fx: 705-435-6746

bpiotrowski@xxxxxxxxxxxxxxx

-=-=-=-=-=-=-=-=-=-=-=-=-=-

 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.