• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Admin Alert: Searching for Elusive OS/400 Green-Screen Commands

    August 18, 2004 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.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    WorksRight Software

    Do you need area code information?
    Do you need ZIP Code information?
    Do you need ZIP+4 information?
    Do you need city name information?
    Do you need county information?
    Do you need a nearest dealer locator system?

    We can HELP! We have affordable AS/400 software and data to do all of the above. Whether you need a simple city name retrieval system or a sophisticated CASS postal coding system, we have it for you!

    The ZIP/CITY system is based on 5-digit ZIP Codes. You can retrieve city names, state names, county names, area codes, time zones, latitude, longitude, and more just by knowing the ZIP Code. We supply information on all the latest area code changes. A nearest dealer locator function is also included. ZIP/CITY includes software, data, monthly updates, and unlimited support. The cost is $495 per year.

    PER/ZIP4 is a sophisticated CASS certified postal coding system for assigning ZIP Codes, ZIP+4, carrier route, and delivery point codes. PER/ZIP4 also provides county names and FIPS codes. PER/ZIP4 can be used interactively, in batch, and with callable programs. PER/ZIP4 includes software, data, monthly updates, and unlimited support. The cost is $3,900 for the first year, and $1,950 for renewal.

    Just call us and we’ll arrange for 30 days FREE use of either ZIP/CITY or PER/ZIP4.

    WorksRight Software, Inc.
    Phone: 601-856-8337
    Fax: 601-856-9432
    Email: software@worksright.com
    Website: www.worksright.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Wake Up, Sunrise 2005 Is Almost Here Midrange i5s Versus the iSeries, Revisited

    Leave a Reply Cancel reply

Volume 4, Number 28 -- August 18, 2004
THIS ISSUE
SPONSORED BY:

Advanced Systems Concepts
Guild Companies
COMMON

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

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Liam Allan Shares What’s Coming Next With Code For IBM i
  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • IBM i PTF Guide, Volume 27, Number 25
  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle