Working with Printers, All Printers, Please.

Manage local, LAN, and remote output queue writers with one command.

In the previous installment of APIs by Example, “Work Management APIs: Keeping an Eye on Job Activity,” I noted that the beauty of APIs is that they give you the opportunity to accommodate specific requirements as challenges arise. The Work with Printers (WRKPRT) command we’ll examine in this article is yet another example that demonstrates the power and versatility of API programming. To cover the requirements part of the equation for this article, I was fortunate to receive help and inspiration from Peter Kemp of Melbourne, Australia.

I’ve previously published the Work with LAN Printers (WRKLANPRT) and Work with Remote Output Queues (WRKRMTOUTQ) commands, which provide management capabilities to LAN printers and remote output queue writers, respectively. Peter suggested a WRKPRT command that would cover local, LAN, and remote output queue writers, all in one. He also recommended that I add an *OUTFILE output option to this command, similar to the feature in Bryan Dietz’s excellent Work with Remote Writer (WRKRMTWTR) utility available at Bryan’s IBM i freeware page. The outcome of the design, build, and test efforts that ensued is the topic of this article.

Download the save file containing the source code.

Read the entire article.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s