Troubleshooting
Problem
This document has an example of a Display file that Shifts the Date field depending on the size of the Display.
Resolving The Problem
The following is DDS for a display file to show right justified date fields on both 132- and 80-character screen sizes.
DDS DATE1:
Note: *LRG and *SML are condition names. The IBM-supplied names are *DS3 (narrow) and *DS4 (wide).
What is happening? The constant field is defined first for the wide screen (because 27 132 is primary). A position for the field conditioned by the small size condition name (*SML) also defines a location. The DATE keyword applies to both locations as if they were the same constant field.
Note: If the DSPSIZ is reversed (DSPSIZ(24 80 *SML 27 132 *LRG)), both 5250 configurations display the 24 * 80 version.
DDS DATE1:
Note: *LRG and *SML are condition names. The IBM-supplied names are *DS3 (narrow) and *DS4 (wide).
DSPSIZ(27 132 *LRG 24 80 *SML)
R REC1
1125
*SML 1 68
DATE EDTCDE(Y)
2 10'TEST FOR DATE'
F1 5A B 3 10
IBM RPG/400:
H 1
FDATE1 CF E WORKSTN
*----------------------------------------------------------------
*
*-------------------------------------------------------------------
*
C MOVEL'ABCDE' F1
C EXFMTREC1
*
C MOVE '1' *INLR
C RETRN RETURN TO CALLER
Configure a 5250 session to be 24 x 80 and another one to be 27 x 132, then call the program. In each, the date should appear
at the starting position defined in the DDS. The starting position depends on what the formatting of the constant is
(depends in part on the DATFMT setting of the job).
What is happening? The constant field is defined first for the wide screen (because 27 132 is primary). A position for the field conditioned by the small size condition name (*SML) also defines a location. The DATE keyword applies to both locations as if they were the same constant field.
Note: If the DSPSIZ is reversed (DSPSIZ(24 80 *SML 27 132 *LRG)), both 5250 configurations display the 24 * 80 version.
[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CHtAAM","label":"Programming ILE Languages"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]
Historical Number
20790437
Was this topic helpful?
Document Information
Modified date:
18 April 2025
UID
nas8N1017648