Page 1 of 1
IBMi Spool File - EAN-Code - PDF
Posted: Thu May 19, 2022 11:34 pm
by Joerg Hamacher
Hello,
we have the following problem with this initial situation:
- A customer has an old IBMi ERP system in use that generates a delivery note (spool file).
- He / we have no access to the sources for the ERP system, the manufacturer is no longer available.
- Now the customer wants to print an EAN code with the delivery note number on the first page of the delivery note.
Since, as I said, there is no way to change the spool file on the IBMi, I thought of using LANSA to create a PDF with this EAN code and then somehow linking it to the spool file or then also converting the spool file into a PDF (for example with LANSA Integrator) and then combining the two PDFs somehow.
Can something like this work? Have any of you ever done something like this?
Is there another way with LANSA?
Thank you in advance for your feedback - best regards,
Jörg
Re: IBMi Spool File - EAN-Code - PDF
Posted: Fri May 20, 2022 12:12 am
by Dino
hi Joerg
does the current delivery note have anything there besides text? like control characters for an IPL printer or similar? those will not work once in a PDF.
if it is just text... you can read a spool file with LANSA (there is an example in function DFSPOOL that puts the content in a table), take the information that you want from that spool file and generate a brand new PDF using the PDFDOCUMENT service with barcode
https://docs.lansa.com/15/en/lansa093/i ... ht=barcode , nice new format, etc.
off course if you can get the information directly from the files/tables will be better, but i guess that is not an option.
On the other hand, if you use the PDFSpoolFile service it is more limited in scope, but it can convert a spool file to a PDF and add an image to it
https://docs.lansa.com/15/en/lansa093/i ... 7_4005.htm
but not a barcode... you could create the image with the barcode externally using a restful service for example then use if with this service.
Re: IBMi Spool File - EAN-Code - PDF
Posted: Fri May 20, 2022 2:18 am
by atostaine
There are other vendors that provide software to add images, barcodes, etc without additional programming. TL Ashford and bvstools.com come to mind.
Re: IBMi Spool File - EAN-Code - PDF
Posted: Fri May 20, 2022 4:43 pm
by kno_dk
Hi
We use a tool called interform -
https://interform400.com/.
You can use some overlays to enhance the print, created pdf and also email til pdf. And if you use the newest version it can also work on a windows platform.
very powerfull tool.
/klaus
Re: IBMi Spool File - EAN-Code - PDF
Posted: Fri May 20, 2022 10:50 pm
by Joerg Hamacher
Hi Dino,
when calling function DFSPOOL I get an error message like this:
Message : (0225) - This Builtin Function is not supported in the current release. Routine : ACCESS_FILE.
I'm using LANSA15 - is there a sample or an example anywhere that shows me how to read and save spool file data in "modern" LANSA?
Best regards and have a nice weekend,
Joerg
Re: IBMi Spool File - EAN-Code - PDF
Posted: Sat May 21, 2022 12:10 am
by Dino
There is a current example in the Spool Files option for VLF-ONE, associated with the Spool Files command, that one uses a server module DF_T31DSO which calls a function UFU0105... i modified that one before to show per user instead of outq, etc.

- spool1.png (189.28 KiB) Viewed 11603 times