Map spool file data to overlay

15 pts.
Tags:
map spool data
OS/400
Spool files
V5R4
Please excuse the length of the post but I am new here and not quite sure how to get across what I need. We have a spool file that we do not have source for, it's from our financial application and cannot be changed. I need to take data from that spool file and place it in specific location on an overlay that includes our logo, some boxes, a watermark, and a few other graphics. I have created and uploaded the overlay with no problem, and attached it to the spool file. The overlay prints great, but the spool file data prints exactly like it looks in the spool file. How can I map the spool file data to a position on the overlay? For example, in the spool file (MYSPOOLF) the employee name is on line 4, beginning in position 20 for a length of 30 characters. I need the employee name to be printed, with the overlay (MYOVERLAY), in the position of 1 inch down and 2 inches across. Is there a way to do this without using a purchased package? Someone told me InfoPrint did this, but I don't think we have that (is there a way to check?). Thanks in advance for any info (the "For Dummies" version would be especially appreciated!).

Software/Hardware used:
OS400 v5r4

Answer Wiki

Thanks. We'll let you know when a new response is added.

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:
<pre>
ICOPYPRT NS 10 1 CH 2 C
I OR 1NCH
I B 1 20PAGENO
I B 3 40LINENO
I 11 142 DATA
</pre>
The code is still valid even in native System i code.

So….
Insert code like this into your print-control program:
<pre>
CRTPF FILE(QTEMP/SPOOL) RCDLEN(150)
Monmsg cpf0000
CPYSPLF FILE(file) +
TOFILE(QTEMP/SPOOL) +
JOB(*) +
SPLNBR(*LAST) +
MBROPT(*REPLACE ) +
CTLCHAR(*S36FMT)
OVRPRTF …. add overlay…
CALL mylib/mypgm …. which reads the current spooled print layout and prints a new one.
</pre>
I hope his helps
DanF

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Please excuse the length of the post but... I'm not sure if you're apologizing because you think you wrote too much or too little. I think you wrote to little. Are you wanting your single overlay to reposition different blocks of a fixed spooled file to different locations on the printed page? Without recreating the printer file description? Tom
    125,585 pointsBadges:
    report
  • Phancock
    I thought the post was a little long, based on other I saw. But what I want, is my single overlay to reposition different blocks of a fixed spoold file to different locations on the printed page, without purchasing a package to do it. Thanks for responding!
    15 pointsBadges:
    report
  • YuVa47
    report
  • HappyLackey
    We use overlays for documents also. We use an OVRPRTF of the spool file in the CL to the overlay name (FRONTOVL). The device type is *AFPDS. We use output specs in the RPGLE to put the data in the correct positions. I'm not sure if that is what you are asking for. The data is not always lined up with the overlay text as exactly as you would want it to be, but it works.
    35 pointsBadges:
    report
  • TomLiotta
    ...what I want, is my single overlay to reposition different blocks of a fixed spoold file to different locations on the printed page, without purchasing a package to do it. Adding overlays to existing printer files is fairly easy. But rearranging the spooled data isn't trivial. I can think of three options:
    1. Update the printer file, and possibly the programming that uses the printer file, to cause the spooled data to appear in the desired locations on the pages.
    2. Purchase a product to do this through rules-based engines.
    3. Do it the way vendors do -- write a printer driver that rearranges the data in the printer data stream. This might be done through a Print Driver Exit Program, but I suspect it's a pretty obscure skill set.
    There might be variations that simplify things. There might be other alternatives that I can't think of. And, of course, spooled *SCS printer data can always be read back into a "reformatter" program that outputs to a new printer file that includes an overlay -- this second program would fill the need for a "printer driver". (Technically, it doesn't have to be *SCS; but it's far easier if it is.) Overlays are one thing, but rearranging spooled elements is a very different matter. Tom
    125,585 pointsBadges:
    report
  • WoodEngineer
    To check for Infoprint, GO LICPGM, then select option 10, Display installed licensed programs. This is what we see on our V5R4 system.
    5733ID1   *INSTALLED   IBM Infoprint Designer for AS/400    
    5722IP1   *COMPATIBLE  IBM Infoprint Server for iSeries    
    We found Infoprint rather cumbersome and vary frustrating. We are abandoning it when we move to 6.1 later this month.
    6,345 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following