|
CEEGPID
retrieves the Language Environment version
ID and the platform ID of the version and platform of Language Environment that
is processing the currently active condition.
Syntax
>>-CEEGPID--(--CEE_Version_ID--,--Plat_ID--,--fc--)------------><
- CEE_Version_ID (output)
- A four-byte hexadecimal number representing the version of Language Environment that
created this data block.
|pp|vv|rr|mm|
pp = Product Number
vv = Version
rr = Release
mm = Modification
The current value of this parameter
is:
- X'04010800'
- Version 1 Release 8 Modification 0
- X'04010900'
- Version 1 Release 9 Modification 0
- X'04010A00'
- Version 1 Release 10 Modification 0
- X'04010B00'
- Version 1 Release 11 Modification 0
- X'04010C00'
- Version 1 Release 12 Modification 0
- X'04010D00'
- Version 1 Release 13 Modification 0
- X'04020100'
- Version 2 Release 1 Modification 0
- Plat_ID (output)
- A fullword integer representing the platform used for processing
the current condition. The current values of this parameter are:
- 3
- z/OS or
VM
- 4
- AS/400®
- fc (output)
- A 12-byte feedback code, optional in some languages,
that indicates the result of this service. If you choose to omit this
parameter, refer to Invoking callable services for the
appropriate syntax to indicate that the feedback code was omitted.
The
following symbolic conditions can result from this service:
Code |
Severity |
Message number |
Message text |
---|
CEE000 |
0 |
— |
The service completed successfully. |
Usage notes - z/OS UNIX consideration—In
multithread applications, CEEGPID affects only the calling thread.
- To make a decision concerning Language Environment® and z/OS® levels at assembly time instead
of runtime, use CEEGLOB instead. See z/OS Language Environment Programming Guide for
more information.
Examples - Following is an example of CEEGPID called by C/C++.
/*Module/File Name: EDCGPID */
/****************************************************/
/****************************************************/
/* Note that the format of data returned by CEEGPID */
/* changed in OS/390 V2R10. This sample tests the */
/* version and chooses the appropriate format. */
/****************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <leawi.h>
#include <ceeedcct.h>
int main(void) {
_INT4 cee_ver_id, plat_id;
_FEEDBACK fc;
int Vmask= 0x00FF0000;
int Rmask= 0x0000FF00;
int Mmask= 0x000000FF;
/* get the LE version and the platform id */
CEEGPID(cee_ver_id,plat_id,fc);
if ( _FBCHECK ( fc , CEE000 ) != 0 ) {
printf("CEEGPID failed with message number %d\n",
fc.tok_msgno);
exit(2999);
}
/* If platform is z/OS and LE is at release 2.10 or later, */
/* use the new interface definition. */
if ((plat_id == 3) & (cee_ver_id > 290)) {
printf("The LE version id is %08X\n",cee_ver_id);
printf(" Version: %d\n",(Vmask & cee_ver_id)>>16);
printf(" Release: %d\n",(Rmask & cee_ver_id)>>8);
printf(" Modification: %d\n\n",Mmask & cee_ver_id);
}
/* else use the old interface */
else {
printf("The LE version is %d\n",cee_ver_id);
}
printf("The current platform is ");
switch(plat_id) {
case 3: printf("z/OS\n");
break;
case 4: printf("AS/400\n");
break;
default: printf("unrecognized platform id\n");
}
}
- Following is an example of CEEGPID called by COBOL.
CBL LIB,QUOTE
*************************************************
*Module/File Name: IGZTGPID
*************************************************
** **
** IGZTGPID - Call CEEGPID to retrieve the **
** LE version and platform ID **
** **
*************************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. IGZTGPID.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 VERSION PIC S9(9) BINARY.
01 VER-MAP REDEFINES VERSION.
03 FILLER PIC X(1).
03 VER-VERSION PIC X(1).
03 VER-RELEASE PIC X(1).
03 VER-MOD PIC X(1).
01 WORK-AREA.
03 WORK-BIN PIC S9(4) BINARY.
03 WORK-BIN-BY-BYTE REDEFINES WORK-BIN.
05 WORK-BIN-BYTE1 PIC X(1).
05 WORK-BIN-BYTE2 PIC X(1).
01 VERSION-F PIC 99.
01 RELEASE-F PIC 99.
01 MOD-F PIC 99.
01 PLATID PIC S9(9) BINARY.
01 FC.
02 Condition-Token-Value.
COPY CEEIGZCT.
03 Case-1-Condition-ID.
04 Severity PIC S9(4) BINARY.
04 Msg-No PIC S9(4) BINARY.
03 Case-2-Condition-ID
REDEFINES Case-1-Condition-ID.
04 Class-Code PIC S9(4) BINARY.
04 Cause-Code PIC S9(4) BINARY.
03 Case-Sev-Ctl PIC X.
03 Facility-ID PIC XXX.
02 I-S-Info PIC S9(9) BINARY.
PROCEDURE DIVISION.
PARA-CBLGPID.
** Call CEEGPID to return the version and
** platform ID
CALL "CEEGPID" USING VERSION , PLATID , FC.
IF NOT CEE000 of FC THEN
DISPLAY "CEEGPID failed with msg "
Msg-No of FC UPON CONSOLE
STOP RUN
END-IF.
** If platform is OS/390 or VM and version is greater than 290,
** then use different format of VERSION.
IF PLATID = 3 AND
VERSION > 290 THEN
** Format the version, release, and modification level
MOVE 0 to WORK-BIN
MOVE VER-VERSION TO WORK-BIN-BYTE2
MOVE WORK-BIN TO VERSION-F
MOVE VER-RELEASE TO WORK-BIN-BYTE2
MOVE WORK-BIN TO RELEASE-F
MOVE VER-MOD TO WORK-BIN-BYTE2
MOVE WORK-BIN TO MOD-F
DISPLAY "Currently running version " VERSION-F
" release " RELEASE-F " modification " MOD-F
" of IBM Language Environment"
ELSE
DISPLAY "Currently running version " VERSION
" of IBM Language Environment"
END-IF
** Evaluate PLATID to display this platform
EVALUATE PLATID
WHEN 3
DISPLAY "on OS/390 or VM"
WHEN 4
DISPLAY "on an AS/400"
END-EVALUATE
GOBACK.
- Following is an example of CEEGPID called by PL/I.
*PROCESS MACRO;
/* Module/File Name: IBMGPID */
/****************************************************/
/** **/
/** Function: CEEGPID - Get LE/370 Version **/
/** and Platform ID **/
/** **/
/** This example calls CEEGPID to get the **/
/** version and platform of Language **/
/** Environment that is currently running. **/
/** This information is then printed out. **/
/** **/
/****************************************************/
PLIGPID: PROC OPTIONS(MAIN);
%INCLUDE CEEIBMAW;
%INCLUDE CEEIBMCT;
DCL VERSION REAL FIXED BINARY(31,0);
DCL PLATID REAL FIXED BINARY(31,0);
DCL 01 FC, /* Feedback token */
03 MsgSev REAL FIXED BINARY(15,0),
03 MsgNo REAL FIXED BINARY(15,0),
03 Flags,
05 Case BIT(2),
05 Severity BIT(3),
05 Control BIT(3),
03 FacID CHAR(3), /* Facility ID */
03 ISI /* Instance-Specific Information */
REAL FIXED BINARY(31,0);
/* Call CEEGPID to get the version and platform */
/* of Language Environment that is currently */
/* running */
CALL CEEGPID ( VERSION, PLATID, FC );
IF FBCHECK( FC, CEE000) THEN DO;
PUT SKIP LIST
('Language Environment Version ' || VERSION);
PUT LIST (' is running on system ');
SELECT (PLATID);
WHEN (2) PUT LIST( 'OS/2');
WHEN (3) PUT LIST( 'MVS/VM/370');
WHEN (4) PUT LIST( 'AS/400');
END /* Case of PLATID */;
END;
ELSE DO;
DISPLAY( 'CEEGPID failed with msg '
|| FC.MsgNo );
STOP;
END;
END PLIGPID;
|