sponsored links

Collapse

Announcement

Collapse
No announcement yet.

OVRPRTF in an RPG called Proc - No clue what I'm doing

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • OVRPRTF in an RPG called Proc - No clue what I'm doing

    Hi, all. This is probably something basic, and I hope you forgive me for asking something that may be right in front of my nose.

    1. I don't really understand ILE (working on it!)
    2. I have an RPG program where I am trying to submit a report by using a PROC - that seems to be working (so far, so good, right )?
    3. In the "called" program, I have to go out to some tables to find out what printer the user wants
    4. My file :[INDENT=3]FH1064DWp O E PRINTER UsrOpn OflInd(*In20) [/INDENT] 5. I'm using OVRPRTF to set it up:[INDENT=3]Cmd = 'OVRPRTF FILE(H1064DWp) splfname(H1064DWP)' +
    ' DEV(' + PrtrName + ')' +
    ' COPIES(' + NumCopy + ')' +
    ' OVRFLW(60)' +
    ' HOLD(' + WHOLD + ')' +
    ' SAVE(' + WSAVE + ')' +
    ' USRDTA(' + 'H1064R' + ')' +
    ' OVRSCOPE(*JOB)' ;
    //' OUTQ(' + PrtrName + ')';


    $ExcCmd(Cmd:%Len(Cmd));
    Open H1064DWp;
    PrtOpen = 'Y';
    [/INDENT]
    When I run, the "DEV" is QPRINT instead of the printer name. When I look at my job and display all file overrides, it looks correct, I think...[INDENT=4]File . . . . . . . . . . . . . . : H1064DWP
    Call level . . . . . . . . . . . : *JOB
    Merged . . . . . . . . . . . . . : *NO

    Keyword Value
    File being overridden . . . . . . : FILE H1064DWP
    Device . . . . . . . . . . . . . : DEV ITIBM1872
    Overflow line number . . . . . . : OVRFLW 60
    Output queue . . . . . . . . . . : OUTQ ITIBM1872
    Library . . . . . . . . . . . . . : *LIBL
    Copies . . . . . . . . . . . . . : COPIES 1
    Save spooled file . . . . . . . . : SAVE *YES
    Hold spooled file . . . . . . . . : HOLD *NO
    User data . . . . . . . . . . . . : USRDTA H1064R
    [/INDENT]
    I've searched online for awhile today, but I'm just not having any luck. If anyone can point me in the right direction, I would greatly appreciate it.

  • #2
    Anything in the joblog? You can end up with QPRINT if it can't find the device (e.g. *LIBL issue).

    Comment


    • #3
      In the override, you have the OUTQ parameter commented out. Uncomment that line, then it should work (btw, the DEV parameter is unnecessary).

      Comment


      • #4
        DEV() might or might not be necessary. It might depend on whether or not those device characteristics are wanted. However, I can't recall ever seeing a good discussion of its importance. From somewhere back years ago, I got a (potentially mistaken) idea that specifying a "device" affected the specific control sequences that might become part of the spooled file. Different devices might allow more or fewer controls and might use different sequences.

        But I don't recall ever actually seeing specifics. It'd be nice to see a really good discussion.
        Tom

        There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

        Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

        Comment


        • #5
          The DEV() parameter is only used for non spooled output, spooled output has to go to an output queue. If OUTQ(*DEV) is specified, then you would have to fill in the DEV() parameter, but that's only to find an output queue. From the command help text:
          Device (DEV) - Help
          Specifies a printer device description. For nonspooled output, this identifies the printer device used to produce the printed output. For spooled output, the file is placed on the output queue determined by the OUTQ parameter. If OUTQ(*DEV) is used, the file is placed on the output queue with the same name as the device.

          Comment


          • #6
            I just wanted to say THANK YOU. I was able to do what I needed with your help. I had some problems before and couldn't reply to the post.
            My next trick is going to be updating expiration dates on spool files depending on what the spool file is - that's a long story and I won't bore you with it here. Thank you again!

            Comment

            sponsored links

            Collapse

            Working...
            X