Easy way to find out your LANSA for the AS/400 version
| Date: | Archived |
|---|---|
| Product/Release: | LANSA/AD All Releases |
| Abstract: | This program provides an easy way to to find out which release and PC level you have for LANSA for the AS/400 |
| Submitted By: | LANSA Technical Support |
To find out the version of LANSA for the AS/400 currently operating on your AS/400 it is normal to either look in LANSA system internal data area DC@A01 or run a LANSA report and look at that.
There is, however, an easier way. Below is the necessary CL source code to create a program that searches the data area DC@A01 in the relevant library (LANSA for the AS/400 may have been installed more than once on the AS/400 or have not used the default library name DC@PGMLIB). There is also the CMD source code to create a command LANSAVER that prompts for the name of the LANSA System Program library.
Steps to copy, install and compile this code:
- Copy (or retype) the following source code to the AS/400 into a source physical file (eg QCLSRC):
* ************** Beginning of data **************************
/* Program Name: LANSAVER
*/
/* Program Description: DISPLAY DC@A01
DATA AREA VERION INFO */
/* Author Name: DOUG Date Written:2/1/97 */
/* Modification History: */
/* Date: Programmer Details of */
/* DD/MM/YY Initials Modifications */
/* */
/* ***********************************************************/
/* */
LANSAVER: PGM PARM(&LIB)
/* Declarations: */
DCL VAR(&VERSION) TYPE(*CHAR)LEN(10)
DCL VAR(&LIB) TYPE(*CHAR)LEN(10)
DCL VAR(&MAJORREL)TYPE(*CHAR) LEN(1) >
DCL VAR(&MINORREL)TYPE(*CHAR) LEN(1)
DCL VAR(&PC) TYPE(*CHAR)LEN(3)
/* Mainline: */
RTVDTAARA DTAARA(&LIB/DC@A01(47 1)) RTNVAR(&MAJORREL)
RTVDTAARA DTAARA(&LIB/DC@A01(48 1)) RTNVAR(&MINORREL)
RTVDTAARA DTAARA(&LIB/DC@A01(423 2)) RTNVAR(&PC)
CHGVAR VAR(&VERSION) VALUE(&MAJORREL*CAT '.' *TCAT +
&MINORREL *CAT'/' *CAT &PC)
SNDPGMMSG MSGID(VER0001) MSGF(MESSAGES)+
MSGDTA(&VERSION)MSGTYPE(*INFO)
END: ENDPGM
- Copy (or retype) the following source code to the AS/400 into a source physical file (eg QCMDSRC):
* ************** Beginning of data **************************
/* Command Name: LANSAVER */
/* Command Description: DISPLAYS THE RELEASE AND
PC LEVEL OF LANSA*/
/* Author Name: DOUG Date Written: 2/1/97 */
/* Modification History: */
/* Date: Programmer Details of */
/* DD/MM/YY Initials Modifications */
/* */
/* *****************************************************************
/* */
LANSAVER: CMD PROMPT('LANSA Release Level')
PARM KWD(LIBRARY) TYPE(*NAME)LEN(10) +
DFT(DC@PGMLIB) PROMPT('Library name of +
LANSA system')
* ***************** End of data *************************************
- Compile the CL program (Eg CRTCLPGM PGM(LANSAVER))
- Compile the Command (Eg CRTCMD CMD(LANSAVER)PGM(LANSAVER)
- Test your new command (Eg LANSAVER LIBRARY(DC@PGMLIB))