AS400 commands

Connect with our experts
to get all your answers

    AS400 Commands: A Comprehensive List for Developers

    Are you an AS400 developer? Wanting to enhance your AS400 development skills?

    Or you are a technical leader of your organization…

    You can pass this write-up to your AS400 team as a handy tool in their development toolkit.

    According to statistics by IBM, over 50,000 companies globally use IBM i as their base for powering their mission-critical computing-heavy applications. And to ensure the most effective use of the system, they use the critical commands.

    You need a thorough understanding of the AS400 commands that are essential for efficient AS400 system management.

    So, let’s understand what these AS400 programming commands are and how you can make the most of them.

    What Are AS400 Programming Commands?

    IBM developers wrote IBM AS400 programming commands to perform tasks such as backing up data, compiling programs, changing system configurations, and displaying or deleting system object details.

    These commands can handle system-level concerns and can be drafted for user-level applications.

    The common AS400 commands are used most of the time by programmers, system administrators, and users.

    Programming commands on the AS/400 can range from file management to job control, data manipulation, and more.

    Examples include:

    • CRTBNDRPG: Create a bound RPG program.
    • CRTPF: Create a physical file.
    • CRTLF: Create a logical file.
    • STRDBG: Start debugger.
    • ENDDBG: End debugger.
    • DLTF: Delete file.
    • RUNSQL: Run SQL statements.

    Each command has specific parameters that can be set to guide its function, which allows for precise control over programming tasks.

    Now, let’s understand the different AS400 commands you can use for your systems.

    Different Types of AS400 Commands

    The AS400 is known for its integrated operating system, IBM i, and supports different command types that cater to different aspects of system operation and management.

    Here’s a breakdown of the various AS400 command types:

    1. CL Commands (Control Language)

    CL commands are the foundation of the AS400’s command system. They are used to interact with the operating system, control jobs, work with the database, and handle system configurations.

    These commands are recognizable by their three-letter prefixes, such as WRK for work-related commands (e.g., WRKJOBQ – work with job queues) and CRT for creation commands (e.g., CRTLIB – create a library).

    2. SQL Commands (Structured Query Language)

    SQL commands on the AS400 are used to manage and manipulate databases. With the AS400’s integrated DB2 database, SQL commands can perform operations such as querying data, creating tables, and managing database objects.

    Examples include SELECT, INSERT, UPDATE, and DELETE.

    3. RPG Commands

    RPG (Report Program Generator) is a high-level programming language used on the AS400 for business applications.

    While RPG isn’t a command, the system includes commands to compile RPG code (CRTBNDRPG), debug (STRDBG), and manage RPG programs.

    4. System Control Commands

    These AS400 commands are used to start and stop the system and its services.

    For example, PWRDWNSYS powers down the system, and STRSST starts the system service tools.

    5. File and Member Commands

    AS400 uses commands to manage files (physical and logical) and their members (data within the files). Commands such as CRTPF (create physical file) and ADDPFM (add physical file member) fall into this category.

    As these commands are the primary interface for system interaction, you must know the important benefits of using commands in AS400 systems.

    Why are these Commands Essential for AS400 Users?

    AS400 stands out compared to the new computer systems operated through visual interfaces because it relies on text-based commands.

    There are multiple reasons why these commands are so crucial for AS/400 users.

    We have listed the important ones.

    Direct system access

    AS400 commands provide a simple, direct way to communicate with the system that allows users to perform tasks without confusion. It is useful for routine operations and when the AS400 developers need to be sure of the exact action being performed.

    Using commands eliminates the layers of menus and buttons found in GUIs, which can result in minimizing the margin of errors and help in providing desired results.

    Automation

    With AS400 commands, scripts can be set up to handle tasks that need to be repeated, saving time, and ensuring things are done the same way every time by your AS400 programmers.

    Automation can also help you maintain consistency and precision to complete tasks that are difficult to do manually.

    For example, end-of-day processes, data backups, and system maintenance tasks can all be automated using command scripts.

    Once these scripts are tested and in place, they execute the same series of steps reliably every time they’re run.

    Repeatability ensures that processes are completed without variation, which reduces the risk of errors that can arise from manual intervention.

    Control and management

    The AS/400 commands give you a lot of power over the system, letting your AS400 developer manage how it runs and change settings in a detailed way.

    This control is important for keeping the system running smoothly and efficiently.

    Through these commands, you can manage a wide array of system functions, such as:

    • Starting and stopping jobs
    • Monitoring system performance
    • Controlling access to various system resources

    These commands can enable AS400 administrators to adapt to changes in workload or business requirements and implement new processes or modify existing ones.

    Efficiency

    Once your AS400 programmers are skilled and experienced, they can enter a command quickly rather than navigating through a multi-step graphical interface.

    It can increase the response to user input when the programmers have less time, and the decisions are to be made quickly.

    Commands allow for a swift execution of complex sequences that would otherwise take multiple clicks and screen transitions.

    The efficiency extends to executing batch jobs, where a single command can initiate a series of actions.

    Batch processing

    Batch processing using AS400 commands is a powerful feature that enables your AS400 programmers to manage large-scale data operations and automate sequences.

    Commands can be run in groups, or ‘batches,’ which is great for dealing with lots of data or doing a series of tasks when you’re not around. It helps make the best use of the AS400 system’s resources and time.

    For instance, end-of-day processing for financial transactions or batch updates to customer records can be performed without manual intervention.

    The reliability of the AS/400 in executing these batch commands ensures that processes are completed consistently and without errors, which is crucial for maintaining data integrity and operational continuity.

    The importance of using commands is immense, but you must ensure your AS400 programmers have quick access to a tailored command cheat sheet.

    The AS400 Command Cheat Sheet

    We have created a quick reference guide to the most essential commands on the AS400 system.

    Whether you’re a seasoned AS400 operator or new to the platform, this cheat sheet offers a concise and easy-to-understand summary of the key commands needed for day-to-day operations.

    Ready reference for your AS400 programmers:

    AS400 (OS400) CommandTechnical Purpose
    signoffEnds the current interactive session, enabling the user to log out of the AS400 system.

    go <menu name>

    eg go `main`

    Navigates the user to a specified menu (say ‘main’ menu) on the AS400 system, facilitating access to different functionalities.

    addlible

    (Add Library List Entry)

    On the AS400 system, libraries serve a purpose like databases on other platforms. This command adds a library to the library list, allowing programs and commands to access objects within that library.

    dsplibl

    (Display Library List)

    Displays the current library list on the AS400, showing the sequence in which libraries are searched for objects.
    wrkliblInitiates a work environment in AS400 to display and manage library-related information.

    wrkactjob

    (work with active jobs)

    Provides an interface to view and manage active jobs on the AS400, displaying detailed information about each active job.

    wrksplf

    (Work with SPOOL files)

    Allows AS400 users to view, manage, and control the output generated by various processes on the system, known as SPOOL files.

    wrkwtr

    (work ‘print’ writer)

    Enables AS400 users to view and manage printer-related information, including the status of print writers.

    wrkjobq

    (work job queue)

    Displays information about jobs in a specified job queue, allowing AS400 users to manage and control job execution.

    wrkjobscd

    (work with the job scheduler)

    Provides a view of scheduled jobs and allows users to manage and control job scheduling activities in AS400.

    dspobj

    (display object)

    Displays detailed information about a specified object in the AS400, including its attributes and properties.

    dsppgm

    (Display Program)

    Allows AS400 users to view detailed information about a specified program, including its attributes, parameters, and source details.

    wrkusrprf

    (Work with User Profiles)

    – Provides an interface to manage user profiles, allowing administrators to view, add, modify, or delete user profiles on the AS400 system.

    chgsysval

    (Change System Value)

    Enables AS400 admins to modify system-wide settings and configurations, affecting the overall behavior of the AS400 operating system.

    chgusrprf

    (Change User Profile)

    Allows AS400 administrators to modify attributes and settings associated with a specific user profile, such as password, authorities, and special authorities.

    wrkmsgq

    (Work with Message Queues)

    – Provides a platform within AS400 to interact with message queues, allowing users to display, send, or delete messages within a specified message queue.

    crtlib

    (Create Library)

    Creates a new library on the AS400 system, providing a logical grouping for objects and facilitating organization and management.

    cpyf

    (Copy File)

    Facilitates the duplication of files, allowing users to copy data from one file to another on the AS400 system.

    wrkf

    (Work with Files)

    Offers a comprehensive interface on AS400 for managing files, allowing users to view, create, modify, or delete files and file members.

    dsppfm

    (Display Physical File Member)

    Displays the contents of a specific physical file member, providing a detailed view of the data within the member.

    edtf

    (Edit File)

    Opens a specified file in AS400 for interactive editing, allowing users to modify the content directly.

    wrkftr

    (Work with File Transfer)

    Manages file transfers between different systems, allowing users to send or receive files to and from the AS400 system.

    dltf

    (Delete File)

    Removes a specified file from the AS400 system, permanently deleting the file and its contents.

    dltdupobj

    (Delete Duplicate Objects)

    Deletes duplicate objects, providing a cleanup mechanism for eliminating redundant items on the AS400 system.

    crtpf

    (Create Physical File)

    Creates a new physical file on the AS400 system, defining its structure and attributes.

    crtlf

    (Create Logical File)

    Generates a new logical file, allowing users to create alternate views of the data within existing physical files.

    chgpf

    (Change Physical File)

    Modifies the attributes and settings of an existing physical file on the AS400 system.

    chgaut

    (Change Authority)

    Allows AS400 administrators to modify object-level authorities, determining the access permissions for users or groups.

    cpyfrmimpf

    (Copy From Import File)

    Copies data from an import file into a specified physical file on the AS400 system.

    wrkcfgsts

    (Work with Configuration Status)

    Provides information about the configuration status of the AS400 system, including hardware and software details.
    chgvar (Change Variable)Modifies the value of a system variable or user-defined variable on the AS400 system.
    addpfm (Add Physical File Member)Adds a new member to an existing physical file on the AS400 system.
    rmvm (Remove Variable)Removes a specified variable, either system-defined or user-defined, from the AS400 system.
    chgdbf (Change Data Base File)Provides a means to modify the attributes and settings of an existing database file.
    cpyfrmstmf (Copy From Stream File)Copies data from a stream file into a specified physical file on the AS400 system.
    crtrpgpgm (Create RPG Program)Creates a new RPG (Report Program Generator) program, allowing developers to write and execute business applications.
    crtsrcpf (Create Source Physical File)Allows users to create a new physical file to store source code, typically used for organizing and managing program source members.

    edtrpgsrc

    (Edit RPG Source)

    Opens a specified RPG source member for interactive editing, enabling developers to modify the source code of RPG programs.

    runqry

    (Run Query)

    Executes a predefined or ad-hoc query on the AS400 system, allowing users to retrieve and display data based on specified criteria.

    dsppgmref

    (Display Program References)

    Displays a list of references to a specified program, showing where and how the program is used within the AS400 system.

    wrklnk

    (Work with Job Links)

    Allows users to view and manage job links, providing information about relationships between jobs on the AS400 system.

    wrkqry

    (Work with Queries

    Provides a platform to manage and interact with queries on the AS400 system, allowing users to create, modify, or run queries.

    wrksbs

    (Work with Subsystems)

    Provides an interface to manage subsystems on the AS400 system, allowing users to start, stop, or modify subsystems.

    wrkjobd

    (Work with Job Description)

    Allows users to view and manage job descriptions, providing details about how jobs are initiated and controlled on the AS400 system.

    chgjob

    (Change Job)

    Enables users to modify the attributes and settings of an active job on the AS400 system.

    chgsbsd

    (Change Subsystem Description)

    Allows users to modify the description and attributes of an existing subsystem on the AS400 system.

    strtcpf

    (Start TCP/IP File Server)

    Initiates the TCP/IP file server on the AS400 system, enabling communication and file transfer over the TCP/IP protocol.

    endtcpf

    (End TCP/IP File Server)

    Terminates the TCP/IP file server on the AS400 system, closing communication channels and stopping file transfer services.
    strsql (Start SQL)Initiates the SQL (Structured Query Language) interface on the AS400 system, allowing users to execute SQL commands and queries.
    ndsql (End SQL)Terminates the SQL interface on the AS400 system, ending the execution of SQL commands and queries.

    Your AS400 developers can use the above-shared cheat sheet to improve their work on AS400 systems and help you achieve your desired results.

    Next, you must understand the role of commands in AS400 administration and development.

    Role of Commands in AS400 Administration and Development

    For AS400 administrators, commands are the main tools for maintaining the system’s health, setting up configurations, and ensuring everything runs as it should.

    It’s like having a remote control for the entire system, where you can press buttons to start processes.

    Whereas AS400 developers can use them to create, edit, and manage the programs that run on the AS400. Commands help them to quickly move through various stages of development, from writing code to testing and finally to deployment.

    If we boil it down, commands are the foundation for both keeping the AS400 in good health and for building the applications that make it valuable for your business.

    But to make the most of the commands, your AS400 programmers must be experienced in making the most of AS400 commands.

    If you want to save time and ensure that your AS400 systems are managed with professional expertise, then turn to Integrative Systems.

    Or your AS400 technical talent is retiring or leaving, and you want an extended team without the burden of hiring in-house – let’s get talking.

    Integrative Systems: Your Trusted Partner for AS400 Assistance

    AS400 commands are a powerful aspect of system administration and development, offering precision, efficiency, and control.

    If your organization wants to leverage the AS400 system to its fullest potential, you must rely on skilled professionals.

    Our team of experienced AS400 programmers has a legacy spanning over 25 years and has consistently demonstrated unparalleled expertise and commitment.

    We have delivered multiple AS400 projects to global companies worldwide.

    Our vast experience showcases our depth of knowledge and ability to use AS400 commands to their maximum potential.

    We offer 24/7 assistance and all types of AS400 services, ensuring your IBM i/AS400 systems run seamlessly.

    Whether it’s routine operations, enhancement requests, or addressing critical challenges, we’re always here to help.

    Whenever you are ready to know more, you can email us at [email protected].

    Related Posts

    Post a Comment

    Leave A Comment

    Connect with our experts
    to get all your answers

      COST SAVINGS CALCULATOR
      Calculate the savings on your current IT spend by collaborating with Integrative Systems

      Connect with our experts
      to get all your answers

        Fill this form, let your IT story unfold,
        Via the details, our solutions behold.

          Fill this form, let your IT story unfold,
          Via the details, our solutions behold.