IBMi Spool File - EAN-Code - PDF

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.
Post Reply
Joerg Hamacher
Posts: 124
Joined: Thu Feb 11, 2016 12:01 am

IBMi Spool File - EAN-Code - PDF

Post 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
User avatar
Dino
Posts: 477
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: IBMi Spool File - EAN-Code - PDF

Post 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.
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: IBMi Spool File - EAN-Code - PDF

Post 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.
Art Tostaine
kno_dk
Posts: 221
Joined: Tue Feb 23, 2016 12:00 am

Re: IBMi Spool File - EAN-Code - PDF

Post 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
Joerg Hamacher
Posts: 124
Joined: Thu Feb 11, 2016 12:01 am

Re: IBMi Spool File - EAN-Code - PDF

Post 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
User avatar
Dino
Posts: 477
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: IBMi Spool File - EAN-Code - PDF

Post 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
spool1.png (189.28 KiB) Viewed 11601 times
Post Reply