Home > AS/400 Tips > iSeries administrator tips > Abbreviated commands save precious time
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES ADMINISTRATOR TIPS

Abbreviated commands save precious time


Ron Turull
01.08.2003
Rating: -4.21- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



Ron Turull

No matter what your role, if you work on an AS/400 you have to type a lot of commands. WRKACTJOB, WRKUSRJOB, WRKSPLF, DSPPFM … the list is nearly endless. Most folks aren't perfect typists, and simple logic dictates that the longer the command name, the greater the possibility of mis-typing it. Also, clearly, the longer the command name, the longer it takes to type. This time is probably minimal for just a single command, but add up the times for hundreds of commands a day and you will have a substantial chunk of time.

Old technique still relevant
There is an old technique that has been around the AS/400 world a while, but for newcomers and old-timers alike, it is well-worth discussing again.

There are several variations of this technique, but many start with the Create Duplicate Object (CRTDUPOBJ) command. Let's take the very popular Work with Active Jobs (WRKACTJOB) command. Every AS/400 operator out there has probably typed this command so many times that his fingers can type the command name automatically. Still, fingers make mistakes. Why not abbreviate the command to something much simpler like WAJ?

This is easy enough to do with the Create Duplicate Object (CRTDUPOBJ) command. Simply enter the following command:

CRTDUPOBJ OBJ(WRKACTJOB) FROMLIB(QSYS) OBJTYPE(*CMD) TOLIB(USRSYS) NEWOBJ(WAJ) 

After it has successfully executed, we can now just quickly type WAJ and hit Enter, and we will get the Work with Active Jobs screen.

Now note, the value of the TOLIB parameter on the Create Duplicate Object (CRTDUPOBJ) command above is "USRSYS." This is not a typo. I did not leave off the 'Q'. Avoid using QUSRSYS, since it can be overwritten during system installs and/or upgrades. You can, of course, place your new abbreviated commands in any library you like. I use USRSYS as a "safe" alternative to QUSRSYS.

What about other commands? The above technique works for any command. For example, you can create abbreviated versions of the other commands given as examples earlier. For example, WRKUSRJOB can become WUJ, WRKSPLF can be WSF, and DSPPFM simply DM.

Taking it to the next step
As previously mentioned, there are several variations of this technique. One is to combine it with the use of the Change Command Default (CHGCMDDFT) command.

An example illustrates this technique nicely. A common user desire is to see a list of spool files that he has created during the current sign-on session. In AS/400-speak, the user wants to work with his job's spool files. This is simple enough to do, but it requires a couple of steps. First, you must type the WRKJOB command. But you must also fill in the OPTION parameter with the value "*SPLF," as in WRKJOB OPTION(*SPLF).

To save time, it would be much easier if we had a command abbreviation such as WJS. Let's do it. First, duplicate the WRKJOB command as before:

CRTDUPOBJ OBJ(WRKJOB) FROMLIB(QSYS) OBJTYPE(*CMD) TOLIB(USRSYS) NEWOBJ(WJS)

Next, change the default of the OPTION parameter of our new WJS command. It needs to be changed from "*SELECT" to "*SPLF." To do this, use the Change Command Default (CHGCMDDFT) command, as in:

CHGCMDDFT CMD(WJS) NEWDFT('OPTION(*SPLF)')

Now, simply typing WJS will take you directly to the Work with Job Spooled Files screen. This command alone has personally saved me hours over all my AS/400 login time.

-----------------------------------
About the author: Ron Turull is editor of Inside Version 5. He has more than 20 years experience programming for and managing AS/400-iSeries systems.

==================================
MORE INFORMATION
==================================

  • Use CRTDUPOBJ to create a copy of the RUNQRY command
    Do you often use the RUNQRY command to look at data in a file? Do you often have to use record selection when doing so? If the answer is yes, use CRTDUPOBJ to create a copy of the RUNQRY command.
  • Create dynamic commands in a CL program using QCMDEXC
    Most of us have used QCMDEXC to execute a CL program from an RPG program, but you can also use QCMDEXC to execute a command from a CL program. At first glance that sounds silly, but by using QCMDEXC you can dynamically execute commands that your CL program doesn't have to know about at compile time.
  • Replace Performance Monitor commands in OS/400 V5R1
    When IBM released OS/400 V5R1, it replaced OS/400's Performance Monitor feature with a new Collection Services function that is configured through the Management Central capability of iSeries Operations Navigator. That means many shops migrating to V5R1 must learn to put aside the old green-screen commands that start, stop, end, add and change performance collection data under the Performance Monitor and opt instead for the mostly graphical configuration capabilities that come with Collection Services. Unfortunately, there's a problem with this setup.


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Performance
Top System i admin tips for 2006
Catholic Charities keeps track of homeless with iSeries
i5 error messages: What you need to know
IBM races for clock speed
System shutting down after cleanup
What is the relationship between QZDAOSINIT jobs and QDBSRVnn tasks?
Performance degradation
Top admin tips of 2005
Tuning the auto-tuner
Readers respond to Fast400 settlement

Application Development
iSeries calling an .exe
Top 10 programmer tips
Formatted work job scheduler
Convert system date and time
Mixing free format code with embedded SQL
SQL update a field in one file from a field in another file
Webcasts for iSeries programmers
Programming advice from the pros
Easy code copying via the drag and drop method
Setting FTP time-outs

OS/400
Top 10 backup commands
Take control of your iSeries
How to save time using the CPYTOPCD and CPYFRMPCD commands
Top Q&A's on the OS/400
Top 10 security tips
Use caution when providing access to file shares
How to set up an autostart job
How does Sarbanes-Oxley affect you?
Automated disaster recovery revisited
Top 10 Administrator Tips

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts