Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

IOSID - Request operating system identification and version

&pagelevel(3)&pagelevel

General

Application area:

Requesting and accessing lists and tables; see "Requesting and accessing lists and tables"

Macro type:

Type O; see "O-type macros"

Macro description

The IOSID macro supplies the ID and version number of the operating system. The information is entered in the global text variable &IOSID or in register R1. The entry has one of the following formats:

C'x'

in &IOSID

C'xvvv'

in register R1

where:

x=2:

BS2000

vvv:

version number, e.g. 190 corresponds to V19.0

The entry in &IOSID is made during macro assembly and depends on the macro library in use.

For information on global text variables (variable parameters), see the “ASSEMBH” manual [2 (Related publications)].

Macro format and description of operands

IOSID

[GBLC]

GBLC
Transfers the operating system ID to the global text variable &IOSID.

without operand
The operating system ID and the version number are transferred to register R1.

Example

IOSID    START
         PRINT NOGEN
*
*    Definition of macro QUERY
*
         MACRO ————————————————————————————————————————————————————————  (1) 
&NAME    QUERY
         GBLC  &IOSID
&NAME    NOP   &NAME
         AIF   ('&IOSID'(1,1) EQ '2').BS2 —————————————————————————————  (2) 
         MNOTE 9,'Only BS2000 possible'
.BS2     WROUT MESS,ERROR
ERROR    B     END
MESS     DC    Y(ENDM-MESS)
         DC    X'404001'
         DC    C'Operating system BS2000'
ENDM     EQU   *
END      NOP   &NAME
         MEND
*
*        Program start
*
         BALR  3,0
         USING *,3
         IOSID ————————————————————————————————————————————————————————  (3) 
         ST    1,WORD
         MVC   GR1CONT,WORD
         WROUT GR1OUT,END1
         IOSID GBLC ———————————————————————————————————————————————————  (4) 
CALLMAC  QUERY ————————————————————————————————————————————————————————  (5) 
END1     TERM
GR1OUT   DC    Y(GR1END-GR1OUT)
         DC    X'404001'
         DC    C'Reg1: '
GR1CONT  DS    CL4
GR1END   EQU   *
WORD     DS    F
         END

(1)

The QUERY macro is generated to analyze the contents of &IOSID:

  • Issue message (WROUT) if &IOSID contains the character “2” (BS2000).

  • MNOTE message for all other cases.

(2)

The global text variable &IOSID is requested.

(3)

Operating system ID and version are to be output in register R1.

(4)

The operating system ID is to be output to the global text variable &IOSID.

(5)

Call the QUERY macro.

Runtime log:

/start-assembh
%  BLS0500 PROGRAM 'ASSEMBH', VERSION '<ver>' OF '<date>' LOADED
%  ASS6010 <ver> OF BS2000 ASSEMBH  READY 
//compile source=*library-element(macexmp.lib,iosid), -
//        compiler-action=module-generation(module-format=llm), -
//        module-library=macexmp.lib, -
//        listing=parameters(output=*library-element(macexmp.lib,iosid))
%  ASS6011 ASSEMBLY TIME: 336 MSEC
%  ASS6018 0 FLAGS, 0 PRIVILEGED FLAGS, 0 MNOTES
%  ASS6019 HIGHEST ERROR-WEIGHT: NO ERRORS
%  ASS6006 LISTING GENERATOR TIME: 87 MSEC
//end
%  ASS6012 END OF ASSEMBH
/start-executable-program library=macexmp.lib,element-or-symbol=iosid
%  BLS0523 ELEMENT 'IOSID', VERSION '@' FROM LIBRARY
   ':2OSG:$QM212.MACEXMP.LIB' IN PROCESS
%  BLS0524 LLM 'IOSID', VERSION ' ' OF '<date> <time>' LOADED
Reg1: 2190  ————————————————————————————————————————————————————————————  (6) 
Operating system BS2000  ———————————————————————————————————————————————  (7) 

(6)

Output of the edited register R1 after calling the macro IOSID without operands. The following information is contained:

Operating system: BS2000Version: 19.0

(7)

After calling the macro IOSID with the GBLC operand, the result of the evaluation from the QUERY will be output.