× 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.



Hello Martin

 - and Happy New Year to you too!

Here's a quick example of the QSPROUTQ (Retrieve output queue information)
API which should give you the information you're after. The Connection type
2 identifies a TCP/IP network connected remote writer:

     **-- Header
pecification:  ---------------------------------------------**
     H Option( *SrcStmt )
     **-- API error data
tructure:  -----------------------------------------**
     D ApiError        Ds
     D  AeBytPrv                     10i 0 Inz( %Size( ApiError ))
     D  AeBytAvl                     10i 0
     D  AeExcpId                      7a
     D                                1a
     D  AeExcpDta                   128a
     **-- Output queue information
tructure:  -------------------------------**
     D OUTQ0200        Ds
     D  O2BytRtn                     10i 0
     D  O2BytAvl                     10i 0
     D  O2OutQnam                    10a
     D  O2OutQlib                    10a
     D  O2FilOrd                     10a
     D  O2DspAnyF                    10a
     D  O2JobSep                     10i 0
     D  O2OprCtl                     10a
     D  O2DtaQnam                    10a
     D  O2DtaQlib                    10a
     D  O2AutChk                     10a
     D  O2NbrF                       10i 0
     D  O2OutQsts                    10a
     D  O2OutQtxt                    50a
     D  O2NbrSplFpag                 10i 0
     D  O2NbrWtrStr                  10i 0
     D  O2AutWtrStr                  10i 0
     D  O2RmtSysNamTp                 1a
     D  O2RmtSysNam                 255a
     D  O2RmtPrtQ                   128a
     D  O2MsgQnam                    10a
     D  O2MsgQlib                    10a
     D  O2ConTyp                     10i 0
     D  O2DesTyp                     10i 0
     D  O2VmMvsCls                    1a
     D  O2FrmCtlBuf                   8a
     D  O2HstPrtTfr                   1a
     D  O2MnfTypMod                  17a
     D  O2WscObjNam                  10a
     D  O2WscObjLib                  10a
     D  O2SplFaspA                    1a
     D  O2OfsMxSpfPge                10i 0
     D  O2NbrPgeRtn                  10i 0
     D  O2LenPgeRtn                  10i 0
     D  O2OfsWtrE                    10i 0
     D  O2NbrWtrRtn                  10i 0
     D  O2LenWtrRtn                  10i 0
     D  O2DesOpt                    128a
     D  O2WtrTypStr                   1a
     D  O2PrtSepPag                   1a
     D  O2RmtPrtQLong               255a
     D                                3a
     D  O2OthFlds                   120a
     D  O2Data                     1024a
     **
     D O2MxSpfPge      Ds
     D  O2Nbrpag                     10i 0
     D  O2StrTim                      8a
     D  O2EndTim                      8a
     **
     D O2WtrE          Ds                  Based( pWtrE )
     D  O2WtrJobNam                  10a
     D  O2WtrJobUsr                  10a
     D  O2WtrJobNbr                   6a
     D  O2WtrJobSts                  10a
     D  O2PrtDevNam                  10a
     **
     D PxOutqNam       s             20a
     D PxWtrSts        s             12a
     **-- Retrieve output queue
nformation:  --------------------------------**
     D RtvOutqInf      Pr                  ExtPgm( 'QSPROUTQ' )
     D  RqRcvVar                  32767a          Options( *VarSize )
     D  RqRcvVarLen                  10i 0 Const
     D  RqFmtNam                      8a   Const
     D  RqOutQ                       20a   Const
     D  RqError                   32767a          Options( *VarSize )
     **
     **-- 
ainline:  ---------------------------------------------------------**
     **
     C     *Entry        Plist
     C                   Parm                    PxOutqNam
     C                   Parm                    PxWtrSts
     **
     C                   Eval       PxWtrSts    = *Blanks
     **
     C                   CallP     RtvOutqInf( OUTQ0200
     C                                       : %Size( OUTQ0200 )
     C                                       : 'OUTQ0200'
     C                                       : PxOutqNam
     C                                       : ApiError
     C                                       )
     **
     C                   If         AeBytAvl    = *Zero
     **
     C                   If         O2ConTyp    = 2
     C                   Eval       PxWtrSts    = 'STOPPED'
     **
     C                   If         O2NbrWtrRtn > *Zero
     C                   Eval       pWtrE       =  %Addr( OUTQ0200 ) +
     C                                             O2OfsWtrE
     **
     C                   Select
     C                   When       O2WtrJobSts = 'STR '
     C                   Eval       PxWtrSts    = 'ACTIVE'
     **
     C                   When       O2WtrJobSts = 'END '
     C                   Eval       PxWtrSts    = 'STOPPED'
     **
     C                   When       O2WtrJobSts = 'JOBQ'
     C                   Eval       PxWtrSts    = 'STARTING'
     **
     C                   When       O2WtrJobSts = 'HLD '
     C                   Eval       PxWtrSts    = 'BEING HELD'
     **
     C                   When       O2WtrJobSts = 'MSGW'
     C                   Eval       PxWtrSts    = 'MESSAGE WAIT'
     C                   EndSl
     **
     C                   EndIf
     C                   EndIf
     C                   EndIf
     **
     C                   Return
     **

Best regards,
Carsten Flensburg

----- Original Message ----- 
From: "Saunders, Martin P" <martin.saunders@xxxxxxxx>
To: <midrange-l@xxxxxxxxxxxx>
Sent: Wednesday, December 31, 2003 1:04 PM
Subject: Commands or APIs for working with remote writers


> Hello and Happy New Year to all,
>
> Users in the shops currently have a screen which lists their printers,
shows
> the status and gives them the option to start, end etc.  Some of the newer
> printers on the system have been set up as remote writers and this program
> as it stands will not recognize them.  The program is using QSPRWTRI to
get
> the writer info but this API does not appear to return any information for
> remote writers, just a CPF33C8 message.  Is there a CL command or API I
can
> use to determine if an OUTQ is attached to remote writer and/or determine
> the current status of a remote writer, so I can at least give the users
the
> option to attempt to start it (via STRRMTWTR) if it is not working?


###########################################
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

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.