writing out to virtual printer

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf writing out to virtual printer

  • Creator
    Topic
  • #48151
    Kathy Young
    Participant

      Does anyone have threads that send output to a virtual printer? (Cloverleaf 5.3 on AIX 5.3). I need to send messages out to a thread where the receiving system is a virtual printer. I know how to set up the print spooling in AIX, I just can’t figure out the NetConfig. Do I write it to a file and write a tcl to move messages to the print queue?

      Thanks in advance!

      Kathy

    Viewing 4 reply threads
    • Author
      Replies
      • #57846
        Nathan Martin
        Participant

          If you haven’t already, see the man pages for lp or lpr.

          Your Tcl proc can print data through standard input, or if you prefer, write a temporary file first.

        • #57847
          Kathy Young
          Participant

            Nathan –

            This sounds like it should be elementary, but I’m having trouble with the thread definition. What protocol do I use? Where do I apply the Tcl.

            I’m almost there with the Tcl – it’s the thread definitions that I’m stumbling over.

            Thanks, Kathy

          • #57848
            Nathan Martin
            Participant

              You could build a UPoC protocol handler that manages thread status and “writing” messages to the printer.  But, almost any “user point of control” or “TPS” in almost any protocol thread could do the work.

              For example, it might be easiest to make a file thread that writes to /dev/null and calls your print routine from the outbound data proc.

              Found an example in the scripts area:

              https://usspvlclovertch2.infor.com/viewtopic.php?t=179” class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=179

              Either way, more error checking might be good:  If the print command fails, you could send a copy of the message to the ERROR database.  Alternatively, you could KILL successfully printed messages and continue any failed ones to a file or other thread.  There are almost too many  options.

            • #57849
              Ben Michael
              Participant

                Hi There,

                Does anyone have an example of TCL to dump the message ‘as is’ to a printer.

                And if possible – where it fails to kick off that command dumps output in the error database.

                Thanks,

                Ben

              • #57850
                Kevin Kinnell
                Participant

                  Whups, too little information Ben.     😉

                  Are you wanting to dump the ‘control’ characters (“r”,”n”) as is?  Or do you want

                  to have the kind of output an ultra-long error db dump produces for the message?

                  Is that what you mean by not triggering the db dump?

                  Where are you going to use the Tcl, at a UPoC?

                  Any code is probably contingent on what you’re trying to do.

              Viewing 4 reply threads
              • The forum ‘Cloverleaf’ is closed to new topics and replies.