Here’s a lousy way to do it but it works and it is a quick and dirty fast way to do it:
For whatever file you have to display:
1) Do a copy file in *PRINT with OUTFMT in hexadecimal Ex: CPYF FROMFILE(YOURFILE) TOFILE(*PRINT) OUTFMT(*HEX)
2) create 2 temporarys file in QTEMP like CRTPF FILE(QTEMP/REP) RCDLEN(<Required len>) and CRTPF FILE(QTEMP/REP) RCDLEN(<Required len>)
3) Copy your spool file into the 1st created file with CPYSPLF FILE(QSYSPRT) TOFILE(QTEMP/REP)
4) remove the headers and other irrelevant information with another copy like CPYF FROMFILE(QTEMP/REP) TOFILE(QTEMP/REP2) MBROPT(*ADD) INCCHAR(REP 14 *EQ ‘ ‘) FMTOPT(*NOCHK)
Note that the position 14 always contain something when it is junk
If you want to remove the clear data, then you wolud have to repeat this last copy with position 17.
There you go ! Your REP2 file in QTEMP contain on 2 seperate record the information you want to display !
I told you it was a lousy way ….. but it work’s !
Have fun !