Newsletters   Subscriptions  Forums  Store  Media Kit  About Us  Contact  Search   Home 
fhg
Volume 4, Number 28 -- August 18, 2004

Admin Alert: Searching for Elusive OS/400 Green-Screen Commands

by Joe Hertvik


In spite of many recent graphical enhancements to OS/400, sometimes the fastest way to finish your work is by running an old-fashioned 5250 green-screen command. But the problem with green-screen commands is that you need to know the exact command name in order to run it, and executing the right command sometimes depends on how good your memory is. Fortunately, IBM offers a few easy to remember green-screen utilities for finding the right command at the right time.

The first place to stop during your command search is at the Major Command Groups menu. You can reach the MCG menu simply by pressing the F4 key from any OS/400 command line. The menu lets you browse through all the commands that are listed under 23 different groupings. These groupings include menu options for finding and running all the save and restore commands (option 6), print commands (option 10), and program commands (option 13). Each command group menu also contains a list of related commands, such as displaying all the tape commands as a menu item inside the save and restore commands menu. The MCG menu is a good reference for finding that one command you may have forgotten.

If you don't want to search through the Major Command Groups menu, you can use Select Command (SLTCMD). This command is good for finding and executing commands when you know the command name you want to execute but not its location, or when you only know part of the command name. For example, I created a command called DSPQSYSOPR in my shop for displaying the system operator message queue in a certain way. If that command wasn't in my library list, I could find and execute it by running the following SLTCMD command:

SLTCMD CMD(*ALL/DSPQSYSOPR)

In this case, SLTCMD would search every library on my iSeries or AS/400 (as designated by the *ALL part of the Command parameter (CMD) until it found all the commands named DSPQSYSOPR in my system. SLTCMD produces a list containing the target commands, and I can prompt and run any command in that list by placing a 1 in front of the command's entry and pressing Enter. Note that executing the command from the SLTCMD list is the same as typing in the command name and then pressing the F4 key for parameter prompting.

SLTCMD can also be used to produce a wildcard list of commands that begin with a certain string. If, for example, I knew I wanted to work with OS/400 documents (DOC) but didn't know the exact command to use, I could enter SLTCMD like this:

SLTCMD CMD(WRKDOC*)

And SLTCMD would show me all the commands in my library list that start with the string WRKDOC. I could then select the one I wanted to execute, and I'd be on my way. Also notice that you can use SLTCMD to search for commands in a specific library or in a number of different libraries by changing the library part of the CMD parameter. Using the WRKDOC* example, we can look for our target commands in a number of different places just by manipulating the libraries we ask SLTCMD to search through. Here are some of the different SLTCMD search permutations we could run:

  • SLTCMD CMD(*ALL/WRKDOC*) to look in all libraries on the system.

  • SLTCMD CMD(*LIBL/WRKDOC*) to look in the user library list, which is the default setting.

  • SLTCMD CMD(*CURLIB/WRKDOC*) to look only in the user's current library.

  • SLTCMD CMD(*USRLIB/WRKDOC*) to look in the user part of the library list.

  • SLTCMD CMD(*ALLUSR/WRKDOC*) to look in all user libraries on the system.

  • SLTCMD CMD(LIBNAME/WRKDOC*) to look only in the specific library you hard-coded into the command.

SLTCMD is also available as option 3 from the Major Command Groups menu.

The final place to search for specific commands is the Verb Commands menu, which you can reach by typing GO VERB at any OS/400 command line (this menu is also available as option 2 of the Major Command Groups menu). The Verb Commands menu is handy for finding commands based on the OS/400 verb used in the command's name (like WRK, ADD, or DLT). So if you wanted to find a command to copy a library (which starts with the literal CPY), you could go to the Verb Commands menu and select option 18, Copy Commands. For Delete Commands (DLT), you would select option 25, and for commands that start with WRK (work), you would select option 88, Work Commands. In OS/400 V5R2, there are up to 88 verb categories listed on the Verb Commands menu. However, to find a specific command, it may be quicker to use the Major Command Groups menu, the Subject Commands menu, or the Select Command command.

Sponsored By
COMMON

COMMON Fall 2004
IT Education Conference & Expo
Toronto, Ontario
October 17-21, 2004

Register Now!

World-class education on iSeries issues, with a special educational focus on Enterprise Application Modernization.

What is COMMON? It's the largest users group of IBM and IBM-compatible IT professionals, and it holds two education conferences per year.

Whether you're a COMMON Conference veteran or you've never been to one, attend COMMON in Toronto. You'll be one of hundreds of IT users who empowers their future by attending top education sessions, hands-on labs, workshops, forums, networking events and the industry's largest Expo. Explore the latest technologies in the Expo, network at COMMON socials, and get IBM to listen to you in the iSeries Nation Town Hall Meeting.


Editors: Howard Arner, Joe Hertvik, Ted Holt,
Shannon O'Donnell, Kevin Vandever
Managing Editor: Shannon Pastore
Contributing Editors: Joel Cochran, Wayne O. Evans, Raymond Everhart,
Bruce Guetzkow, Marc Logemann, David Morris
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.


THIS ISSUE
SPONSORED BY:

Advanced Systems Concepts
Guild Companies
COMMON


BACK ISSUES

TABLE OF
CONTENTS
Use Named Constants to Write Clearer Code

Securely Resetting Disabled User Profiles

Admin Alert: Searching for Elusive OS/400 Green-Screen Commands


The Four Hundred
Fast400 Founder Sues IBM

SSA Global Delivers First Product in ERP Convergence Strategy

California Software, Unisys Chase OS/400 Base

Four Hundred Stuff
IBM Launches the eServer i5 Model 550 After All

Which Thin Client Makes Sense, Or Does Any?

Profound Logic Streamlines Development with RPGsp 3.0

Four Hundred Monitor


Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.
Guild Companies, 50 Park Terrace East, Suite 8F, New York, NY 10034
Privacy Statement