# IBM i Services SQL Reference: QSYS2 and SYSTOOLS Views and Functions

> Source: https://netray.co/tools/ibm-i-qsys2-services-reference
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Searchable list of IBM i Services you can query with SQL from Run SQL Scripts, STRSQL or ODBC, with the CL command each replaces and a ready-to-run statement.

## Category

developer

## Erp

IBM i

## Audience

- IBM i administrator
- IBM i developer
- DBA

## Tool

**Kind:** worksheet

**Mode:** reference

**Columns:**

#### Service

**Key:** service

**Type:** text

#### Type

**Key:** type

**Type:** select

**Options:**

- View
- Table function
- Procedure
- Scalar function
- Catalog view
- Table

#### Replaces or mirrors

**Key:** replaces

**Type:** text

#### Returns

**Key:** returns

**Type:** text

#### Sample SQL

**Key:** sample

**Type:** text

#### Release note

**Key:** minRelease

**Type:** text

**Rows:**

**Service:** QSYS2.ACTIVE_JOB_INFO

**Type:** Table function

**Replaces:** WRKACTJOB

**Returns:** Active jobs with CPU, I/O, status, function

**Sample:** SELECT JOB_NAME, AUTHORIZATION_NAME, JOB_STATUS, FUNCTION FROM TABLE(QSYS2.ACTIVE_JOB_INFO(DETAILED_INFO => 'NONE')) X WHERE JOB_STATUS = 'MSGW'

**Min Release:** Parameters SUBSYSTEM_LIST_FILTER, JOB_NAME_FILTER, CURRENT_USER_LIST_FILTER, DETAILED_INFO

**Service:** QSYS2.JOB_INFO

**Type:** Table function

**Replaces:** WRKUSRJOB, WRKSBMJOB

**Returns:** Jobs in any state: ACTIVE, JOBQ, OUTQ

**Sample:** SELECT * FROM TABLE(QSYS2.JOB_INFO(JOB_STATUS_FILTER => '*JOBQ', JOB_USER_FILTER => '*ALL')) X

**Min Release:** Filters: JOB_STATUS_FILTER, JOB_TYPE_FILTER, JOB_SUBSYSTEM_FILTER, JOB_USER_FILTER

**Service:** QSYS2.SYSTEM_STATUS_INFO

**Type:** View

**Replaces:** WRKSYSSTS

**Returns:** One row: jobs in system, ASP used, CPU, memory, job table

**Sample:** SELECT TOTAL_JOBS_IN_SYSTEM, ACTIVE_JOBS_IN_SYSTEM, SYSTEM_ASP_USED, CONFIGURED_CPUS FROM QSYS2.SYSTEM_STATUS_INFO

**Min Release:** Use SYSTEM_STATUS_INFO_BASIC for a cheaper subset when polling often

**Service:** QSYS2.SYSTEM_STATUS_INFO_BASIC

**Type:** View

**Replaces:** WRKSYSSTS

**Returns:** Faster subset of SYSTEM_STATUS_INFO

**Sample:** SELECT * FROM QSYS2.SYSTEM_STATUS_INFO_BASIC

**Min Release:** Prefer for monitoring scripts

**Service:** QSYS2.SYSTEM_ACTIVITY_INFO

**Type:** Table function

**Replaces:** WRKSYSACT (summary)

**Returns:** CPU utilisation figures

**Sample:** SELECT * FROM TABLE(QSYS2.SYSTEM_ACTIVITY_INFO())

**Min Release:** Call with no parameters for current CPU and activity figures

**Service:** QSYS2.SYSTEM_VALUE_INFO

**Type:** View

**Replaces:** WRKSYSVAL, DSPSYSVAL

**Returns:** Current value and shipped default per system value

**Sample:** SELECT SYSTEM_VALUE_NAME, SYSTEM_VALUE, SHIPPED_DEFAULT_VALUE FROM QSYS2.SYSTEM_VALUE_INFO WHERE SYSTEM_VALUE_NAME LIKE 'QPWD%'

**Min Release:** Good for audit diffs between partitions

**Service:** QSYS2.USER_INFO

**Type:** View

**Replaces:** DSPUSRPRF, WRKUSRPRF

**Returns:** User profiles: status, last sign-on, special authorities, password dates

**Sample:** SELECT AUTHORIZATION_NAME, STATUS, PREVIOUS_SIGNON, SPECIAL_AUTHORITIES FROM QSYS2.USER_INFO WHERE PREVIOUS_SIGNON < CURRENT TIMESTAMP - 90 DAYS

**Min Release:** Needs *OBJOPR and *READ on the profiles; USER_INFO_BASIC is faster

**Service:** QSYS2.USER_INFO_BASIC

**Type:** View

**Replaces:** DSPUSRPRF

**Returns:** Faster subset of USER_INFO

**Sample:** SELECT AUTHORIZATION_NAME, STATUS FROM QSYS2.USER_INFO_BASIC WHERE STATUS = '*DISABLED'

**Min Release:** Use for large profile counts

**Service:** QSYS2.OBJECT_STATISTICS

**Type:** Table function

**Replaces:** DSPOBJD, WRKOBJ

**Returns:** Objects in a library with size, created, last used, days used

**Sample:** SELECT OBJNAME, OBJTYPE, OBJSIZE, LAST_USED_TIMESTAMP FROM TABLE(QSYS2.OBJECT_STATISTICS('MYLIB', 'PGM SRVPGM')) X ORDER BY OBJSIZE DESC

**Min Release:** Third parameter '*ALLSIMPLE' returns names fast without detail

**Service:** QSYS2.LIBRARY_INFO

**Type:** Table function

**Replaces:** DSPLIB, RTVLIBD

**Returns:** Library size and object count

**Sample:** SELECT OBJECT_COUNT, LIBRARY_SIZE FROM TABLE(QSYS2.LIBRARY_INFO('MYLIB')) X

**Min Release:** DETAILED_INFO => 'NO' skips the size calculation

**Service:** QSYS2.SYSTABLESTAT

**Type:** Catalog view

**Replaces:** DSPFD (member sizes)

**Returns:** Rows, deleted rows and size per table

**Sample:** SELECT TABLE_NAME, NUMBER_ROWS, NUMBER_DELETED_ROWS, DATA_SIZE FROM QSYS2.SYSTABLESTAT WHERE TABLE_SCHEMA = 'MYLIB' ORDER BY NUMBER_DELETED_ROWS DESC

**Min Release:** Db2 for i catalog; finds files that need RGZPFM

**Service:** QSYS2.SYSPARTITIONSTAT

**Type:** Catalog view

**Replaces:** DSPFD per member

**Returns:** Statistics per table partition or member

**Sample:** SELECT TABLE_NAME, TABLE_PARTITION, NUMBER_ROWS FROM QSYS2.SYSPARTITIONSTAT WHERE TABLE_SCHEMA = 'MYLIB'

**Min Release:** Use for multi-member physical files

**Service:** QSYS2.SYSTABLES / QSYS2.SYSCOLUMNS

**Type:** Catalog view

**Replaces:** DSPFFD

**Returns:** Tables and their columns, types, lengths

**Sample:** SELECT COLUMN_NAME, DATA_TYPE, LENGTH, NUMERIC_SCALE FROM QSYS2.SYSCOLUMNS WHERE TABLE_SCHEMA = 'MYLIB' AND TABLE_NAME = 'CUSTMAST'

**Min Release:** Db2 for i catalog

**Service:** QSYS2.HISTORY_LOG_INFO

**Type:** Table function

**Replaces:** DSPLOG

**Returns:** QHST messages with timestamp, ID, severity, from job

**Sample:** SELECT MESSAGE_TIMESTAMP, MESSAGE_ID, FROM_JOB, MESSAGE_TEXT FROM TABLE(QSYS2.HISTORY_LOG_INFO(START_TIME => CURRENT TIMESTAMP - 1 DAY)) X WHERE SEVERITY >= 40

**Min Release:** Parameters START_TIME, END_TIME

**Service:** QSYS2.MESSAGE_QUEUE_INFO

**Type:** View

**Replaces:** DSPMSG

**Returns:** Messages on queues such as QSYSOPR

**Sample:** SELECT MESSAGE_TIMESTAMP, MESSAGE_ID, MESSAGE_TEXT FROM QSYS2.MESSAGE_QUEUE_INFO WHERE MESSAGE_QUEUE_NAME = 'QSYSOPR' AND MESSAGE_TYPE = 'INQUIRY'

**Min Release:** Also available as a table function

**Service:** QSYS2.JOBLOG_INFO

**Type:** Table function

**Replaces:** DSPJOBLOG

**Returns:** Job log messages of a job

**Sample:** SELECT MESSAGE_ID, MESSAGE_TEXT FROM TABLE(QSYS2.JOBLOG_INFO('*')) X

**Min Release:** '*' is the current job

**Service:** QSYS2.OUTPUT_QUEUE_ENTRIES

**Type:** View

**Replaces:** WRKOUTQ

**Returns:** One row per spooled file in every output queue

**Sample:** SELECT OUTPUT_QUEUE_NAME, SPOOLED_FILE_NAME, USER_NAME, SIZE, CREATE_TIMESTAMP FROM QSYS2.OUTPUT_QUEUE_ENTRIES WHERE OUTPUT_QUEUE_NAME = 'PRT01'

**Min Release:** OUTPUT_QUEUE_ENTRIES_BASIC is much faster

**Service:** QSYS2.SPOOLED_FILE_INFO

**Type:** Table function

**Replaces:** WRKSPLF

**Returns:** Spooled files filtered by user, time, status, queue

**Sample:** SELECT SPOOLED_FILE_NAME, STATUS, SIZE, CREATION_TIMESTAMP FROM TABLE(QSYS2.SPOOLED_FILE_INFO(USER_NAME => 'BATCHUSR')) X

**Min Release:** Other filters: STARTING_TIMESTAMP, STATUS, JOB_NAME, OUTPUT_QUEUE, USER_DATA

**Service:** QSYS2.NETSTAT_INFO

**Type:** View

**Replaces:** NETSTAT *CNN

**Returns:** TCP and UDP connections, ports, state

**Sample:** SELECT REMOTE_ADDRESS, REMOTE_PORT, LOCAL_PORT, TCP_STATE FROM QSYS2.NETSTAT_INFO WHERE LOCAL_PORT = 8471

**Min Release:** 8471 is the database host server port

**Service:** QSYS2.NETSTAT_JOB_INFO

**Type:** View

**Replaces:** NETSTAT option 3 then F14

**Returns:** Connections with the job and user that own them

**Sample:** SELECT JOB_NAME, AUTHORIZATION_NAME, REMOTE_ADDRESS, LOCAL_PORT FROM QSYS2.NETSTAT_JOB_INFO WHERE LOCAL_PORT = 8471

**Min Release:** Find which PC holds an ODBC job

**Service:** QSYS2.PTF_INFO

**Type:** View

**Replaces:** DSPPTF

**Returns:** PTFs with loaded status and IPL action

**Sample:** SELECT PTF_PRODUCT_ID, PTF_IDENTIFIER, PTF_LOADED_STATUS, PTF_IPL_ACTION FROM QSYS2.PTF_INFO WHERE PTF_IPL_ACTION <> 'NONE'

**Min Release:** PTF_IPL_ACTION shows what changes at the next IPL

**Service:** QSYS2.GROUP_PTF_INFO

**Type:** View

**Replaces:** WRKPTFGRP

**Returns:** PTF groups installed and their status

**Sample:** SELECT * FROM QSYS2.GROUP_PTF_INFO ORDER BY PTF_GROUP_NAME

**Min Release:** Local information only

**Service:** SYSTOOLS.GROUP_PTF_CURRENCY

**Type:** View

**Replaces:** Manual check of the IBM PSP site

**Returns:** Installed vs available level for each PTF group

**Sample:** SELECT PTF_GROUP_ID, PTF_GROUP_TITLE, PTF_GROUP_LEVEL_INSTALLED, PTF_GROUP_LEVEL_AVAILABLE FROM SYSTOOLS.GROUP_PTF_CURRENCY ORDER BY PTF_GROUP_LEVEL_AVAILABLE - PTF_GROUP_LEVEL_INSTALLED DESC

**Min Release:** Needs internet access from the partition to IBM

**Service:** QSYS2.JOURNAL_INFO

**Type:** View

**Replaces:** WRKJRNA

**Returns:** Journals with attached receiver, receiver count and total size

**Sample:** SELECT JOURNAL_LIBRARY, JOURNAL_NAME, ATTACHED_JOURNAL_RECEIVER_NAME, NUMBER_JOURNAL_RECEIVERS, TOTAL_SIZE_JOURNAL_RECEIVERS FROM QSYS2.JOURNAL_INFO ORDER BY TOTAL_SIZE_JOURNAL_RECEIVERS DESC

**Min Release:** Sizes in KB

**Service:** QSYS2.JOURNAL_RECEIVER_INFO

**Type:** View

**Replaces:** WRKJRNRCV, DSPJRNRCVA

**Returns:** Receiver size, entry count, status, attach and detach times

**Sample:** SELECT JOURNAL_RECEIVER_NAME, SIZE, NUMBER_OF_JOURNAL_ENTRIES, STATUS, DETACH_TIMESTAMP FROM QSYS2.JOURNAL_RECEIVER_INFO WHERE JOURNAL_RECEIVER_LIBRARY = 'MYJRNLIB'

**Min Release:** SIZE in KB

**Service:** QSYS2.DISPLAY_JOURNAL

**Type:** Table function

**Replaces:** DSPJRN

**Returns:** Journal entries with code, type, object, timestamp, entry data

**Sample:** SELECT ENTRY_TIMESTAMP, JOURNAL_CODE, JOURNAL_ENTRY_TYPE, OBJECT FROM TABLE(QSYS2.DISPLAY_JOURNAL('MYJRNLIB', 'MYJRN', STARTING_TIMESTAMP => CURRENT TIMESTAMP - 1 HOUR)) X

**Min Release:** First two parameters: journal library, journal name

**Service:** QSYS2.SCHEDULED_JOB_INFO

**Type:** View

**Replaces:** WRKJOBSCDE

**Returns:** Job schedule entries with next run, command, last result

**Sample:** SELECT SCHEDULED_JOB_NAME, STATUS, NEXT_SUBMISSION_DATE, COMMAND_STRING FROM QSYS2.SCHEDULED_JOB_INFO ORDER BY NEXT_SUBMISSION_DATE

**Min Release:** Full visibility needs *JOBCTL

**Service:** QSYS2.JOB_QUEUE_INFO

**Type:** View

**Replaces:** WRKJOBQ

**Returns:** Job queues, status, jobs waiting, subsystem

**Sample:** SELECT JOB_QUEUE_NAME, JOB_QUEUE_STATUS, NUMBER_OF_JOBS, SUBSYSTEM_NAME FROM QSYS2.JOB_QUEUE_INFO WHERE NUMBER_OF_JOBS > 0

**Min Release:** Spot held queues before the night batch

**Service:** QSYS2.SUBSYSTEM_INFO

**Type:** View

**Replaces:** WRKSBS

**Returns:** Subsystems, status, current active jobs

**Sample:** SELECT SUBSYSTEM_DESCRIPTION, STATUS, CURRENT_ACTIVE_JOBS FROM QSYS2.SUBSYSTEM_INFO WHERE STATUS = 'ACTIVE'

**Service:** QSYS2.RECORD_LOCK_INFO

**Type:** View

**Replaces:** WRKOBJLCK, DSPRCDLCK

**Returns:** Record locks held and requested

**Sample:** SELECT * FROM QSYS2.RECORD_LOCK_INFO WHERE TABLE_SCHEMA = 'MYLIB' AND TABLE_NAME = 'CUSTMAST'

**Min Release:** Use with RPG status 01218

**Service:** QSYS2.ASP_INFO

**Type:** View

**Replaces:** WRKDSKSTS (capacity), WRKASPCFG

**Returns:** Capacity and free space per ASP in MB

**Sample:** SELECT ASP_NUMBER, ASP_STATE, TOTAL_CAPACITY, TOTAL_CAPACITY_AVAILABLE FROM QSYS2.ASP_INFO

**Service:** QSYS2.LICENSE_INFO

**Type:** View

**Replaces:** WRKLICINF

**Returns:** Licensed products, usage limit, count, expiration

**Sample:** SELECT PRODUCT_ID, FEATURE_ID, USAGE_LIMIT, USAGE_COUNT, LICENSE_EXPIRATION FROM QSYS2.LICENSE_INFO WHERE LICENSE_EXPIRATION <= CURRENT DATE + 14 DAYS

**Min Release:** Spot expiring keys before they stop a product

**Service:** QSYS2.OBJECT_PRIVILEGES

**Type:** View

**Replaces:** DSPOBJAUT

**Returns:** Private and public authorities per object

**Sample:** SELECT SYSTEM_OBJECT_NAME, AUTHORIZATION_NAME, OBJECT_AUTHORITY FROM QSYS2.OBJECT_PRIVILEGES WHERE SYSTEM_OBJECT_SCHEMA = 'MYLIB' AND AUTHORIZATION_NAME = '*PUBLIC'

**Min Release:** Also a table function form

**Service:** QSYS2.SERVER_SBS_ROUTING

**Type:** View

**Replaces:** Manual QSYS2.SET_SERVER_SBS_ROUTING review

**Returns:** Users routed to alternate subsystems for host servers like QZDASOINIT

**Sample:** SELECT AUTHORIZATION_NAME, QZDASOINIT_SUBSYSTEM, QZDASOINIT_ROLLOVER FROM QSYS2.SERVER_SBS_ROUTING

**Min Release:** Set with QSYS2.SET_SERVER_SBS_ROUTING

**Service:** QSYS2.IFS_OBJECT_STATISTICS

**Type:** Table function

**Replaces:** WRKLNK, DSPLNK

**Returns:** IFS objects with size, owner, change and use times

**Sample:** SELECT PATH_NAME, OBJECT_TYPE, DATA_SIZE, DATA_CHANGE_TIMESTAMP FROM TABLE(QSYS2.IFS_OBJECT_STATISTICS(START_PATH_NAME => '/home', SUBTREE_DIRECTORIES => 'YES')) X ORDER BY DATA_SIZE DESC

**Min Release:** Large trees take time: start narrow

**Service:** QSYS2.IFS_READ

**Type:** Table function

**Replaces:** DSPF, EDTF (read)

**Returns:** Lines of a stream file (LINE_NUMBER, LINE)

**Sample:** SELECT LINE_NUMBER, LINE FROM TABLE(QSYS2.IFS_READ(PATH_NAME => '/home/dev/readme.txt', END_OF_LINE => 'CRLF')) X

**Min Release:** IFS_READ_BINARY and IFS_READ_UTF8 variants exist

**Service:** QSYS2.QCMDEXC

**Type:** Procedure

**Replaces:** Running CL from SQL

**Returns:** Runs a CL command

**Sample:** CALL QSYS2.QCMDEXC('ADDLIBLE LIB(PRODLIB2)')

**Min Release:** Also a scalar function returning 1 or -1; command authority rules apply

**Service:** QSYS2.HTTP_GET

**Type:** Scalar function

**Replaces:** Java or curl calls from CL

**Returns:** Response body as CLOB

**Sample:** VALUES QSYS2.HTTP_GET('https://example.com/api/status', '{"headers":{"Accept":"application/json"}}')

**Min Release:** QSYS2 HTTP functions arrived with 7.3 TR11 and 7.4 TR5. The headers JSON object needs a recent Db2 PTF Group (7.4 level 23, 7.5 level 3); older levels use the single header option. The SYSTOOLS HTTPGETCLOB functions use Java

**Service:** SYSIBM.SYSDUMMY1

**Type:** Catalog view

**Replaces:** The DUAL table in Oracle

**Returns:** One row, one column, for evaluating expressions

**Sample:** SELECT CURRENT TIMESTAMP, CURRENT SERVER FROM SYSIBM.SYSDUMMY1

**Min Release:** Or use VALUES CURRENT TIMESTAMP with no table

**Notes:** Service names, columns and parameters follow IBM Documentation for IBM i 7.5 (IBM i Services and the Db2 for i catalog). Many services arrive on earlier releases through the Db2 PTF Group; check the IBM i Technology Updates pages for the level your partition needs. Sample library and object names are placeholders.

## Content

**Intro:** IBM i Services are views, table functions and procedures in QSYS2 and SYSTOOLS that return system information as SQL result sets. This reference lists the ones admins and developers use most, the CL command each replaces, and a statement you can run from Run SQL Scripts, STRSQL or any ODBC or JDBC client.

**Sections:**

#### How to use it

**Body:** Search by the CL command you already know, for example WRKACTJOB or DSPLOG, and the table shows the service that returns the same information as rows. Copy the sample SQL, change the library or user names, and run it. Views are queried directly (SELECT ... FROM QSYS2.USER_INFO); table functions need TABLE(...) around the call and accept named parameters with =>; procedures are run with CALL. Because the results are ordinary SQL, you can join them, filter them, export them from ACS to Excel, or read them from SQL Server through a linked server over the IBM i Access ODBC driver.

**Bullets:**

- Run SQL Scripts in IBM i Access Client Solutions is the easiest place to start
- STRSQL works too but does not show long columns well
- From SSMS, use OPENQUERY over an ODBC linked server so the SQL runs on IBM i

#### Worked example: find jobs waiting on a message

**Body:** A night batch has stopped and users report locks. Run SELECT JOB_NAME, AUTHORIZATION_NAME, JOB_STATUS, FUNCTION FROM TABLE(QSYS2.ACTIVE_JOB_INFO(DETAILED_INFO => 'NONE')) X WHERE JOB_STATUS = 'MSGW'. Each row is a job waiting on an inquiry message. Then SELECT MESSAGE_TIMESTAMP, MESSAGE_ID, MESSAGE_TEXT FROM QSYS2.MESSAGE_QUEUE_INFO WHERE MESSAGE_QUEUE_NAME = 'QSYSOPR' AND MESSAGE_TYPE = 'INQUIRY' shows what they are asking. If a job holds record locks, QSYS2.RECORD_LOCK_INFO filtered on the table shows the holder. Keeping DETAILED_INFO at 'NONE' makes ACTIVE_JOB_INFO fast enough to run every few minutes from a monitoring job.

#### PTF currency and housekeeping checks

**Body:** SYSTOOLS.GROUP_PTF_CURRENCY compares the PTF group levels installed on the partition with the levels IBM publishes, so ordering by the difference shows which groups are furthest behind. It needs the partition to reach IBM over the internet; on an isolated partition use QSYS2.GROUP_PTF_INFO and compare manually. QSYS2.PTF_INFO with PTF_IPL_ACTION <> 'NONE' shows what will change at the next IPL. For storage, QSYS2.SYSTABLESTAT ordered by NUMBER_DELETED_ROWS finds files that need RGZPFM, and QSYS2.JOURNAL_INFO ordered by TOTAL_SIZE_JOURNAL_RECEIVERS finds journals whose receivers are not being cleaned up.

#### Gotchas: releases, PTFs and authority

**Body:** IBM adds and extends services through Technology Refreshes and the Db2 PTF Group, so a service or column in the 7.5 documentation may be missing on a 7.4 partition that is behind on PTFs. Check the IBM i Technology Updates pages before relying on a parameter. Services respect object authority: a user without *JOBCTL sees fewer jobs, USER_INFO needs authority to the profiles, and some columns return null without *ALLOBJ, *SECADM or *JOBCTL. Some services do a lot of work per call (OBJECT_STATISTICS on *ALLUSR, IFS_OBJECT_STATISTICS on /), so filter early and test outside business hours.

**Cta:** If you want admins and managers to ask questions like these in plain English and get answers from your IBM i, with the SQL shown and nothing leaving your network, we can set that up on your servers.

**Faq:**

#### How do I run an SQL query on AS400?

**Answer:** Use Run SQL Scripts in IBM i Access Client Solutions, STRSQL on a green screen, or any ODBC or JDBC client with the IBM i Access driver. Type a statement such as SELECT * FROM QSYS2.SYSTEM_STATUS_INFO and run it. With system naming use library/file; with SQL naming use library.file, which ACS uses by default.

#### What is the dummy table in IBM i SQL?

**Answer:** SYSIBM.SYSDUMMY1 is the one-row table used to evaluate expressions, the equivalent of DUAL in Oracle, for example SELECT CURRENT DATE FROM SYSIBM.SYSDUMMY1. Db2 for i also supports VALUES, so VALUES CURRENT DATE returns the same result with no table at all.

#### Can I query AS400 system information from SQL Server SSMS?

**Answer:** Yes. Create a linked server in SQL Server over the IBM i Access ODBC driver, then use OPENQUERY so the statement runs on IBM i, for example SELECT * FROM OPENQUERY(IBMI, 'SELECT JOB_NAME, JOB_STATUS FROM TABLE(QSYS2.ACTIVE_JOB_INFO()) X'). The connecting user's IBM i authority still decides which rows come back.

#### Which IBM i Services replace WRKACTJOB and DSPLOG?

**Answer:** QSYS2.ACTIVE_JOB_INFO returns what WRKACTJOB shows, with filters for subsystem, job name and user, and a DETAILED_INFO level that controls how many columns are computed. QSYS2.HISTORY_LOG_INFO returns the QHST history log that DSPLOG shows, with START_TIME and END_TIME parameters to limit the window.

## Search terms

latest sql tricks for ibm i as400, as400 and sql tricks, how to run sql query in as400, ibm i services qsys2, qsys2 active_job_info, as400 query commands, ibm sql as400 dummy table, ssms query as400

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
