× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Jeff

This is getting to a point where a call to IBM support is in order - since I've done some of that, I'll see if I can help more - but if not, get a support ticket going.

You will not be able to display an AFPDS file in WRKSPLF - if you have ACS you can see printer output in one of the Actions menu items, where you opt to view a spooled file.

Or if you have the older IBM i Access client, there is a printed output section in Ops Navigator.

If you don't have one of those, you can try CPYSPLF with the *TOSTMF and *PDF options - this lets you put a PDF in the IFS - see if the image is there when you do that.

If you do not see the image, I've a couple things to ask:

1. What version of the OS?
   a. You need to be at 7.1 or later to get the CPYSPLF PDF support
   b. Host Print Transform did not support this keyword until 7.2.- but the CPYSPLF should still work

That's about as far as I can think to go - after this IBM support is the place to go.

Good luck
Vern

On 4/22/2019 12:21 PM, Jeff Bianchi wrote:
Hi Vern,

I noticed that you have your image parm defined as type *PNAME. Mine was *CHAR so I changed it to your value. Still no joy.

Question -- Should I be able to 'see' the spooled file before it's sent to an AFP print? When I try to display the spooled file using option 5, I get a message telling it cannot be displayed, copied, or sent -- as expected.

I have been using the Help Systems' ESEND tool to email myself a copy of the spooled file with a conversion to PDF.

Bottom line is that the PDF I'm getting is empty.

I don't have a clue as to what I'm doing wrong.

Thanks!


Jeff

date: Mon, 22 Apr 2019 10:27:12 -0500
from: Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
subject: Re: RPG400-L Digest, AFPRSC issues

Hi Jeff

All quite strange - someone else asked about using %trim - I don't think you need that, my example below doesn't use it and works.

Here are the source members for my test bed - the command behaves a bit strangely around the MORETEXT parameter, no need for testing to clean it up.? :)

PRTIMAGE command
? CMD??????? PROMPT('Print image using AFPRSC')

? PARM?????? KWD(IMAGEFILE) +
?????????????? TYPE(*PNAME) +
?????????????? LEN(128) +
?????????????? MIN(1) +
?????????????? PROMPT('Image file name') ? PARM?????? KWD(IMAGETYPE) + ?????????????? TYPE(*CHAR) + ?????????????? LEN(10) + ?????????????? SPCVAL((*GIF '22') (*JPEG '23') (*PNG '65') (*TIFF '14')) + ?????????????? MIN(1) + ?????????????? PROMPT('Image file type') ? PARM?????? KWD(TOP) + ?????????????? TYPE(*DEC) + ?????????????? LEN(5 3) + ?????????????? MIN(1) + ?????????????? PROMPT('Top') ? PARM?????? KWD(LEFT) + ?????????????? TYPE(*DEC) + ?????????????? LEN(5 3) + ?????????????? MIN(1) + ?????????????? PROMPT('Left') ? PARM?????? KWD(WIDTH) + ?????????????? TYPE(*DEC) + ?????????????? LEN(5 3) + ?????????????? MIN(1) + ?????????????? PROMPT('Width') ? PARM?????? KWD(HEIGHT) + ?????????????? TYPE(*DEC) + ?????????????? LEN(5 3) + ?????????????? MIN(1) + ?????????????? PROMPT('Height') ? PARM?????? KWD(MAPOPT) + ?????????????? TYPE(*CHAR) + ?????????????? LEN(3) + ?????????????? SPCVAL((*Pos *P) (*PosTrm *PT) (*SclFit *ST) (*CtrTrm *CT) + ?????????
????? (*SclFil *SL)) + ?????????????? MIN(1) + ?????????????? CASE(*MIXED) + ?????????????? PROMPT('Map option') ? PARM?????? KWD(MORETEXT) + ?????????????? TYPE(*CHAR) + ?????????????? LEN(18) + ?????????????? MIN(1) + ?????????????? PROMPT('Additional text') ? PARM?????? KWD(PATH) + ?????????????? TYPE(*CHAR) + ?????????????? LEN(640) + ?????????????? MIN(1) + ?????????????? PROMPT('Image file path')

RPGLE program-
?????? ctl-opt DFTACTGRP(*NO) ACTGRP(*NEW) OPTION(*SRCSTMT: *NODEBUGIO); ?????? ctl-opt THREAD(*SERIALIZE);

?????? dcl-f PrtImage printer;

?????? dcl-pr entryPList extpgm('PRTIMAGE'); ???????? imageFile char(128) const; ???????? imageType char(10) const; ???????? top packed(5 : 3) const; ???????? left packed(5 : 3) const; ???????? width packed(5 : 3) const; ???????? height packed(5 : 3) const; ???????? mapOpt char(3) const; ???????? moreText char(18) const; ???????? path char(640) const; ?????? end-pr; ?????? dcl-pi entryPList; ???????? imageFile char(128) const; ???????? imageType char(10) const; ???????? top packed(5 : 3) const; ???????? left packed(5 : 3) const; ???????? width packed(5 : 3) const; ???????? height packed(5 : 3) const; ???????? mapOpt char(3) const; ???????? moreText char(18) const; ???????? path char(640) const; ?????? end-pi;

?????? *inlr = *on;
?????? data = 'This is the Image Print Test program: ' + moreText; ?????? imgDown?? = top; ?????? imgAcross = left; ?????? imgWidth? = width; ?????? imgHeight = height; ?????? imgFile?? = imageFile; ?????? imgPath?? = path; ?????? imgType?? = imageType; ?????? imgMapOpt = mapOpt; ?????? write image; ?????? write text; ?????? return;

PRTF-
???? A????????? R TEXT????????????????????? SPACEA(1) ???? A??????????? DATA????????? 56A??????? 2SPACEA(1) ???? A????????? R IMAGE???????????????????? AFPRSC(&IMGFILE &IMGTYPE + ???? A???????????????????????????????????????????? &IMGDOWN &IMGACROSS + ???? A???????????????????????????????????????????? (*PATH &IMGPATH) + ???? A???????????????????????????????????????????? (*MAPOPT &IMGMAPOPT)?? + ???? A???????????????????????????????????????????? (*SIZE &IMGWIDTH
&IMGHEIGHT))
???? A??????????? IMGWIDTH?????? 5S 3P
???? A??????????? IMGHEIGHT????? 5S 3P
???? A??????????? IMGDOWN??????? 5S 3P
???? A??????????? IMGACROSS????? 5S 3P
???? A??????????? IMGFILE????? 125A? P
???? A??????????? IMGTYPE?????? 10A? P
???? A??????????? IMGMAPOPT????? 3A? P
???? A??????????? IMGPATH????? 640A? P

On 4/22/2019 8:27 AM, Jeff Bianchi wrote:
Hi Vern,

I have verified that QOpenSys is being passed in correctly. I've also tried putting the resource in /home/<myhomedirectory>.

No difference in behavior -- and no error in the joblog. In fact, no messages in the joblog at all. After I run my command, I do the F10 to see detailed messages and I get nothing.



Jeff

date: Fri, 19 Apr 2019 12:36:24 -0500
from: Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
subject: Re: AFPDS Printer File Format Keyword: AFPRSC

Hi Jeff

I have a similar example - we use AFPRSC in production - my question - /QOpenSys is case-sensitive - be sure the case of your passed value is correct.

I just jumped into this thread - do you have a joblog message giving you and error code of any kind? A number in the 3000's?

HTH
Vern





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.