ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Trying to automate starting of writers.

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

  • Trying to automate starting of writers.

    Right now I have a CL program that has the following:

    Code:
    CHGVAR     VAR(&WTR) VALUE('AIRP1')                                         
    STRPRTWTR  DEV(AIRP1) OUTQ(&WTR) ALIGN(*FILE)                               
    MONMSG     MSGID(CPF0906 CPF1338 CPF1764 CPF1842 CPF2115 CPF2207 CPF3303 +  
                 CPF3305 CPF3309 CPF3330 CPF3340 CPF3342 CPF3343 CPF3347 +      
                 CPF3357 CPF3362 CPF3363 CPF3369 CPF336B CPF3418 CPF346A +      
                 CPF346B CPF3463 CPF3464 CPF3478) EXEC(DO)                      
       CHGVAR     VAR(&ERRFLG) VALUE('1')                                       
    ENDDO
    This is repeated for each printer in our system. I'd like to automate this.Every time we add or delete a printer we have to modify the CL program.

    I'd like to automate this. I thought maybe I could change the printers I do ***NOT*** want to start automatically to have ONLINE(*NO) but how do I determine if a device has ONLINE(*NO) set?

    Any ideas?

  • #2
    There is a CL program that IBM supplies that does this called QWCSWTRS (the QWCSWTRS program attempts to start any printer writer for a printer device description that is in VARIED ON status, but it will not attempt to start any remote writers). It's usually called in the system startup program, but you could call it anytime. If you don't want to use that program then you could retrieve the source to see the logic (it looks like it's using the QDCLCFGD api to get a list of the configuration descriptions).

    Comment


    • #3
      Thanks. Before my time - the call to this was removed from the startup program because of a few printers that used a different outq than the standard - at least one of them had reports going to the std outq but didn't want those to print... so they did that through a series of STRPRTWTRs.

      I'm down to one - yay! I'm not sure I'll be able to overcome that one...

      Comment


      • #4
        Another way to do it is to change the startup program to individually start any writers that use a different outq and then call QWCSWTRS to start the rest of the writers. QWCSWTRS will not start any writers already started. Using this method you don't have to change the online at IPL parameter.

        Comment


        • Brian Rusch
          Brian Rusch commented
          Editing a comment
          "Using this method you don't have to change the online at IPL parameter." Unless you have a writer that you do not want started at all in which case you would have to change the online at IPL parameter to *NO for the device.

      • #5
        Thank you everybody for your input!

        Comment

        Working...
        X