Skip to content

Instantly share code, notes, and snippets.

@sriedmue79
Created May 5, 2023 17:11
Show Gist options
  • Save sriedmue79/34e3760408eb9c4aa7e90abaf61091e6 to your computer and use it in GitHub Desktop.
Save sriedmue79/34e3760408eb9c4aa7e90abaf61091e6 to your computer and use it in GitHub Desktop.
IBM i - Finding Autostart Job Entries (AJEs) on Subsystems
-------------------------------------------------------------------------
-- Description: queries related to subsystem autostart job entries (AJEs)
-------------------------------------------------------------------------
--Description: list the autostart job entries that are defined for a given subsystem description
SELECT *
FROM QSYS2.AUTOSTART_JOB_INFO
WHERE SUBSYSTEM_DESCRIPTION_LIBRARY = :SBSD_Library AND
SUBSYSTEM_DESCRIPTION = :SBSD_Name;
--Description: find all subsystem descriptions that have an AJE with a specific job name
SELECT *
FROM QSYS2.AUTOSTART_JOB_INFO
WHERE AUTOSTART_JOB_NAME = :AJE_Job_Name;
--Description: find all subsystem descriptions that have an AJE which uses a specific JOBD
SELECT *
FROM QSYS2.AUTOSTART_JOB_INFO
WHERE JOB_DESCRIPTION_LIBRARY = :JOBD_Library AND
JOB_DESCRIPTION = :JOBD_Name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment