Common ways to interact with DB2 for z/OS

The z/OS® operating system is ideal for processing batch jobs, workloads that run in the background with little or no human interaction. However, z/OS is as much an interactive operating system as it is a batch processing system.

How can I work interactively with DB2 for z/OS?

You can use the following facilities to work with DB2® for z/OS through direct interaction, such as commands and menu style interfaces:

The z/OS console
You can issue commands to control DB2 from the z/OS console.
Time Sharing Option/Extensions (TSO)
You can use TSO/E to log on to z/OS and interactively share the resources of the mainframe. TSO also provides a limited set of basic commands. Using this set is sometimes called using TSO in its native mode.
Interactive System Productivity Facility (ISPF)
ISPF is a menu-driven interface for user interaction with a z/OS system. The ISPF environment is executed from TSO in native mode. ISPF provides utilities, an editor, and ISPF applications to the user. When permitted by various security controls, you can use ISPF to access most z/OS system functions. TSO/ISPF serves as both a system management interface and a development interface for traditional z/OS programming.
DB2 Interactive (DB2I)
You can use the included DB2 Interactive (DB2I) set of ISPF panels to work interactively with many different aspects of DB2. For example, it includes panels for interactively issuing SQL statements and commands, running utilities, preparing application programs, setting default options, and more. The following figure shows the options of the DB2I primary options menu.
Figure 1. The ISPF panel for the DB2I Primary Option Menu
 DSNEPRI                     DB2I PRIMARY OPTION MENU          SSID: DSN
 COMMAND ===>
 
 Select one of the following DB2 functions and press ENTER.
 
  1  SPUFI                  (Process SQL statements)
  2  DCLGEN                 (Generate SQL and source language declarations)
  3  PROGRAM PREPARATION    (Prepare a DB2 application program to run)
  4  PRECOMPILE             (Invoke DB2 precompiler)
  5  BIND/REBIND/FREE       (BIND, REBIND, or FREE plans or packages)
  6  RUN                    (RUN an SQL program)
  7  DB2 COMMANDS           (Issue DB2 commands)
  8  UTILITIES              (Invoke DB2 utilities)
  D  DB2I DEFAULTS          (Set global parameters)
  X  EXIT                   (Leave  DB2I)
SQL Processor Using File Input (SPUFI)
You can use the SPUFI panels of DB2I to issue SQL statements interactively from a TSO/E session.
Learning resources:

How can I submit and monitor batch work in DB2 for z/OS?

You can use the following facilities to process batch jobs, to start system tasks, and to check the output of jobs and tasks that you submitted to the system:

Job control language (JCL)
You can use JCL to tell the system what program to run, followed by a description of program inputs and outputs. Basic JCL contains three types of statements: JOB, EXEC, and DD. A job can contain several EXEC statements (steps) and each step might have several DD statements. JCL provides a wide range of parameters and controls, but you might use only a subset most of the time.
Spool Display and Search Facility (SDSF)
You can use the SDSF utility to monitor, control, and view the output of jobs in the system. After you submit a job, you can use SDSF to review the output for successful completion or to review and correct JCL errors.