Return to the RPG Tips
Emphasizing source code
By Tim Granatir, Search400 expert Here is a short list of hex values that you may find more interesting than others: 21 - Reverse Image 22 - Highlight 23 - Highlight and Reverse Image 24 - Underline 28 - Color Red Program source - BLDSRC - Builds a source member with sample highlighting FOUTFIL1 O F 92 DISK IOUTREC DS I 13 13 FLD1 I 15 15 FLD2 I 20 31 TEXT1 I 81 81 FLD3 I 83 83 FLD4 I 1 92 SRC I 'SAMPLE TEXT' C TEXT C CLEARSRC C MOVELTEXT TEXT1 C MOVELX'21' FLD1 RI C WRITEOUTFIL1 OUTREC C MOVELX'22' FLD1 HI C WRITEOUTFIL1 OUTREC C MOVELX'23' FLD1 HI RI C WRITEOUTFIL1 OUTREC C MOVELX'24' FLD1 UL C WRITEOUTFIL1 OUTREC C MOVELX'28' FLD1 RED C WRITEOUTFIL1 OUTREC C* DRAW BOX C Z-ADD0 COUNT 10 C COUNT DOUEQ3 C ADD 1 COUNT C CLEARSRC C MOVELX'23' FLD1 C MOVELX'22' FLD4 C COUNT IFEQ 2 C MOVELX'22' FLD2 C MOVELX'23' FLD3 C END C WRITEOUTFIL1 OUTREC C END C SETON LR Commands to run CRTSRCPF FILE(MYLIB/SRCSMPLE) RCDLEN(92) MBR(SRCSMPLE) OVRDBF FILE(OUTFIL1) TOFILE(MYLIB/SRCSMPLE) MBR(SRCSMPLE) CALL PGM(BLDSRC)
[report a broken link by clicking here]