Troubleshooting
Problem
The following is an example of displaying a window in an RPG program.
Resolving The Problem
The following is an example of displaying a window in an ILE RPG program:
Display File WINDOW1:
A DSPSIZ(24 80 *DS3)
A HELP
A CA03(03)
A ALTHELP(CA01)
A* = = =
A R FMT1
A 10 3'FULL SCREEN'
A 11 3'THE WINDOW WILL DISPLAY -
A '
A 12 3'ON TOP OF THIS DISPLAY.'
A FLD1 12A B 13 3
A* = = =
A R FMT2
A 23 3'F3=EXIT'
A COLOR(BLU)
A* = = =
A R WIND WINDOW(4 5 10 10 *NOMSGLIN)
A FLD2 5 O 2 3
A* = = =
A R DUMMY ASSUME
A OVERLAY
A 2 3' '
Compile using CRTDSPF FILE(<yourlib>/WINDOW1) SRCFILE(<yourlib>/QDDSSRC) RPG Source WINDOWR1:
**Free
Dcl-F WINDOW1 WORKSTN;
DoW *IN03 = '0';
Write FMT2;
Exfmt FMT1;
If *IN03 = '0';
Exfmt WIND;
EndIf;
EndDo;
*INLR = *on;
Compile using CRTBNDRPG PGM(<yourlib>/WINDOWR1) SRCFILE(<yourlib>/QRPGLESRC) Call from command: CALL WINDOWR1Press ENTER
![]()
[{"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":"6.1.0;7.1.0;7.2.0;7.3.0;7.4.0;7.5.0;7.6.0"}]
Historical Number
7953758
Was this topic helpful?
Document Information
Modified date:
08 May 2025
UID
nas8N1010264
Press ENTER