• 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
    DRV Tech

    Get More Out of Your IBM i

    With soaring costs, operational data is more critical than ever. IBM shops need faster, easier ways to distribute IBM applications-based data to users more efficiently, no matter where they are.

    The Problem:

    For Users, IBM Data Can Be Difficult to Get To

    IBM Applications generate reports as spooled files, originally designed to be printed. Often those reports are packed together with so much data it makes them difficult to read. Add to that hardcopy is a pain to distribute. User-friendly formats like Excel and PDF are better, offering sorting, searching, and easy portability but getting IBM reports into these formats can be tricky without the right tools.

    The Solution:

    IBM i Reports can easily be converted to easy to read and share formats like Excel and PDF and Delivered by Email

    Converting IBM i, iSeries, and AS400 reports into Excel and PDF is now a lot easier with SpoolFlex software by DRV Tech.  If you or your users are still doing this manually, think how much time is wasted dragging and reformatting to make a report readable. How much time would be saved if they were automatically formatted correctly and delivered to one or multiple recipients.

    SpoolFlex converts spooled files to Excel and PDF, automatically emailing them, and saving copies to network shared folders. SpoolFlex converts complex reports to Excel, removing unwanted headers, splitting large reports out for individual recipients, and delivering to users whether they are at the office or working from home.

    Watch our 2-minute video and see DRV’s powerful SpoolFlex software can solve your file conversion challenges.

    Watch Video

    DRV Tech

    www.drvtech.com

    866.378.3366

    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

  • 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
  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23

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