Return to the ProgTips Tips
Here's an easy way to capture the current screen.
User presses Esc/Attn to "copy screen". Define a display file like this: A R XU0391R1 A OVERLAY CLRL(*NO) A R1DATA1 1782 B 1 2 A R1DATA2 1782 B 1 2 Another display file like this: A DSPSIZ(*DS3 *DS4) * * USER DEFINED FORMAT A R XU0391R1 USRDFN * * INSERT DUMMY FORMAT SO BUFFER SIZE WILL BE CORRECT A R XU0391R2 A FILLER1 1782 B 1 2 A FILLER2 1782 B 1 2 And a CL like this: PGM DCL VAR(&SCREENDATA) TYPE(*CHAR) LEN(3564) DCLF FILE(XU0391F1) /* RETRIEVE CURRENT SCREEN */ OVRDSPF FILE(XU0391F1) TOFILE(XU0391F2) LVLCHK(*NO) CHGVAR VAR(&R1DATA1) VALUE(X'00021518730462') SNDRCVF RCDFMT(XU0391R1) CHGVAR VAR(&SCREENDATA) VALUE(&R1DATA1 *CAT + &R1DATA2)
[report a broken link by clicking here]