Troubleshooting
Problem
This document addresses how to modify a sign-on display file so that additional information can be input. It also provides a sample program that can be used to retrieve the input data from the display file.
Resolving The Problem
This document addresses how to modify a sign-on display file so that additional information can be input. It also provides a sample program that can be used to retrieve the input data from the display file.
Changing the Sign-On Display File
To change the format of the sign-on display, you should do the following:
Notes:
Display File Source
The source for the sign-on display file is shipped as a member (QDSIGNON) in the QGPL/QDDSSRC physical file.
Sign-On Display File Tips
The following suggestions apply to display files for sign-on displays:
Retrieving the Sign-On Information in an Application Program
The data specified on the user portion of the sign-on display is sent as replacement data in the CPF1124 message for interactive jobs. This data starts in byte 133 of the replacement text. The following program will retrieve the data:
PGM
DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(260) /*RECEIVES
THE MESSAGE DATA */
DCL VAR(&MSGID) TYPE(*CHAR) LEN(7) /*RECEIVES
THE MESSAGE ID */
DCL VAR(&USERDTA) TYPE(*CHAR) LEN(128) /*RECEIVES
THE USER DATA */
/* Receive the CPF1124 message to obtain the user
portion of the */
/* Sign-On display. Note that the message is not
removed so that */
/* it will be available to the job log. The
message ID is also */
/* retrieved to ensure that the message is
CPF1124. */
RCVMSG PGMQ(*EXT) RMV(*NO) MSGDTA(&MSGDTA)
MSGID(&MSGID)
IF COND(&MSGID *EQ 'CPF1124') THEN(CHGVAR
VAR(&USERDTA) +
VALUE(%SST(&MSGDTA 133 128)))
ENDPGM
Using Retrieved Data
After the retrieve program has run, the data that the user specified will be located in bytes 133 through 260 in the variable &MSGDTA. The CHGVAR command in the sample program moves the data to &USERDTA. The portions of the 128-byte buffer that were not used will appear as blanks in the variable &USERDTA.
Note: If the system is at QPWDLVL 2 or 3, then QDSIGNON2 will be used. QDSIGNON2 is defined with a maximum password length of 128. QDSIGNON2 Display File
Changing the Sign-On Display File
To change the format of the sign-on display, you should do the following:
1. | Create a changed sign-on display file. A hidden field in the display file named UBUFFER can be changed to manage smaller fields. The UBUFFER field is 128 bytes long and is stated as the last field in the display file. This field can be changed to function as an input/output buffer so the data specified in this field of the display will be available to application programs when the interactive job is started. You can change the UBUFFER field to contain as many smaller fields as you need if the following requirements are met: o The new fields must follow all other fields in the display file. The location of the fields on the display does not matter as long as the order in which they are put in the data description specifications (DDS) meets this requirement. o The length must total 128. If the length of the fields is more than 128, some of the data will not be passed. o All fields must be input/output fields (type B in DDS source) or hidden fields (type H in DDS source). Notes: a The order in which the fields in the sign-on display file are declared must not be changed. The position in which they are displayed on the display can be changed. b Do not change the total size of the input or output buffers. Serious problems can occur if the order or size of the buffers are changed. c Do not use the data description specifications (DDS) help function in the sign-on display file. |
2. | Change a subsystem description to use the changed display file instead of the system default of QSYS/QDSIGNON. You can change the subsystem descriptions for subsystems that you want to use the new display. To change the subsystem description: a Use the Change Subsystem Description (CHGSBSD) command. b Specify the new display file on the SGNDSPF parameter. c Use a test version of a subsystem to verify that the display is valid before attempting to change the controlling subsystem. |
3. | Test the change. |
4. | Change other subsystem descriptions. |
Notes:
o | The buffer length for the display file must be 318. If it is less than 318, the subsystem uses the default sign-on display, QDSIGNON in library QSYS. |
o | The copyright line cannot be deleted. |
Display File Source
The source for the sign-on display file is shipped as a member (QDSIGNON) in the QGPL/QDDSSRC physical file.
Sign-On Display File Tips
The following suggestions apply to display files for sign-on displays:
o | When creating the sign-on display file with the Create Display File (CRTDSPF) command, you must always specify 256 on the MAXDEV parameter. |
o | The MENUBAR and PULLDOWN keywords cannot be specified in a sign-on display file description. |
o | Help text must not be defined for sign-on displays. |
Retrieving the Sign-On Information in an Application Program
The data specified on the user portion of the sign-on display is sent as replacement data in the CPF1124 message for interactive jobs. This data starts in byte 133 of the replacement text. The following program will retrieve the data:
PGM
DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(260) /*RECEIVES
THE MESSAGE DATA */
DCL VAR(&MSGID) TYPE(*CHAR) LEN(7) /*RECEIVES
THE MESSAGE ID */
DCL VAR(&USERDTA) TYPE(*CHAR) LEN(128) /*RECEIVES
THE USER DATA */
/* Receive the CPF1124 message to obtain the user
portion of the */
/* Sign-On display. Note that the message is not
removed so that */
/* it will be available to the job log. The
message ID is also */
/* retrieved to ensure that the message is
CPF1124. */
RCVMSG PGMQ(*EXT) RMV(*NO) MSGDTA(&MSGDTA)
MSGID(&MSGID)
IF COND(&MSGID *EQ 'CPF1124') THEN(CHGVAR
VAR(&USERDTA) +
VALUE(%SST(&MSGDTA 133 128)))
ENDPGM
Using Retrieved Data
After the retrieve program has run, the data that the user specified will be located in bytes 133 through 260 in the variable &MSGDTA. The CHGVAR command in the sample program moves the data to &USERDTA. The portions of the 128-byte buffer that were not used will appear as blanks in the variable &USERDTA.
Note: If the system is at QPWDLVL 2 or 3, then QDSIGNON2 will be used. QDSIGNON2 is defined with a maximum password length of 128. QDSIGNON2 Display File
[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]
Historical Number
8822526
Was this topic helpful?
Document Information
Modified date:
20 October 2020
UID
nas8N1010110