Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
SQL iQuery Documentation - UDF and UDTF
has no ratings.
Published: 18 Jun 2019
Revised: 20 Jun 2019 - 1770 days ago
Last viewed on: 22 Apr 2024 (776 views) 
  1. SQL iQuery - RUNiQRY CL Command
  2. CSV() - Read and Parse Comma Separated Values File
  3. CSV_VAL() Extract CSV Column Value
  4. CSV_XXXX() Extract CSV Column Value as xxxx
  5. CSV_COUNT - Retrieve Field Count
  6. ObjExist - Check Object Exits
  7. DTAARA - Data Area
  8. encode_URL Encode URL for the Web
  9. encode_TAG Encode HTML TAG Content
  10. FLDLIST - List the Fields of a Table
  11. FROMHEX - Fold 2-hex Chars into 1 Char
  12. GET CPUCNT, CURLIB, ENV, SRLNBR, SYSNAME
  13. MD5_HASH - UDF - Return MD5 Hash
  14. ifsStat - Get IFS File Attributes
  15. ifsExists - Check if IFS File Exists
  16. ifsFile - Query Contents of IFS Text File
  17. ifsDIR - List IFS Directory Entires
  18. DEPFILE - List Dependent Database Relations
  19. JOB - Get Job Name Component
  20. Job_ATTR - Job Attributes
  21. JOB_DATE Retrieve the Job Date
  22. JOBLOG - Write Message to Joblog
  23. Library List UDF and Procedures
  24. MBRLIST - Member List
  25. MCHINFO Machine Type and Model Number and OS version
  26. OSVER and OSVRM Get IBM i Version/Release
  27. PrintPDF - Print a PDF to a PDF Compatible Printer
  28. CPYTOPDF - Copy SPOOLED File to PDF file
  29. OBJ_LIST List Object in a Library
  30. LIB_LIST List Descriptions of Libraries on the Library List
  31. OBJ_EXPORTS List Exported Items from an Object
  32. OBJ_STRUCT Retrieve Objects Components
  33. RTVCMDD Retrieve Command Definition
  34. RTVJOBA - Retrieve Job Attributes
  35. RTVJOBD - Retrieve Job Description
  36. RTVLASTSPLF - Retrieve ID of Last SPOOLED File for this Job
  37. RTVxxx - Retrieve Various Objects Description Table Functions
  38. WATCHLIST - List Current Watches
  39. Polymorphic Qualified Name Syntax

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

iQuery.mchinfo - UDTF Published by: Bob Cozzi on 18 Jun 2019 view comments

Retrieve System ("Machine") Information

The iQuery.mchInfo() UDTF returns a one row result that contains the machine type, model number, processor group, system serial number system name and other information often needed for software licensing or hardware support.

UDF Return Type Description
mchInfo TABLE Returns a list of system related information.

Parameters

This UDTF has no parameters.

Result Set Columns

Column Type Description
MCHTYPE varchar(4) The machine type, such as 8202 or 9009
MODEL varchar(4) The system model number--similar to the QMODEL system value.
PROCGROUP varchar(4) The processor group, e.g., P05, P10, P20, etc.
FEATURE varchar(4) The Feature code of the system, such as EPCK, EP10
SRLNBR varchar(10) The system serial number.
SYSNAME varchar(8) The system name.
CPUCOUNT int The number of active CORES.
VRM varchar(6) The IBM i OS version and release in text form, VxRyMz format. e.g. V7R4M0
VER dec(7,2) The IBM i OS version and release in numeric form, e.g., 7.40

Example

select * from table (iQuery.mchInfo( )) mi;

The output from the above UDTF is a 1-row resultSet similar to the following:

 MCHTYPE  MODEL  PROCGROUP  FEATURE  SRLNBR      SYSNAME      CPUCOUNT  VRM           VER   
 8202      E4D    P05       EPCK     10-xxxxx    IQUERY3             4  V7R3M0       7.30  

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS