midrange.com code scratchpad
Name:
Sample of joblog_info
Scriptlanguage:
Plain Text
Tabwidth:
4
Date:
03/08/2018 04:26:34 pm
IP:
Logged
Description:
Sample of joblog_info
Code:
  1. --  category:  My IBM i Services
  2. --  description:  Joblog_Info
  3. --
  4. --  Documentation can be found here:
  5. --  --------------------------------
  6. --  https:--www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzajq/rzajqservicessys.htm
  7. -- 
  8. Select
  9. ORDINAL_POSITION,   --    A unique number for each row that indicates the time order of messages in the job log.
  10. MESSAGE_ID,         --    The message ID for this message.
  11. MESSAGE_TYPE,       --    Type of message.
  12. MESSAGE_SUBTYPE,    --    Subtype of message.
  13. SEVERITY,           --    The severity assigned to the message.
  14. MESSAGE_TIMESTAMP,  --    The timestamp for when the message was issued.
  15. FROM_LIBRARY,       --    The library containing the program or service program that sent the message.
  16. FROM_PROGRAM,       --    The program or service program name that sent the message.
  17. FROM_MODULE,        --    The module that sent the message.
  18. FROM_PROCEDURE,     --    The procedure that sent the message.
  19. FROM_INSTRUCTION,   --    The instruction that sent the message.
  20. TO_LIBRARY,         --    The library containing the program or service program that received the message
  21. TO_PROGRAM,         --    The program or service program name that received the message.
  22. TO_MODULE,          --    The module that received the message.
  23. TO_PROCEDURE,       --    The procedure that received the message.
  24. TO_INSTRUCTION,     --    The instruction that received the message.
  25. FROM_USER,          --    The userid of the job when the message was sent.
  26. MESSAGE_FILE,       --    The message file containing the message.
  27. MESSAGE_LIBRARY,    --    The name of the library containing the message file.
  28. MESSAGE_TOKEN_LENGTH,   --    The length of the MESSAGE_TOKENS string.
  29. MESSAGE_TOKENS,     --    The message token string. If the value is longer than 2048 characters, it will be truncated with no warning.
  30. MESSAGE_TEXT,       --    The first level text of the message including tokens.
  31. MESSAGE_SECOND_LEVEL_TEXT  --    The second level text of the message including tokens.
  32. from table(qsys2.joblog_info('*')) A
  33. where message_id='CPC1221'
  34. order by ordinal_position desc
  35. fetch first row only;
© 2004-2019 by midrange.com generated in 0.009s valid xhtml & css