This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
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
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.
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.
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.