This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

win$printer

Is there any way of getting the tray names from the printer properties so they can be displayed as the driver states not what is in the general table provided in the winprint.def library

User does not know what to select when running via AcuGT runtime compared to other applications as tray selection is different

  • 0

    WINPRINT-GET-PRINTER-MEDIA  - www.microfocus.com/.../BKPPPPLIBRS307.html

    CALL "WIN$PRINTER"
        USING WINPRINT-GET-PRINTER-MEDIA, WINPRINT-MEDIA
        GIVING RESULT

    SW Engineering(QA)  

    Although I am an OpenText employee, I am speaking for myself and not for OpenText.
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

  • 0 in reply to 

    I think that only returns the tray numbers available for the printer not the descriptions of the trays

  • 0 in reply to 

    Have you tried the prndemox.cbl example program? I only have a simple printer, but the program does show the tray names.

    SW Engineering(QA)  

    Although I am an OpenText employee, I am speaking for myself and not for OpenText.
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

  • 0 in reply to 

    Yes but the names that show are those stored in the table within WINPRINT.DEF which is hard coded and does relate in part to the tray types (see tables below). However, they are not necessarily the names used within the printer driver when displayed via the windows API in other apps.

    03 WINPRINT-CURR-TRAY SIGNED-SHORT.
    88 WPRT-UPPER-TRAY VALUE 1.
    88 WPRT-LOWER-TRAY VALUE 2.
    88 WPRT-MIDDLE-TRAY VALUE 3.
    88 WPRT-MANUAL-TRAY VALUE 4.
    88 WPRT-ENVELOPE-TRAY VALUE 5.
    88 WPRT-ENVMANUAL-TRAY VALUE 6.
    88 WPRT-AUTO-TRAY VALUE 7.
    88 WPRT-TRACTOR-TRAY VALUE 8.
    88 WPRT-SMALLFMT-TRAY VALUE 9.
    88 WPRT-LARGEFMT-TRAY VALUE 10.
    88 WPRT-LARGECAPACITY-TRAY VALUE 11.
    88 WPRT-CASSETTE-TRAY VALUE 14.
    88 WPRT-FORMSOURCE-TRAY VALUE 15.

    03 PAPER-TRAYS.
    05 FILLER PIC X(34) VALUE "Upper tray".
    05 FILLER PIC X(34) VALUE "Lower tray".
    05 FILLER PIC X(34) VALUE "Middle tray".
    05 FILLER PIC X(34) VALUE "Manual".
    05 FILLER PIC X(34) VALUE "Envelope tray".
    05 FILLER PIC X(34) VALUE "Manual envelope".
    05 FILLER PIC X(34) VALUE "Auto".
    05 FILLER PIC X(34) VALUE "Tractor feeder".
    05 FILLER PIC X(34) VALUE "Small format tray".
    05 FILLER PIC X(34) VALUE "Large format tray".
    05 FILLER PIC X(34) VALUE "Large capacity tray".
    05 FILLER PIC X(34) VALUE "Cassette tray".
    05 FILLER PIC X(34) VALUE "Form source tray".
    03 PAPER-TRAY-TABLE REDEFINES PAPER-TRAYS PIC X(34)
    OCCURS MAX-PAPER-TRAYS.

  • 0  

    This is not currently supported by WIN$PRINTER, but could be. You need to raise an enhancement request for this.

  • 0

    Hi,

    please have a look at this ticket: https://community.microfocus.com/cobol/acucobol/f/forumid-20/346129/win-print-and-undefined-tray-number-values

    This discussion is quite old but perhaps it gives you a push in the right direction.