If printposistions for your overlay-form can be reached by measuring in units of 1/6″ or 1/8″ vertical, and 1/10″ or 1/12″ or 1/13.3″ horizontal (other values may be valid also..), you may create a solution this way:
The idea is to let a program ‘grab’ data from current spool-file as char-strings, and then print them again in positions according to your overlay. It is important to make a precise identificatrion of the data in the current spooled print. If you use CPYSPLF with parameter CTLCHAR set to ‘*S36FMT’ and place the spooled print in a PF, you will see that some control-information is inserted into each printed line. These control-characters may be used to identify exactly the lines where your data resides.
From an old program I made back in 1987 (in the System/36 days) I cut these RPG-statements for you:
ICOPYPRT NS 10 1 CH 2 C
I OR 1NCH
I B 1 20PAGENO
I B 3 40LINENO
I 11 142 DATA
The code is still valid even in native System i code.
Insert code like this into your print-control program:
CRTPF FILE(QTEMP/SPOOL) RCDLEN(150)
CPYSPLF FILE(file) +
MBROPT(*REPLACE ) +
OVRPRTF …. add overlay…
CALL mylib/mypgm …. which reads the current spooled print layout and prints a new one.
I hope his helps