Find the IBMi (iSeries AS400) Operating System Version using SQL

  • Home
  • /
  • Blog
  • /
  • Find the IBMi (iSeries AS400) Operating System Version using SQL

July 7, 2022

Ever wanted to find your IBM i OS Version using SQL?

Following on from this blog about how to find the OS version from an RPG Program, a nice chap called Tomas Petris left a comment showing a slick way of pulling the IBM i Version with one SQL statement:

Find the IBMi (iSeries AS400) Operating System Version using SQL

The SQL statement is simple and looks like this:

SELECT substring(DATA_AREA_VALUE, 1, 8) FROM qsys2.data_area_info
WHERE data_area_library = 'QUSRSYS' and data_area_name = 'QSS1MRI'

You can enter this into your ACS SQL Script tool or simply into the terminal mode (5250 Emulator) using STRSQL:

Find the IBMi (iSeries AS400) Operating System Version using SQL

The results are simple and clear:

Find the IBMi (iSeries AS400) Operating System Version using SQL

NickLitten


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits.

Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day.

Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

  • Solution without substring :
    SELECT DATA_AREA_VALUE FROM TABLE(QSYS2.DATA_AREA_INFO(DATA_AREA_LIBRARY=>’QUSRSYS’,DATA_AREA_NAME=>’QIZAVRM’)) X;
    (‘QTOIVRM’ also works)

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

    Subscribe NOW
    7-day free trial

    Take This Course with ALL ACCESS

    Unlock your Learning Potential with instant access to every course and all new courses as they are released.
     [ For Serious Software Developers only ]

    Online Learning for IBM i Software Technology Professionals

    “The more that you read, the more things you will know. The more that you learn, the more places you’ll go.” – Dr. Seuss

    >