× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Ganesh:

Yes, there is an API that will retrieve the OS version for you.  It is 
QSZRTVPR but it's not obvious how to use it easily.  It does, however, 
provide *PUBLIC with *USE authority.

What I have done is:

DCL      &OSRELEASE  *CHAR  6

/* error code variable for APIs */ 
DCL      &ErrC0100   TYPE(*CHAR) LEN(528)

/* variables for the QSZRTVPR API */
DCL      &PRDI0100   TYPE(*CHAR) LEN(27)
DCL      &PRDR0100   TYPE(*CHAR) LEN(25)
DCL      &RCVFORMAT  TYPE(*CHAR) LEN(8)  VALUE('PRDR0100')
DCL      &RecvrLen   TYPE(*CHAR) LEN(25)

- - - - -

CHGVAR   &prdi0100 ('*OPSYS *CUR  0000*CODE')
CHGVAR   &ErrC0100 ' '
CHGVAR   %BIN(&ErrC0100 1 4)  528
CALL     QSZRTVPR (&prdr0100  &RECVRLEN  &RCVFORMAT  +
             &prdi0100  &ErrC0100)
IF       COND(%SST(&ErrC0100 9 7) *ne ' ')  +
             THEN(GOTO unexpected) /* Handle error */

CHGVAR   &OSRELEASE  %sst(&prdr0100 20 6)

- - - - -

Dave Schnee,
Barsa Consulting Group, LLC

Ganesh wrote - - -

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of
ganeshkumar.murugesan@xxxxxxxxx
Sent: Thursday, May 19, 2005 10:46 AM
To: midrange-l@xxxxxxxxxxxx
Subject: How to retrieve current OS400 targt release 



I need to retrieve current OS400 target release level inside a CL
program. Any ideas?? I tried using the WRKLICINF command, but I don't
seem to have authority in all the AS400 boxes, where the program should
be implemented. I can't trust the DSPLICKEY command also because it
gives information about products not installed along with the products
installed.

Is there any other command or API that can be used??

Thanks,
Ganesh

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.