[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Automatically Stop and start Print Writers via Script

Posted on 2008-06-09
7
Medium Priority
?
985 Views
Last Modified: 2013-12-06
I don't know if this is possible without doing some programming, but does anyone know if you can use a script  that would end all print writers and start them back on the AS400?  

I have both devices and remote outques setup in my environment, and I would need to be able to manage all of them if possible.  I would like to be able to End the writer, vary off the device(where applicable), Vary the device back on, and then start the writer.  

I don't think that you can do this without a CL program, but I wanted to be sure.  
0
Comment
Question by:mdennis4422
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 21747295
If you end the QSPL subsystem, it'll end all writers - local and remote.  If you need to vary the devices off and on, you'll have to do that individually unless you have a naming convention that uniquely identifies printers.  



PGM
ENDSBS QSPL *IMMED
DLYJOB DLY(600)  /* Wait to allow subsystem to end */
VRYCFG CFGOBJ(PRT*) CFGTYPE(*DEV) STATUS(*OFF) /* If there is a naming convention */
 
or
 
VRYCFG PRINTER1 *OFF
VRYCFG PRINTER2 *ON
...
 
VRYCFG CFGOBJ(PRT*) CFGTYPE(*DEV) STATUS(*ON)
 
-or-
VRYCFG PRINTER1 *ON ...
...
 
STRSBS QSPL
ENDPGM

Open in new window

0
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 21747307
CL is the AS/400 scripting language.  Are you looking for a way to do this from another scripting language?  If so, what scripting language?
0
 
LVL 3

Author Comment

by:mdennis4422
ID: 21747717
Actually, I am looking for whatever way is possible.  I am not a programmer, I do have some experience with Visual Basic scripts but that is limited.  If I stop the QSPL subsystem and restart it, does it restart each writer?  Can I run the above commands individually from the job scheduler?  
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 13

Accepted Solution

by:
_b_h earned 1000 total points
ID: 21748126
To end all writers, use:
ENDWTR WTR(*ALL) OPTION(*IMMED)  
To start print writers, use:
STRPRTWTR DEV(*ALL)
To start remote writers, use:
STRRMTWTR OUTQ(*ALL)

My recollection is that starting QSPL will start remote writers through an autostart job entry, but print writers need to be started separately. You could add another autostart job entry, keeping in mind that is a change to an IBM object that must be documented for future upgrades.

What is the requirement for varying off and on the devices?




0
 
LVL 27

Expert Comment

by:tliotta
ID: 21748312
mdennis4422:

Because you have both physical devices and remote output queues, your environment seems complex enough that care should be taken. Not because something will get broken, but because it might take some time determining what might have gone wrong with some unusual printer device or non-standard output queue. It can be tricky enough just trying to handle someone's iSeries Access printer emulation session when we don't know that that's what we're dealing with.

Before jumping into a fully automated end/restart scenario, how about providing a little background on what the business problem is? Why is this needed? What is it expected to provide?

Tom
0
 
LVL 3

Author Comment

by:mdennis4422
ID: 21756293
I was asked to find out how to do this from out Sr level management.  We outsource our first level help desk calls and the number one ticket producer in the mornings is printers that are not started for whatever reason.   He wanted to stop and restart all printers to try to prevent this from being the number one item on the list each month.  I told him that I would check around and see.  I did not know that you could specify an *all with the commands above.  I don't think that it is a good idea to do this, however most of the time I have to prove to him that it will cause more problems than it is worth before he will believe me.  I just wanted to get some more input before I answered his question.....
0
 
LVL 27

Expert Comment

by:tliotta
ID: 21756727
mdennis4422:

Can you determine if the major 'problem' printers are serviced through printer device descriptions or remote *outqs? Has anybody determined a reason why the printer users aren't allowed simply to start the printers themselves?

(Purely personal preference here, but I have always approached systems as belonging to the users. Whenever I could supply them with control over their own resources, problems would start to fade. Starting/stopping/holding printers was a common capability to grant, as long as it was for their own files.)

Tom
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction How to create multiboot configuration with XP\Vista and Windows 7 on it? And most important question - how to do this correctly so not to have any kind of nightmares we get when system gets screwed? First of all one should realize t…
In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question