This procedure will help you to update a designated area of your initial signon screen without having to end the subsystem or re-compile the display file. This can be used as a notice board for company information, announcements or maintenance information or whatever you like, I've heard it used for updating the screen with a fresh quote everyday. You need 3 new components and you also need to add a few lines into the signon display file. Firstly, you need to create a new message file, in this case I called it MSGF, then you need a CL program and another DSPF (these are used as a friendly way of updating the information on the screen).
Firstly create the message file and create 5 blank message in it (you can use as many as you want to as long as you have space) <--- Fig1
Now 5 fields have to be added to your signon display file (this will have to be re-compiled after this) these fields will contain the data held in the message file <--- Fig2
You can test this works by manually making a change to one of the message, this should then appear on the signon screen (only changes once the signon screen is refreshed) If that is working OK, we can now move on and create a nice little CL program that will make those changes for you.
Create a display file <--- Fig3
Then finally create the CL program. <--- Fig4 Once all has been completed, call the program, you then be presented with a screen with 5 lines which you can input your information... once you press enter it will update the message file and thus update your signon screen... very useful.
If the details are unclear you can mail me for more info Andrew Farmer.
Code
Fig1 --- Message file.
Opt Message ID Severity Message
LIN0001 0 Line1
LIN0002 0 Line2
LIN0003 0 Line3
LIN0004 0 Line4
LIN0005 0 Line5
(I have just put some text in as an illustration)
========================================
Fig2 --- Changes to signon display file.
(I've had to split this up into 3 lines to fit it in)
(First field)
Name++++++RLen++TDpBLinPos ...
MSGLIN01 74 O 17 3
... Functions+++++++++++++++++
MSGID(LIN 0001 *LIBL/MSGF)
(Second field)
Name++++++RLen++TDpBLinPos ...
MSGLIN02 74 O 18 3
... Functions+++++++++++++++++
MSGID(LIN 0002 *LIBL/MSGF)
...and so on until you have 5.
========================================
Fig3 --- CHGSGNON Display file
T.Name++++++RLen++TDpBLinPos ...
R CHGSGNON
... Functions+++++++++++
DSPSIZ(24 80 *DS3)
CHGINPDFT(LC)
CF03(99)
CF12(99)
ENTFLDATR
CHECK(AB)
There should be then 5 fields set up like the following:
Name++++++RLen++TDpBLinPos ...
FLD001 74A B 7 4
Functions+++++++++++++++++++++++++++
COLOR(WHT)
DSPATR(UL)
MSGID(LIN 0001 *LIBL/MSGF)
========================================
Fig4 --- CHGSGNPGM CL Program.
PGM
DCLF FILE(*LIBLE/MSGF) RCDFMT(CHGSGNON)
ALWNULL (*YES) SNDRCVF
IF COND(&IN99) THEN(GOTO CMDLBL DONE))
CHGMSGD MSGID(LIN0001) MSGF(*LIBL/MSGF)
MSG(&FLD001)
CHGMSGD MSGID(LIN0002) MSGF(*LIBL/MSGF)
MSG(&FLD002)
CHGMSGD MSGID(LIN0003) MSGF(*LIBL/MSGF)
MSG(&FLD003)
CHGMSGD MSGID(LIN0004) MSGF(*LIBL/MSGF)
MSG(&FLD004)
CHGMSGD MSGID(LIN0005) MSGF(*LIBL/MSGF)
MSG(&FLD005)
ENDPGM