Problem solve Get help with specific problems with your technologies, process and projects.

Add lots of info to your sign-on screen

This tip shows you how to add a lot of info to your sign-on screen.

Although placing message fields on a sign-on display will allow you to modify the content displayed at sign on, needing a different message field for each line makes it irritating to work with. Fortunately, you can get the same display capability by using just a single message field.

Use a field definition in your display file like shown below and then create a message description in the format also shown below.

In the example, the display field is defined as 640 characters long, enough to fill eight full 80-character display lines, but you can make it longer if you wish. The real trick is in the message description and how it is handled by a display file.

When the first-level message text contains _ONLY_ the message ID itself (SYU0001 in this case), the system will happily continue on to the second-level text and display it instead. In this way, you can display as much as you can fit on the screen. This behavior is a holdover from an S/36 facility that is rarely used for AS/400 displays. For added use elsewhere, when the display field is defined as B(oth) instead of O(utput-only) and includes the keywords DSPATR(PR) and CNTFLD(nnn) and optionally CHGINPDFT, you can get some very useful effects in many display files, even in window formats.

 *** DDS:

MSGLINE      640A  O 13  1MSGID(SYU 0001 msgflib/msgf)

*** Message:

ADDMSGD  MSGID( SYU0001 ) MSGF( msgflib/msgf ) +
          MSG( SYU0001 )  +
          SECLVL( 'Some very long text up to the length of your DDS field' ) 

Dig Deeper on Performance

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.