Sunday, August 26, 2012

Automate Your AS/400 With This Swiss Army Tool

When it comes to pulling out the Swiss army knife of all the tools available on the AS/400, iSeries and new IBM i midrange platforms you use a programming language called Control Language, or almost universally known as ?CL? to insiders.

Now when I say programming language, do not despair in believing you have to have some alphabet soup credentials or college programming wizard degree to be able to comprehend and utilize CL. It writes out as easily as a scripting language you may already be familiar with, and if you can string together phrases then you can write control language programs.

Do you enter commands directly onto the command line of the system today? Great, now you know how to write CL programs. Because any command you enter on a command line can be slapped together into a CL program with just a bar minimum of structuring and formatting.

One of my more favorite uses for CL is to fully automate tasks when used in conjunction with the included AS/400 job scheduler program. You don?t even need the fancy advanced job scheduler on the AS/400 or a third party program, the plain one will do.

Do you have a bunch of queries that are normally run by you each day? That is a perfect task to automate using CL and the run query command RUNQRY. Did you know that you can pass parameters to your Query/400 queries? Know with a little variable magic in your CL program you can pass a date parameter to your query.

Do you need several copies of the report to print in various places? CL has you covered by using the override with printer file command OVRPRTF you can create several copies of the spool file and move them to whatever output queues needed. You can even save the resultant report to a database file. How cool is that? CL makes it all happen.

One of the more nifty utilities I have put together using CL was a fully automated full system save backup routine. Using a simple little program it brought the AS/400 down to restricted mode by ending all of the subsystems, ran a save entire system exactly like using the ?go save 21? option onto the tape drive, executed a reclaim storage and more.

Now we are talking about some useful utilities that can be crafted. As you can see there is almost no limit to what can be done with CL.

To get started cranking out CL simply fire up the Program Development Manager with the STRPDM command and create a source physical file with the ?CLLE? type. Each CL program begins with STRPGM and ends with ENDPGM on a separate line, sandwiched in between those two lines of code you place your ordinary commands that you would otherwise enter on the command line. Pretty easy, huh?

When entering in your CL program if you get stuck on a command or forget a parameter for a specific command, not a problem. When editing a file using the source entry utility you can always press the F4 key to prompt a command and fill in the blanks, or in this case the parameters you want, and when you press enter the enter command with all the parameters you entered is validated and placed right into your source code file for you automagically.

Discover John Andersen?s Power System Jump Start that will show you a guaranteed method to quickly and easily create CL programs for managing your AS/400, iSeries and IBM I power system platforms in just a few short hours.

John Andersen has over ten years of experience managing AS/400 systems. Check out his site at http://www.midrangejumpstart.com and discover his best kept secrets for quickly getting up to speed on an AS/400, iSeries or IBM i platform.

.

Source: http://www.articlesbd.com/articles/232542/1/Automate-Your-AS400-With-This-Swiss-Army-Tool/Page1.html

prometheus movie posterior michelle obama adam lambert arrested barkley beltran space ball

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.