IBM Support

History Log report for messages related to IPL/Subsystems/System Value Changes.

Question & Answer


Question

How to create a report for messages related to IPL/Subsystems/System Value Changes from the History Log.

Answer

With the introduction of the IBM i SQL Service HISTORY_LOG_INFO table function, you can create an SQL report containing messages from the history log.  

The HISTORY_LOG_INFO table function returns one row for each message in the history log based on the timestamp range specified. It returns information similar to what is returned by the Display Log (DSPLOG) CL command and the Open List of History Log Messages (QMHOLHST) API.

Authorization: No authorization needed.

To get a listing of selected messages from the history log, follow the steps:
 
1) Open the ACS Run SQL Scripts tool 
2) Run the following SQL:
SELECT MESSAGE_ID,
       MESSAGE_TYPE AS MESSAGE_TYPE,
       SEVERITY,
       MESSAGE_TIMESTAMP AS TIMESTAMP,
       FROM_USER,
       FROM_JOB,
       MESSAGE_TEXT,
       MESSAGE_SECOND_LEVEL_TEXT
    FROM TABLE (
            QSYS2.HISTORY_LOG_INFO(CURRENT TIMESTAMP - 3 DAY)
        ) x
    WHERE    MESSAGE_ID = 'CPF1806'  -- System value &1 changed from &2 to &3.
          OR MESSAGE_ID = 'CPF0965'  -- IPL options used.
          OR MESSAGE_ID = 'CPI091D'  -- Previous ending abnormal, reason code &1. 
          OR MESSAGE_ID = 'CPI0C04'  -- IPL from machine area &1. 
          OR MESSAGE_ID = 'CPF0968'  -- System ended to restricted condition.
          OR MESSAGE_ID = 'CPF0994'  -- ENDSBS SBS(*ALL) command being processed.
          OR MESSAGE_ID = 'CPC1124'  -- ENDJOBABN issued against job &3/&2/&1 by user &4.
          OR MESSAGE_ID = 'CPF0918'  -- Subsystem &1 active when system ended.   
          OR MESSAGE_ID = 'CPF0995'  -- Subsystem &1 ending in progress. 
          OR MESSAGE_ID = 'CPF0903'  -- Unattended IPL in progress. 
          OR MESSAGE_ID = 'CPF0905'  -- Attended IPL in progress.
          OR MESSAGE_ID = 'CPF0934'  -- IPL completed.
          OR MESSAGE_ID = 'CPF1036'  -- System powering down with *CNTRLD option. 
          OR MESSAGE_ID = 'CPF1037'  -- System powering down with *IMMED option. 
          OR MESSAGE_ID = 'CPC1206'  -- Subsystem is ending controlled.  
          OR MESSAGE_ID = 'CPC1207'  -- Subsystem ending immediately.
          OR MESSAGE_ID = 'CPD1418'  -- Subsystem ending. 
          OR MESSAGE_ID = 'CPF0927'  -- Subsystem &1 ended.
          OR MESSAGE_ID = 'CPF0997'  -- Attended IPL after abnormal system ending.
          OR MESSAGE_ID = 'CPF0998'  -- Unattended IPL in progress after abnormal system end.   
          OR MESSAGE_ID = 'CPF0930'  -- PWRDWNSYS command in progress.
          OR MESSAGE_ID = 'CPF1805'  -- System value &1 changed from &2 to &3.
          OR MESSAGE_ID = 'CPF1808'  -- System value &1 may not have changed.
          OR MESSAGE_ID = 'CPF1815'  -- System value &1 changed from &2 to &3.  
          OR MESSAGE_ID = 'CPF1103'  -- Subsystem &1 started. 
          OR MESSAGE_ID = 'CPF1804'  -- Subsystem &1 in library &2 starting. 
          OR MESSAGE_ID = 'CPF095A'  -- IPL changed from unattended to attended mode. 
          OR MESSAGE_ID = 'CPF0923'  -- IPL changed to unattended mode. 
          OR MESSAGE_ID = 'CPF0954'  -- IPL changed to unattended.
          OR MESSAGE_ID = 'CPF0955'  -- IPL changed to unattended. Cannot use console.
          OR MESSAGE_ID = 'CPF0969'  -- Controlling subsystem ended to restricted condition.  
          OR MESSAGE_ID = 'CPF0931'  -- ENDSYS command in progress.  
          OR MESSAGE_ID = 'CPF0933'  -- Controlling subsystem ended unexpectedly. System is ending. 
          OR MESSAGE_ID = 'CPF0990'  -- IPL changed to unattended mode. 
          OR MESSAGE_ID = 'CPF0992'  -- Start of system to restricted condition in progress.
          OR MESSAGE_ID = 'CPF0993'  -- Start of controlling subsystem in progress during IPL. 
          OR MESSAGE_ID = 'CPF1821'  -- Power failure. System ending. Restart IPL will be ignored. 
          OR MESSAGE_ID = 'CPI0919'  -- Automatic IPL may not have occurred.
          OR MESSAGE_ID = 'CPI091E'  -- Double IPL for PTF apply failed, reason code &1.
          OR MESSAGE_ID = 'CPI091F'  -- PWRDWNSYS &1 command in progress.
          OR MESSAGE_ID = 'CPI0980'  -- System powered down previously. 
          OR MESSAGE_ID = 'CPI0990'  -- Previous ending was abnormal because ENDJOBABN used.
          OR MESSAGE_ID = 'CPI0995'  -- PWRDWNSYS command issued with parameters specified. 
          OR MESSAGE_ID = 'CPI099A'  -- Main storage dump automatically copied.
          OR MESSAGE_ID = 'CPI099D'  -- System starting in storage restricted s
          OR MESSAGE_ID = 'CPI099F'  -- PWRDWNSYS &1 command in progress.     
          OR MESSAGE_ID = 'CPI1183'  -- PWRDWNSYS *IMMED command in progress.      
          OR MESSAGE_ID = 'CPI1184'  -- PWRDWNSYS *IMMED command in progress. 
          OR MESSAGE_ID = 'CPA3702'  -- IPL mode not set at Normal. (C R)
          OR MESSAGE_ID = 'CPC1292'  -- IPL attribute &1 changed to &2. 
          OR MESSAGE_ID = 'CPP0E9F'  -- System IPL now starting 
          OR MESSAGE_ID = 'CPC1125'  -- Job &3/&2/&1 was ended by user &4.  
          OR MESSAGE_ID = 'CPP1126'  -- Job &3/&2/&1 was ended by user &4.  


image 7091
NOTE:  The CURRENT TIMESTAMP can be adjusted to reflect the wanted timeframe.
More information about the HISTORY_LOG_INFO table function can be found on the link:
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzajq/rzajqudfhistoryloginfo.htm

[{"Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CHAAA2","label":"Operating System"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.2.0;7.3.0;7.4.0"}]

Document Information

Modified date:
22 December 2020

UID

ibm16367853