Learning path

From first sign-on to running the system.

29 guided lessons, about 10 h 30 min in all. Each one runs on your own system in the browser and checks your work as you go.

  1. Find your way around 3 lessons
  2. Write your first programs 5 lessons
  3. Build applications 7 lessons
  4. Run and look after the system 8 lessons
  5. Day-to-day work on the system 6 lessons

Stage 1 · 3 lessons · about 45 min

Find your way around

Sign on, move between menus and the command line, create your own library and edit a source member.

  1. Lesson 01 · about 15 min · 3 steps

    Sign on, menus and the command line

    On a new system sign on as QSECOFR with password QSECOFR: the password is shipped expired, so the system asks you to choose a new one (6 to 8 letters or digits by default).

    What you will do:

    1. Sign on
    2. Open a menu
    3. Use the command line

    Commands: GO, DSPLIBL

  2. Lesson 02 · about 15 min · 3 steps

    Libraries, objects and the library list

    A library groups named, typed objects.

    What you will do:

    1. Create a library
    2. Add the library
    3. Find your objects

    Commands: CRTLIB, ADDLIBLE, WRKOBJ

  3. Lesson 03 · about 15 min · 3 steps

    PDM and the editor

    PDM lists source members.

    What you will do:

    1. Create a source file
    2. Create NOTES
    3. Browse the members

    Commands: CRTSRCPF, WRKMBRPDM

Stage 2 · 5 lessons · about 1 h 25 min

Write your first programs

Compile and call CL, COBOL and RPG programs, describe files with DDS and query them with SQL.

  1. Lesson 04 · about 15 min · 3 steps

    Your first CL program

    CL drives system commands.

    What you will do:

    1. Write CL source
    2. Compile
    3. Call

    Commands: CRTBNDCL, CALL

  2. Lesson 05 · about 20 min · 4 steps

    Your first COBOL program

    Compile source into a *PGM, then call it.

    What you will do:

    1. Create source file
    2. Write source
    3. Compile
    4. Call

    Commands: CRTSRCPF, CRTBNDCBL, CALL

  3. Lesson 06 · about 20 min · 4 steps

    Your first RPG program

    Compile source into a *PGM, then call it.

    What you will do:

    1. Create source file
    2. Write source
    3. Compile
    4. Call

    Commands: CRTSRCPF, CRTBNDRPG, CALL

  4. Lesson 07 · about 15 min · 3 steps

    Physical and logical files with DDS

    A PF holds records; an LF offers another access path over the same records.

    What you will do:

    1. Create DDS source file
    2. Create a PF
    3. Create an LF

    Commands: CRTSRCPF, CRTPF, CRTLF

  5. Lesson 08 · about 15 min · 3 steps

    SQL with STRSQL

    Db2 SQL and DDS record access share files.

    What you will do:

    1. Insert three colors
    2. Query your data
    3. Update a row

    Commands: STRSQL, SELECT

Stage 3 · 7 lessons · about 2 h 25 min

Build applications

Screens and subfiles, batch reports, a complete sample application, embedded SQL, menus and data entry.

  1. Lesson 09 · about 15 min · 3 steps

    Display files and subfiles

    Explore a working RPG WORKSTN program before adapting it.

    What you will do:

    1. Install ORDERS
    2. Inspect the display source
    3. Run the subfile

    Commands: WRKMBRPDM, ADDLIBLE, CALL

  2. Lesson 10 · about 15 min · 3 steps

    Batch jobs, job queues and spooled files

    Batch jobs run independently.

    What you will do:

    1. Submit a report
    2. Inspect the job queue
    3. Inspect spool

    Commands: CALL, WRKJOBQ, WRKSPLF

  3. Lesson 11 · about 20 min · 5 steps

    Exploring the ORDERS application

    Follow the menu from source to database, ILE and batch work.

    What you will do:

    1. Install the application
    2. Open ORDERS
    3. Call the shared service
    4. Send work to a batch receiver
    5. Query open orders

    Commands: GO, CALL, STRSQL, SELECT

  4. Lesson 12 · about 25 min · 6 steps

    PDM day to day

    Compile in batch, change your PDM defaults, add your own options and search your source.

    What you will do:

    1. Create a library and a source file
    2. Write GREET
    3. Compile in batch with option 14
    4. Change your defaults with F18
    5. Add your own option with F16
    6. Search the source with FNDSTRPDM

    Commands: CRTLIB, CRTSRCPF, WRKMBRPDM, DSPMSG, FNDSTRPDM, WRKSPLF

  5. Lesson 13 · about 30 min · 7 steps

    Embedded SQL in RPG and COBOL

    SQL statements can live inside RPG and COBOL.

    What you will do:

    1. Create a schema and a table
    2. Add stock
    3. Create a source file
    4. A cursor and a multiple-row FETCH in RPG
    5. Run the report
    6. Commitment control in COBOL
    7. See what the program stored

    Commands: STRSQL, CRTSRCPF, WRKMBRPDM, CRTSQLRPGI, CALL, CRTSQLCBLI, PRTSQLINF, WRKSPLF

  6. Lesson 14 · about 20 min · 5 steps

    Your own menu

    Design a menu with SDA, show it with GO and make it your initial menu.

    What you will do:

    1. Create a library and a source file
    2. Design the menu
    3. Go to your menu
    4. Make it your initial menu
    5. Back to MAIN

    Commands: CRTLIB, CRTSRCPF, STRSDA, GO, CHGPRF, SIGNOFF

  7. Lesson 15 · about 20 min · 5 steps

    Data entry with DFU

    DFU builds a data entry program over a file without writing code.

    What you will do:

    1. Create a library and a source file
    2. Create the parts file
    3. Define the DFU program
    4. Enter parts
    5. Change a record with CHGDTA

    Commands: CRTLIB, CRTSRCPF, WRKMBRPDM, CRTPF, STRDFU, CHGDTA

Stage 4 · 8 lessons · about 3 h 15 min

Run and look after the system

Work management, security, Qshell, debugging, help panels, save and restore, SQL performance and job accounting.

  1. Lesson 16 · about 25 min · 6 steps

    Work management

    Submit batch jobs, watch them in WRKACTJOB, end one, and read job logs and spooled files.

    What you will do:

    1. Submit a long job
    2. Watch it in WRKACTJOB
    3. End the job
    4. Keep a job log
    5. Your own job log
    6. Spooled files

    Commands: SBMJOB, WRKACTJOB, DSPMSG, DSPJOBLOG, WRKSPLF

  2. Lesson 17 · about 25 min · 6 steps

    Security basics

    User profiles, object authority and authorization lists.

    What you will do:

    1. Check the security level
    2. Create a user profile
    3. Grant private authority
    4. Exclude the public
    5. Create an authorization list
    6. Secure an object with the list

    Commands: WRKSYSVAL, CRTUSRPRF, CRTLIB, CRTDTAARA, GRTOBJAUT, DSPOBJAUT, CRTAUTL, ADDAUTLE, DSPAUTL

  3. Lesson 18 · about 20 min · 5 steps

    Qshell scripts

    Work with IFS files, pass output through a pipe and run IBM i commands and SQL from a shell script.

    What you will do:

    1. Start Qshell
    2. Sort lines through a pipe
    3. Write a script with a function and a loop
    4. Run the script
    5. Run a shell command from CL

    Commands: STRQSH, MKDIR, CD, QSH

  4. Lesson 19 · about 20 min · 5 steps

    Debug an RPG program

    Compile with source debug information, examine a data structure, and follow the program into a procedure.

    What you will do:

    1. Create a library and a source file
    2. Compile with a source view
    3. Set a breakpoint
    4. Evaluate, watch and step into TWICE
    5. End debugging

    Commands: CRTLIB, CRTSRCPF, WRKMBRPDM, CRTBNDRPG, STRDBG, CALL, ENDDBG

  5. Lesson 20 · about 20 min · 4 steps

    Your own help and panels

    Write help in the User Interface Manager (UIM), compile it into a panel group and use it from your own menu.

    What you will do:

    1. Create a library and a source file
    2. Compile the help panel group
    3. Compile a UIM menu
    4. Open the menu and ask for help

    Commands: CRTLIB, CRTSRCPF, WRKMBRPDM, CRTPNLGRP, CRTMNU, GO

  6. Lesson 21 · about 25 min · 6 steps

    Save and restore

    Save a library and an individual object, restore them, and save security data separately.

    What you will do:

    1. Make a library and a save file
    2. Save the library
    3. Restore the library under a new name
    4. Save a single object and its private authority
    5. Restore the object and inspect authority
    6. Save security data

    Commands: CRTLIB, CRTDTAARA, CRTSAVF, SAVLIB, DSPSAVF, RSTLIB, DSPDTAARA, GRTOBJAUT, SAVOBJ, DLTDTAARA, RSTOBJ, DSPOBJAUT, SAVSECDTA

  7. Lesson 22 · about 35 min · 9 steps

    SQL performance

    Create an index, read optimizer messages and print an access plan.

    What you will do:

    1. Prepare a library and query options file
    2. Create two tables in STRSQL
    3. Add data and an index
    4. Capture optimizer messages for a join
    5. Read the job log and end debug
    6. Print the program access plan
    7. Set an optimization goal in QAQQINI
    8. Try a zero-second query time limit
    9. Restore the job query settings

    Commands: CRTLIB, CRTSRCPF, CRTDUPOBJ, STRSQL, STRDBG, SELECT, DSPJOBLOG, ENDDBG, WRKMBRPDM, CRTSQLRPGI, PRTSQLINF, WRKSPLF, CHGQRYA

  8. Lesson 23 · about 25 min · 6 steps

    Job accounting

    Collect job accounting records and query them with SQL.

    What you will do:

    1. Create the accounting journal
    2. Turn on job accounting
    3. Submit a job with an accounting code
    4. Copy job entries to an outfile
    5. Read the job record with SQL
    6. Turn accounting back off

    Commands: CRTJRNRCV, CRTJRN, CHGSYSVAL, SBMJOB, CRTDUPOBJ, DSPJRN, STRSQL, SELECT

Stage 5 · 6 lessons · about 2 h 40 min

Day-to-day work on the system

Stream files in the IFS, scheduled jobs and the reply list, Query/400 reports, interactive SQL in depth, menus built from the supplied source and a second sample application with service programs and transactions.

  1. Lesson 24 · about 20 min · 4 steps

    Stream files in the IFS

    Create and edit a stream file with EDTF, read it with DSPF, find it with WRKOBJLNK and change its lines in interactive Qshell.

    What you will do:

    1. Create a stream file in EDTF
    2. Read it with DSPF
    3. Find it in the IFS
    4. Change lines in Qshell

    Commands: EDTF, DSPF, WRKOBJLNK, STRQSH

  2. Lesson 25 · about 35 min · 9 steps

    Schedules and the reply list

    Let the system run a job on a schedule and answer the questions your program asks.

    What you will do:

    1. Create a library for the work
    2. Add the question and the answer message
    3. Write the CL program
    4. Compile it
    5. Add a reply list entry
    6. Call the program and watch it answer
    7. Look at the reply list
    8. Add a weekly job schedule entry
    9. Submit the entry now

    Commands: CRTLIB, CRTSRCPF, CRTMSGF, ADDMSGD, CHGMSGD, WRKMBRPDM, CRTBNDCL, ADDRPYLE, CHGJOB, CALL, WRKRPYLE, ADDJOBSCDE, CHGJOBSCDE, WRKJOBSCDE, DSPMSG

  3. Lesson 26 · about 30 min · 7 steps

    Query/400 reports

    Define a Query/400 report over a table: choose the file, keep one region, total the quantities and write a summary file.

    What you will do:

    1. Create the table to report on
    2. Fill it with three rows
    3. Create a query and select its file
    4. Keep the northern rows only
    5. Report one field and total it
    6. Write the summary to a file
    7. Run the saved query

    Commands: CRTLIB, STRSQL, WRKQRY, RUNQRY, SELECT

  4. Lesson 27 · about 25 min · 6 steps

    Interactive SQL in depth

    Let STRSQL prompt a statement for you with F4, print query results to a printer file and print the whole session with F13 Session Services.

    What you will do:

    1. Create a table to work with
    2. Add three rows
    3. Let F4 prompt an INSERT
    4. Send query results to the printer
    5. Print the whole session
    6. Look at the printed output

    Commands: CRTLIB, STRSQL, SELECT, WRKSPLF

  5. Lesson 28 · about 20 min · 5 steps

    Your own menu from IBM's source

    Copy the supplied User Tasks menu source, change its title and one option, compile your own UIM menu and open it with GO.

    What you will do:

    1. Create a library and source file
    2. Copy the shipped User Tasks menu
    3. Change the title and an option
    4. Compile the menu
    5. Open the menu and ask for help

    Commands: CRTLIB, CRTSRCPF, WRKMBRPDM, CRTMNU, GO

  6. Lesson 29 · about 30 min · 7 steps

    The INVENTORY sample: service programs and transactions

    INVENTORY is a second sample in L4INV: free-form RPG with embedded SQL, a rule service program bound through a binding directory, stock movements under commitment control, and externally described printer files.

    What you will do:

    1. Install the inventory sample
    2. Open its menu
    3. Record a stock receipt
    4. Browse the movement history
    5. Print the reorder report
    6. See the service program bound into a program
    7. Check that balance and history agree

    Commands: GO, ADDLIBLE, CALL, WRKSPLF, DSPPGM, STRSQL, SELECT

After the path

Explore the ORDERS sample application, look up any command in the command reference, or read how objects, libraries and jobs fit together.

Go deeper

These guides follow the later lessons with more commands, options and limits: