Depends on how Output_Data is defined....if it's a varying field his
code should be fine as long as he's not adding additional blanks into
the field...
Thanks,
Tommy Holden
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[
mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
MWHopkins@xxxxxxxxxxxxxxx
Sent: Friday, April 13, 2007 2:30 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: PDfMAP program problem
Don't you need to %Trim the output_data before to get the %len?
If PSF_Output_Length < %Len(%Trim(Output_Data));
Matt Hopkins
Sr. Programmer/Analyst
Web: www.pdpgroupinc.com
Email: MWHopkins@xxxxxxxxxxxxxxx
Office: 410-584-0330
Fax: 410-584-0336
Jeff Young <cooljeff913@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
04/13/2007 03:18 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To
midrange-l@xxxxxxxxxxxx, rpg400-l@xxxxxxxxxxxx
cc
Fax to
Subject
PDfMAP program problem
I have a PDF Mapping program that I created for use with Infoprint
Server
(5722IP1).
The ultimate goal for this program is to send an AFPDS spool file as an
email attachment.
After setting up the Printer Device and PSF Config Object, I set out to
write my program.
According to the documentation, PSF initialy sends a small area for the
Output Buffer that will contain the configuration information. If that
area is less than the size needed by my program, I return the desired
size
to PSF and exit. PSF is then *supposed* to call my program again with
an
output buffer of the size I specified.
What is happening is that the first pass goes as expected, but the
second
time around, it does not pass the desired output buffer size, but rather
the same size that was passed on the first call.
Has anyone any ideas as to what is happening?
When I called IBM Support, they said I needed to talk to the Consult
Line
people as this was a problem in my program.
Below is the pertinant sections of my code:
D*--------------------------------------------------
D PDFMail PR EXTPGM('PDF_MAIL')
D PDFMail PI
D PSF_Input_Data LIKE(Input_Data)
D PSF_Input_Length...
D 10I 0
D PSF_Output_Data...
D LIKE(Output_Data)
D PSF_Output_Length...
D 10I 0
D PSF_Output_Length_Used...
D 10I 0
If PSF_Output_Length < %Len(Output_Data);
PSF_Output_Length_Used = %Len(Output_Data);
Return;
ENDIF;
Jeff Young
Sr. Programmer Analyst
Dynax Solutions, Inc.
A wholly owned subsidiary of enherent Corp.
IBM -e(logo) server Certified Systems Exper - iSeries Technical
Solutions
V5R2
IBM Certified Specialist- e(logo) server i5Series Technical Solutions
Designer V5R3
IBM Certified Specialist- e(logo)server i5Series Technical Solutions
Implementer V5R3
As an Amazon Associate we earn from qualifying purchases.