× 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

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.