Skip to content

Instantly share code, notes, and snippets.

@forstie
Last active August 31, 2024 01:45
Show Gist options
  • Save forstie/572c20da61511e3b798a37a7e61e4e98 to your computer and use it in GitHub Desktop.
Save forstie/572c20da61511e3b798a37a7e61e4e98 to your computer and use it in GitHub Desktop.
I was asked to provide a query that pulls together some of the basic identity detail for the IBM i you're connect to... which got me to this....
--
-- Who am i?
--
select s.host_name, e.host_name, 'IBM i ' concat os_version concat '.' concat os_release as ibmi_level,
serial_number, machine_type, machine_model,
ipl_mode, ipl_type, attention_light,
total_cpus, e.configured_cpus,
configured_memory, total_memory,
s.*
from sysibmadm.env_sys_info e, qsys2.system_status_info s;
-- https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzajq/rzajqviewenvinfo.htm
-- https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzajq/rzajqviewsysstatusinfo.htm
@bdietz400
Copy link

which got me thinking to add:
(SELECT MAX(PTF_IDENTIFIER) FROM QSYS2.PTF_INFO WHERE PTF_TECHNOLOGY_REFRESH_PTF = 'YES' and PTF_LOADED_STATUS ='PERMANENTLY APPLIED') as TR_PTF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment