Messages

*Messages are stored in a mailboxe called message queue, of object type MSGQ. We can have informational messages (example object not found) or inquiry (example asking for action).

<aside> 💡

Information messages can arrive as a simple pictogram at the bottom of the screen (*NOTIFY), or immediately by blocking the screen until an action is taken (*BREAK)

</aside>

CRTMSGQ → create a queue

WRKACTJOB SBS(QINTER) → display the screen of connected users

0jjH3O66Gv.png

SNDMSG → send message to a user without interrupting

mc9YMSEQ5e.png

SNDBRKMSG → interrupt a user to display a message

<aside> 💡

You can also use an API to send messages → CALL QEZSNDMG or CALL QLZAVXFR or CALL QSMBTTCC or CALL QLZARCAPI

</aside>

*DSPMSG → display received messages (default is WRKUSR)

DSPMSG QSYSOPR → display system messages

Execution environment

Objects required for a job execution environment :

***SBSD → subsystem description *JOBQ → job queue *JOBD → job description (parameters for executing a job) CLS → class OUTQ → output queue


Jobs operate within environments known as subsystems, which provide isolation for the jobs. Multiple jobs can run concurrently (simultaneously) within a subsystem, and each job utilizes a memory pool that is allocated to the subsystem.

Subsystem Purpose Description
QBASE base a crtitical subsystem that provides foundational services for the OS
QCTL controlling manages system startup, shutdown, and other subsystems
QINTER interactive handles interactive user sessions 5250 and tasks
QBATCH batch manages non-interactive batch jobs for background processing
QCMN communications manages communication-related jobs (TCP/IP, network tasks)
QSERVER file server handles server-based jobs (database access, client-server tasks)
QSPL spooling manages spooled jobs (print jobs, output)
QSYSWRK system work handles system-related background jobs (cleanup, maintenance)
QUSRWRK user work manages user-defined background jobs for custom applications outside 5250 like graphical interface, Navigator for i, IDE RDi