Microsoft KB Archive/40862

CALL X“B0” Fails to Return Proper Printer Status

PSS ID Number: Q40862 Article last modified on 04-20-1993

3.00 3.00a 4.00 | 3.00 3.00a 4.00 MS-DOS | OS/2

Summary: In Microsoft COBOL versions 3.0 and 3.0a, the special subprogram X“B0” is designed to obtain the printer status with one of its functions. However, it fails to properly return a valid status. The status is always the same, regardless of the actual printer status. Microsoft has confirmed this to be a problem in versions 3.0 and 3.0a and in Microsoft COBOL Professional Development System version 4.0 for MS-DOS and MS OS/2. We are researching this problem and will post new information here as it becomes available. To work around to this problem, call an assembly-language subprogram that obtains the printer status to return correct values. Examples of this can be found in this Knowledge Base by querying on the word, PRINTCHK.COB. The following program calls the X“B0” special subprogram, which will return an incorrect value. It should be compiled without a COBOL.DIR file and with the following command lines: COBOL test.cbl; LINK test; $SET ANS85 WORKING-STORAGE SECTION. 01 FIRSTONE PIC 99 COMP-X VALUE 7. 01 SECOND PIC 99 COMP-X. PROCEDURE DIVISION. 000-MAIN. CALL X“B0” USING FIRSTONE, SECOND. DISPLAY “Here is the status:” SECOND. STOP RUN.

Additional reference words: 3.00 3.00a 4.00 Copyright Microsoft Corporation 1993.