Post by quellichetrumCiao a tutti, ho ancora problemi con l'AFP ed avrei bisogno di aiuto.
Inizialmente ho provato a scannerizzare il prefincato delle fatture ed
inserirlo come immagine creando il documento word da utilizzare per
l'overlay AFP. Risultato: Dopo la creazione del .prn, (dimensione 1,60
mb), il suo spostamento in QDLS ed il comando CPYFRMPCD....su as400 mi
trovo l'errore "Il valore del ricevente è troppo piccolo per contenere
il risultato".
Immagino che il problema sia appunto l'eccessiva dimensione del file
word!
Qualcuno mi pare dicesse che la dimensione max sia 32 kb...
Allora non demordo e mi disengo pian pianino su word un modello
praticamente simile al prefincato (con tanto di logo!). Il .prn creato
praticamente ora è di 170 km ed ovviamente ho sempre lo stesso errore.
Come devo fare? accetto qualsiasi soluzione (vabbè a parte pregare..).
Da "AS/400 Guide to Advanced Function Presentation and Print Services
Facility"
Printing the Overlay to an AFP File
After the overlay has been completed on the PC, you are ready to
"print" it to an
AFP file. Complete the following procedures:
1. Create an overlay on the PC. You can use any Windows software to
create a
preprinted form.
2. Print your overlay using the IBM AFP Printer Driver for Windows.
Before you
can print to the Windows driver, you must set up and use the driver
under your
Windows application. First, use the standard procedures to install the
IBM AFP
Printer Driver for Windows. Then, do the following:
a. Select FILE on the application menu bar.
Select PRINT SETUP.
Select Specific printer.
Scroll down the list of printers and highlight AFP 300 on File.
b. Select OPTIONS.
For Output Type, highlight OVERLAY.
Select OK on the Options window.
Select OK on the Printer Setup window.
You are now ready to print your overlay, but you do not actually print
it. Your
output is sent to a file in an AFP overlay format. This file is saved
in an
AS/400 shared folder (Drive I:), making it accessible to the AS/400
system.
c. Select FILE on the application menu bar.
Select PRINT.
Select OK.
d. You are prompted for an output file name.
Specify i:\qdls\resource\invbac.oly.
(You can name it anything you want, but extension .OLY is the default
extension for overlay.)
Select OK.
3. Create a resource database. To do so, go to an AS/400 command line
and
create a file to receive these PC resources using the following
command:
CRTPF FILE(MYLIB/OVERLAY) RCDLEN(8201) +
MBR(MYOVERLAY) MAXMBRS(*NOMAX) LVLCHK(*NO)
The suggested record length is 8201 (32766 is the maximum) and the
Level
check parameter must be *NO.
The parameter MAXMBRS(*NOMAX) enables you to create the file only once
and
use different member names to create other overlays later on.
4. Transfer the PC resource to the AS/400 database. Use the CPYFRMPCD
command to transfer the PC resource to the AS/400 database. Figure 53
on
page 107 shows the display that appears when you use the CPYFRMPCD
command.
Figure 53. Copy From PC Document (CPYFRMPCD) Display
Name of the AS/400 folder where you stored the PC print file
To file Name of the resource file you created
Name of the document from which you will make the copy
Translate table
Specify *NONE, the resource should not be translated
Format of PC data
Specify *NOTEXT, the resource is not text
Note: An alternative method would be to FTP the file to the AS/400 and
then
use the CRTOVL command, omitting the CPYFRMPCD step.
5. Create the Overlay. Use the CRTOVL command to create an AS/400
overlay
(object type *OVL). Figure 54 on page 108 shows the display that
appears when
you use the CRTOVL command.
Figure 54. Create Overlay (CRTOVL) Display