Midrange News for the IBM i Community


Posted by: Paulster
Freelancer/Consultant
PvD Consultancy AB
Sweden and The Netherlands
Print invoice from physical file with CTLCHAR(*PRTCTL)
has no ratings.
Published: 19 Oct 2011
Revised: 23 Jan 2013 - 1979 days ago
Last viewed on: 24 Jun 2018 (4624 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Print invoice from physical file with CTLCHAR(*PRTCTL) Published by: Paulster on 19 Oct 2011 view comments(2)

Howdy,

 

I get a file ftp-ed on my system from a remote system. The file is a flat file containing invoices that have been invoiced on the remote machine. The file is generated on the remote machine during invoicing but looks exactly like it has been copied from a spooled file to a flat file using command CPYSPLF with CTLCHAR(*PRTCTL). The file would typically look something like below:

 

*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....
003                                              INVOICE
   1                                                                       Page   1
   2                                             Invoicedate            Customer ID
   1                                             11-09-26                      A040
   1                                                                     Invoice ID
   1                                                                         111513
   2      Invoice address
   1      Joe's nails and spikes
   2      5 Hammarroad 
   1      Albany NY
025       Description                        Qty                Amount
   1      ------------------------------------------------------------
   1      Golden hammer                        1                500.00
062           Amount   VAT %             VAT                    Amount
   1          500.00   10.00           50.00                    550.00 USD

 

Now here's for the question: is there any way to print this file in the intended layout without creating a program to format it properly before printing?

 

I reckon the answer to this question is no but I thought and check with you guys before setting of and creating a program to do this (or ordering a .pdf instead)

 

Thanks for any tips,

Paulster

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS