Can someone who really knows how write what is all
mandatory for conversion from spool file on AS400 to PDF to IFS.
We have VR5R4 and Infoprint but I'm not sure that it's all to it.
I have a problem converting spool file to PDF.
I tried many things but there's always a probelm with a
printer.
Steps:
1. I build PSF file (eg. ADOBEPDF) and put it in my library (eg:
MyLIB)
1. I build a outq (eg. ADOBEPDF) and I put it in MyLIB and put PSF
file and library location into it
3. I build a new device printer (eg. ADOBEPDF)
3a. I put a User object record as location and name of my PSF file
3b. I put remote location as 127.0.0.1
3c. I put device type as *IPDS
4. I vary on the device (ADOBEPDF printer) - it passes okay
5. I want to start the WRITER - it won't start - no way.
I even did this with a "dummy printer" specifications from IBM.
Everything goes well up to point of starting the printer (writer).
Can anybody help? Am I missing some configuration files needed?
I have tried several free solutions - none worked.
Best regards,
Avrelivs
> 5. I want to start the WRITER - it won't start - no way.
Here is how we created our printer device:
CRTDEVPRT DEVD(PDF2IFS) DEVCLS(*LAN) TYPE(*IPDS) MODEL(0)
LANATTACH(*IP) AFP(*YES) PORT(12345) FONT(001 +
*NONE) RMTLOCNAME('127.0.0.1') +
USRDFNOBJ(QUSRSYS/PDF2IFS *PSFCFG) TEXT('Printer for PDF +
-> IFS Stream File Creation')
CRTPSFCFG PSFCFG(QUSRSYS/ADOBEPDF) PDFGEN(*STMF) PDFDEVTYPE(*IP40300)
PDFPPRDWR2(*LEGAL) PDFMULT(*YES) PDFDTAQ(*NONE) PDFDIR('/AS400PDF')
TEXT('Default PDF')
Create a device:
CRTDEVPRT DEVD(ADOBEPDF) DEVCLS(*LAN) TYPE(*IPDS) MODEL(0)
LANATTACH(*IP) AFP(*YES) PORT(51551) FONT(11) RMTLOCNAME('127.0.0.1')
USRDFNOBJ(QUSRSYS/ADOBEPDF *PSFCFG) TEXT('Default PDF printer outqueue
device') AUT(*ALL)
Now wrkcfgsts *dev and vary on ADOBEPDF
Then wrkwtr and start ADOBEPDF writer
Now, anything spooled to ADOBEPDF will go to a directory on the IFS,
under Root, called AS400PDF; then into a sub-folder of the user id.
to get fancier, you can clone a program from an IBM manual, or I can
post an example; this program can be attached to the CRTPSFCFG and
will allow you to "custom name" files that are created. We are using
it with good results; I'm not doing anything with email on it yet, but
that can be done too. Right now I just use it to spool out reports or
copies of tickets - what's great is it will copy the overlays too.
I'll be honest, it took me quite awhile to figure out how to make the
IBM program work - I wanted to create very long file names for the PC
side and folders/subfolders/etc.
You can create multiple ones but each device has to have a unique PORT
- I use different ones to control where printing goes automatically.
By using a program, which you don't need to, you do have more control
over the naming of the pdf's and where they go.
Once you change a spool file to the ADOBEPDF, the very first one you
may have to answer a "Load forms" message, and if you print other
reports with different forms to it you'll have to answer forms change
messages on those too.
For me writing a custom program was the way to go, but starting out I
just set the PDFDIR where I wanted it to go; like I said, they should
go out there into AS400PDF and then into a subdirectory of the user
name. The system gives it a name like DEVICE_DATE_TIME_...etc.
zpo...@gmail.com wrote:
What software products? Infoprint server? Others?
I tried this and was not able to get a writer to start:
Message . . . . : IPDS to PDF transform job not
run.
Cause . . . . . : An error caused PSF to be unable to start the IPDS
to PDF
transform on device ADOBEPDF. The reason code for the error is 1.
Reason
codes have the following meanings. 1 - No PDF exit program is
registered for
exit point name QIBM_QPQ_TRANSFORM and exit point format name
XPDF0100 with
program data of "IPDS PDF".
What exit program do you have registered?
TIA, Thad Rizzi
Looks like you need infoprint server.
http://www-1.ibm.com/support/docview.wss?uid=nas1ce5dad2609ad570f86257004006b0fe3
Thad Rizzi
Dave, yes, of course the first requirement is to have infoprint server
57xx-IP1 installed on your system. Then create the PSF and then the
device description. You then have to vary off the printer, go back
into the PSF configuration (WRKPSFCFG) and then add the program
name/library to the PSF. as PDF user program. You can also use a PDF
mapping object, but I went the program route as I wanted to name my
PDF's my own way. Once you have the program written and attached to
the PSFCFG, vary on the printer and restart the writer. Now, if you
change a spool file from say "P1" to "NP", it will automatically
create the PDF in the appropriate directory named according to your
program. One or two gotcha's - if the print job is on hold, it won't
go there until released, same is true if a forms change message needs
answered. Also, if you change your default printer to "NP" (my
example), the pdf will be created immediately and you won't even see
it on the spool file.
We have a zillion pages that print in our day end. I spool them all
to a dummy printer. Then, I do a CHGSPLFA file*(select) with
selection criteria for user and from printer, and change all spooled
items to the PDF printer. But a few I change to have a certain
userdata in them so I can do a CHGSPLFA on those and make them
save(*YES). That way, I can move them back to a real printer and
print them using another CHGSPLFA and RLSSPLF.
Kind of complicated to explain but it works. Oh, one more note, in my
program, I use a data area to set the CCYYMM main level folder. I
manipulate that date area BEFORE moving the spool files to the NP
printer (which is my pdf and that program runs automatically to put
the printed files into the designated IFS directory and name them
accordingly.
The program is in two manuals -
The Infoprint Server User Guide
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzair/g5445775.pdf
sample program is in appendix b
The other manual is Using Intelligent Routing
ftp://ftp.software.ibm.com/printers/pdf/intelligent_routing.pdf
The program provided is a SHELL program, which you have to customize
for your own needs, but I think the shell program is written to
accommodate emailing parts of a spool file, copying files to pdf's,
etc.
Now the problem with both of these is the documentation was sketchy at
best. I called IBM a couple of times and finally got enough
information for me to make it work. In your program you could make it
go not just to pdf's, but to stream files or emails, and you can do
code to break it up into segments - say if you had multiple customers
in a big file you wanted to email just their statement, you could
extract and email that. I haven't worked on that yet.
What I wanted to do was simply create a PDF, but instead of it going
into the default folder, I wanted to specify what folder, and then
what I wanted the PDF to be named. I have included my device
description source, my psfcfg source (display of) and my program. The
key for me was figuring out how to make the output data stream longer
so I could give my PDF a longer field name.
I apologize right up front because I am not smart enough to know how
to get this to preserve columns. If you prefer me to email you (or
anyone else) the files, I'd be happy too, you just need to post your
email address. If you do though, put something like "nospam" in the
email address that I can remove before using it, otherwise you might
end up with a bunch of spam from the people who fish for email
addresses.
Sorry for the book. As I said, I could email you the files which might
be better. ga
Here is my device description source:
CRTDEVPRT DEVD(NP) DEVCLS(*LAN) TYPE(*IPDS) MODEL(0) LANATTACH(*IP) +
AFP(*YES) PORT(51566) ONLINE(*YES) FONT(011 *NONE) +
FORMFEED(*CONT) SEPDRAWER(*FILE) PRTERRMSG(*INQ) +
MSGQ(*CTLD) ACTTMR(170) IMGCFG(*NONE) MAXPNDRQS(6) +
PRTCVT(*YES) PRTRQSTMR(*NOMAX) FORMDF(*LIBL/F1C10110) +
CHRID(*SYSVAL) RMTLOCNAME('127.0.0.1') +
USRDFNOBJ(QUSRSYS/NP *PSFCFG) TEXT('NF - FSC - GO - PDF +
printer MHPRLF') DEPLOCNAME(*NONE) PUBLISHINF(*UNKNOWN +
*UNKNOWN *UNKNOWN *UNKNOWN *BLANK (*UNKNOWN))
Here is the output from a DSPPSFCFG for the PSFCFG:
PSF configuration: NP Library: QUSRSYS
User resource library . . . . . . . . . . . . . : *JOBLIBL
IPDS pass through . . . . . . . . . . . . . . . : *NO
Activate release timer . . . . . . . . . . . . . : *NORDYF
Release timer . . . . . . . . . . . . . . . . . : *NOMAX
Restart timer . . . . . . . . . . . . . . . . . : *IMMED
APPC and TCP/IP retry count . . . . . . . . . . : 15
Delay time between retries . . . . . . . . . . . : 90
Auto Session Recovery:
Enabled . . . . . . . . . . . . . . . . . . . : *NO
Message option . . . . . . . . . . . . . . . . :
Acknowledgment frequency . . . . . . . . . . . . : 100
Printer response timer . . . . . . . . . . . . . : *NOMAX
Blank page . . . . . . . . . . . . . . . . . . . : *YES
Page size control . . . . . . . . . . . . . . . : *NO
Resident fonts . . . . . . . . . . . . . . . . . : *YES
Resource retention . . . . . . . . . . . . . . . : *YES
Edge orient . . . . . . . . . . . . . . . . . . : *NO
Use outline fonts . . . . . . . . . . . . . . . : *NO
PSF defined options:
*NONE
Font substitution messages . . . . . . . . . . . : *YES
Capture host fonts at printer . . . . . . . . . : *NO
Cut sheet emulation mode . . . . . . . . . . . . : *NONE
Font resolution for formatting . . . . . . . . . : *SEARCH
Font mapping table . . . . . . . . . . . . . . . : *NONE
Library . . . . . . . . . . . . . . . . . . . :
Use DBCS simulation font . . . . . . . . . . . . : *NO
Generate PDF output:
*STMF
PDF device emulation type . . . . . . . . . . . : *IP40300
PDF paper size drawer 1 . . . . . . . . . . . . : *LETTER
PDF paper size drawer 2 . . . . . . . . . . . . : *LEGAL
PDF multipe group handling:
Acknowledge multiple groups . . . . . . . . . : *YES
Process option . . . . . . . . . . . . . . . . : *SPLIT
PDF fonts inline . . . . . . . . . . . . . . . . : *YES
PDF data queue . . . . . . . . . . . . . . . . . : *NONE
Library . . . . . . . . . . . . . . . . . . . :
PDF mail server:
*SNDDST
Sender of PDF mail . . . . . . . . . . . . . . . : *SPLFOWN
PDF administrator . . . . . . . . . . . . . . . : *NONE
PDF user program . . . . . . . . . . . . . . . . : NPPGM
Library . . . . . . . . . . . . . . . . . . . : PRGAS400
PDF mapping object . . . . . . . . . . . . . . . : *NONE
Library . . . . . . . . . . . . . . . . . . . :
PDF output queue . . . . . . . . . . . . . . . . :
Library . . . . . . . . . . . . . . . . . . . :
PDF file location . . . . . . . . . . . . . . . : /mhprfl
Save AFP data . . . . . . . . . . . . . . . . . : *NO
AFP output queue . . . . . . . . . . . . . . . . :
Library . . . . . . . . . . . . . . . . . . . :
Text description . . . . . . . . . . . . . . . . : MHPRFL folder -
Payroll reports uses NPPGM for nam
Device resource library list:
Here is the mapping program:
> 9300 D BDYPTH3 829 844
> 9400 D DIRPTH 845 849
> 9500 D NEWPTH 850 941
> 9600 D NEWOBJ 942 966
> 9700 D PUBAUT 967 991
> 9800 D PDFQ 992 1296
> 9900 D AFPQ 1297 1298
> 10000 D ENCRYPT 1299 1369
> 10100 D INPUTLEN DS 4
> 10200 D OUTPUTLEN DS 4
> 10300 D OUTINFO DS 4
> 10400 C *ENTRY PLIST
> 10500 C PARM INPUTDS
> 10600 C PARM INPUTLEN
> 10700 C PARM OUTDS
> 10800 C PARM OUTPUTLEN
> 10900 C PARM OUTINFO
> 11000 C* EVAL OUTINFO = X'00000520'
> 11100 C EVAL OUTINFO = X'00000570'
> 11200 C Z-ADD splno wrkno 6 0
> 11300 C MOVEL splfid splid2 10
> 11400 C MOVEL usrdta usrdt2 10
> 11500 C MOVEL payymd payym 6
> 11600 C splid2 IFEQ *BlANKS
> 11700 C MOVEL 'NOSPLID' splid2
> 11800 C ENDIF
> 11900 C usrdt2 IFEQ *BLANKS
> 12000 C MOVEL 'NOUSRDTA' usrdt2
> 12100 C ENDIF
> 12200 C OUTINFO IFLE OUTPUTLEN
> 12300 C CLEAR OUTDS
> 12400 C EVAL MAILDISP = '0'
> 12500 C EVAL RES2 = X'0000'
> 12600 C EVAL RES3 = X'00'
> 12700 C EVAL RES4 = X'0000000000000000000000'
> 12800 C EVAL EXTOFF = 543
> 12900 C EVAL EXTLEN = 100
> 13000 C EVAL STMFDISP = '1'
> 13100 C STMFDISP IFEQ '1'
> 13200 C EVAL CALLAGIN = '0'
> 13300 C ENDIF
> 13400 C EVAL ERR = '0'
> 13500 C EVAL DIRPTHOFF = 583
> 13600 C EVAL DIRPTHLEN = 15
> 13700 C EVAL DIRPTH = '/mhprfl'
> 13800 C EVAL NEWPTHOFF = 849
> 13900 C EVAL NEWPTHLEN = 92
> 14000 C EVAL NEWPTH = '/mhprfl/' This is where I am creating the name for it to
> 14100 C* + %char(%date():*ISO0) + '/' be on the IFS - in a folder called mhprfl, then
> 14200 C + %trim(payym) + '/' a subfolder under that ccyymm, then in
> 14300 C + %trim(payymd) + '/' a subfolder under that ccyymmdd, then the
> 14400 C + %trim(JOBWS) + '_' file name is job workstation, user, number,
> 14500 C + %trim(JOBUSR) + '_' spool file, user data (if any) and .pdf
> 14600 C + %editc(JOBNUM:'X') + '_'
> 14700 C + %editc(wrkno:'X') + '_'
> 14800 C + %trim(splid2) + '_'
> 14900 C + %trim(usrdt2) + '.pdf'
> 15000 C EVAL PUBAUTOFF = 966
> 15100 C EVAL PUBAUTLEN = 8
> 15200 C EVAL PUBAUT = '*EXCLUDE'
> 15300 C EVAL SPFLDISP = '0'
> 15400 C ELSE
> 15500 C ENDIF
> 15600 C SETON LR
ga
nos...@nospam.fmctc.com
Hope this helps and I'd be interested in know how it worked out for
you!