I examined the value of PSF_Output_Length_Used in debug and the value was
1436, which is the correct lenth that I want PSF to return to me for the output
buffer.
What it *is* doing however is returning the default value of 337 on the second
call.
Output_Data is a data structure with a number of sub-fields defined for it.
IBM support refuses to discuss this saying it is a Consult Line issue.
Any ideas where to look for the problem?
Thanks,
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
----- Original Message ----
From: Mike Roderick <Mike.Roderick@xxxxxxxxxxxxxxx>
To: cooljeff913@xxxxxxxxx
Sent: Friday, April 13, 2007 3:38:26 PM
Subject: FW: PDfMAP program problem
Jeff,
I created a program for the same purpose, but what I did was define
PSF_Ouput_Length_Used = Hex representation of how big the max size of my
Datastructure was going to be. It has worked for me and the process had
been running for more than 6 months.
My first line of /free C Spec
Outinfo = X'00000619'; //This the length in HEX of the
// datastructure e.g. 1561 bytes
Mike
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[
mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Young
Sent: April 13, 2007 4:19 PM
To: midrange-l@xxxxxxxxxxxx; rpg400-l@xxxxxxxxxxxx
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.