16
Tue, Apr
5 New Articles

Tell Me Your Processor Group

IBM i (OS/400, i5/OS)
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

 

It's been about 25 years since IBM started offering i5/OS. Sure, it was first called CPF and then OS/400, but "What the heck release are we on?" has been a question people have asked themselves ever since CPF V2R1M0 came out back in something like 1980.

System values have been around since the first date of the operating system. Yet it took roughly 10 years before IBM put the model number into the system values table. I don't believe the serial number was there from the beginning either, but I think it was added long before the QMODEL system value.

So we have serial number and model number easily accessible via DSPSYSVAL QSRLNBR and QMODEL. (For the sake of consistency, shouldn't it have been QSERIAL and QMODEL or QSRLNBR and QMODNBR? But I digress). So why don't we have the OS release level, and why don't we have the processor group?

I was recently installing Advanced System Concepts' Abstract software for a client. (ASC's Abstract and ProData's DBU are two tools, along with RPG xTools, that I normally request that my clients install if they don't have them, but many already do.) The vendor asked me for the serial number and processor group. I gave them the serial number quickly (DSPSYSVAL QSRLNBR) and then said that I didn't have a clue what the processor group was. So the vendor asked me to look at a feature code in the list of installed processor features. The vendor then translated that feature code to the processor group. That just doesn't seem simple to me.

When IBM went to processor group-based licensing fees, so did the rest of the software vendors for iSeries. This effectively replaced the model number licensing with the processor group-based licensing, which is virtually worldwide at this point. Today, it seems like model numbers are virtually pointless. I recently installed a Model 800 in a shop where an 820 previously lived. That 800 ran faster than the 820, but it was a P10 processor group, versus the P20 of the 820.

There have been so many model number changes over the years that IBM and third-party vendors alike have had a difficult time maintaining their pricing tables. Enter processor groups.

Today, processor groups come in P05, P10, P20, P30, and P40. There may also be a P50 processor group by the time this article hits the streets, but I haven't actually been in a shop that has one.

Recently, when attempting to add processor-based processing to a software product, I read up on the software license APIs. These APIs are a nightmare to work with, and I've encountered only a few vendors that actually use them. IBM provided these APIs to simplify third-party software installation and processor group or usage-based licensing.

About the only API documentation I've read that is worse than IBM's documentation of QzhbCgiParse (a CGI API) is that of the software licensing APIs. It's no wonder vendors are shying away from them.

So not only is it nearly impossible to see your processor group from command entry, it is equally as difficult to write a third-party software solution that leverages IBM's software licensing scheme.

While I can't solve IBM's shortcomings with its software licensing APIs, I can help to resolve the frustration of not knowing what processor group you have. In addition, why not just list all the licensing variables in one easy-to-read location?

I've also used the WRKLICINF CL command. While it does list the serial number and processor group in one place, it does not list the model number nor is it able to cut/paste that info into an email.

Shown below is a CL program named Display License Information (DSPLICINF). This program, along with its corresponding and optional command definition, allows you to display the following information:

  • CPU serial number
  • System model number
  • Processor group
  • OS version and release level

 

Since this information is available through a few different interfaces, I chose to use a high-level interface for all four pieces of information. Certainly, using MI would be faster, but this CL program runs fast enough for anyone's taste. In fact, on a little Model 170 with something like 15 CPW, it displays the information immediately.

Here's the source code:

DSPLICINF: PGM
/*************************************************************/
/** Display software license information **/
/** (c) Copyright 2005 - Robert Cozzi, Jr. **/
/** Unrestricted license to use this software granted to **/
/** the public. **/
/** No warranty is express or implied, and none is given. **/
/*************************************************************/

DCL VAR(&LICPGM) TYPE(*CHAR) LEN(16)

DCL VAR(&RTNDATA) TYPE(*CHAR) LEN(64)
DCL VAR(&RCVLEN) TYPE(*DEC) LEN(7) VALUE(64)
DCL VAR(&RTNLEN) TYPE(*CHAR) LEN(4)
DCL VAR(&MODEL) TYPE(*CHAR) LEN(4)
DCL VAR(&SERIAL) TYPE(*CHAR) LEN(8)
DCL VAR(&RELLVL) TYPE(*CHAR) LEN(6)
DCL VAR(&CPFVER) TYPE(*CHAR) LEN(9)
DCL VAR(&PRODINFO) TYPE(*CHAR) LEN(17) +
VALUE('5769SS1*ONLY 5050')

DCL VAR(&LICINFO) TYPE(*CHAR) LEN(8) +
VALUE('LICP0100')

DCL VAR(&APIFMT) TYPE(*CHAR) LEN(8) +
VALUE('LICR0200')

DCL VAR(&APIERRORDS) TYPE(*CHAR) LEN(16) +
VALUE(X'0000000000000000')
DCL VAR(&PROCGRP) TYPE(*CHAR) LEN(4)
MONMSG MSGID(CPF0000)

/* Convert the return buffer length to INT4 */
NOTE1: CHGVAR VAR(%BIN(&RTNLEN)) VALUE(&RCVLEN)

RTVOBJD OBJ(QCMD) OBJTYPE(*PGM) SYSLVL(&CPFVER) +
LICPGM(&LICPGM)

CHGVAR VAR(%SST(&PRODINFO 1 7)) VALUE(%SST(&LICPGM +
1 7))
CHGVAR &RELLVL value(%SST(&CPFVER 1 1) *TCAT +
%sst(&CPFVER 3 1) *TCAT +
%SST(&CPFVER 4 1) *TCAT +
%SST(&CPFVER 6 1) *TCAT +
%SST(&CPFVER 7 1) *TCAT +
%SST(&CPFVER 9 1))
CHGVAR VAR(%SST(&PRODINFO 8 6)) VALUE(&RELLVL)
/* Retrieve the processor group and OS VxRxMx level */
NOTE2: CALL PGM(QLZARTV) PARM(&RTNDATA &RTNLEN &APIFMT +
&PRODINFO &LICINFO &APIERRORDS)

/* Extract the Processor Group */
NOTE3: CHGVAR VAR(&PROCGRP) VALUE(%SST(&RTNDATA 48 03))

/* Extract the OS/400 Version/Release/Modification Level */
NOTE4: CHGVAR VAR(&RELLVL) VALUE(%SST(&RTNDATA 27 06))

/* Get the Serial Number and Model Number */
NOTE5: RTVSYSVAL SYSVAL(QSRLNBR) RTNVAR(&SERIAL)
RTVSYSVAL SYSVAL(QMODEL ) RTNVAR(&MODEL)

/* Tell the end-user what was found. */
NOTE6: SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA(' Serial . . . . : ' *TCAT &SERIAL)
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA(' Model . . . . : ' *TCAT &MODEL)
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA(' Proc Group . . : ' *BCAT &PROCGRP)
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA(' Ver Rel Mod . : ' *BCAT &RELLVL)

ENDPGM: ENDPGM

 

In the above example, the line identified with NOTE1 converts the return variable's length, which is hard-coded as the initial value of the &RCVLEN variable, to integer. Until V5R3, CL hasn't supported integer variables, so we store the length in a decimal variable and then convert it using the %BIN() built-in function.

The line tagged with NOTE2 calls the software licensing API QLZARTV (Retrieve Software License Information). This API returns runtime information about an installed software product.

Buried in the data returned by this API are the processor group and OS release levels. The line tagged with NOTE3 pulls out the processor group from the data returned by QLZARTV. The line tagged with NOTE4 retrieves the OS release level in VxRyMx format. These values are stored in the &PROCGRP and &RELLVL CL variables, respectively.

To be complete, I also want to display the CPU serial number and model number to the user. The lines tagged with NOTE5 accomplish this through the use of the traditional RTVSYSVAL command.

Finally, the lines tagged with NOTE6 send the information (somewhat formatted) to the end-user as completion messages. I tried to use informational messages; instead, however, they appear on Command Entry only when you have low-level messages turned on (via F10).

The command to call this CL program isn't really necessary. But I do like being able to type in commands, so here is the command definition source for DSLICSINF.

 

DSPLICINF:  CMD        PROMPT('Display License Info')
   /*  Command processing program is DSPLICINF  */

 

If you run the DSPLICINF command or simply call the CL program from command entry, you will receive the results as four informational messages, as shown below:

 

>> DSPLICINF
    Serial . . . . : 1012345    
    Model  . . . . : 810       
    Proc Group . . : P10        
    Ver Rel Mod  . : V5R1M0     

 

In this example, the DSPLICINF command is run and the serial number, model number, processor group, and version are displayed on four separate lines. Because the data doesn't always fill up the return variables, some data is left-justified and some is not. Hence, I use both *TCAT and *BCAT to create the output data.

Now, when a software vendor asks you what your processor group is, you can say, "Hold on while I run DSPLICINF and find out."

Bob Cozzi is a programmer/consultant, writer/author, and software developer of the RPG xTools, a popular add-on subprocedure library for RPG IV. His book The Modern RPG Language has been the most widely used RPG programming book for nearly two decades. He, along with others, speaks at and runs the highly-popular RPG World conference for RPG programmers.

 

BOB COZZI

Bob Cozzi is a programmer/consultant, writer/author, and software developer. His popular RPG xTools add-on subprocedure library for RPG IV is fast becoming a standard with RPG developers. His book The Modern RPG Language has been the most widely used RPG programming book for more than a decade. He, along with others, speaks at and produces the highly popular RPG World conference for RPG programmers.


MC Press books written by Robert Cozzi available now on the MC Press Bookstore.

RPG TnT RPG TnT
Get this jam-packed resource of quick, easy-to-implement RPG tips!
List Price $65.00

Now On Sale

The Modern RPG IV Language The Modern RPG IV Language
Cozzi on everything RPG! What more could you want?
List Price $99.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: