Microsoft KB Archive/63302

Example of Using CALL X“E6” Special Function in COBOL 3.00

PSS ID Number: Q63302 Article last modified on 06-27-1990

3.00 3.00a MS-DOS

Summary: The following code sample shows how to use the COBOL version 3.00 special function CALL X“E6” to allow you to reposition the cursor at a given line and row on the screen. This article applies to the Microsoft COBOL Optimizing Compiler versions 3.00 and 3.00a for MS-DOS.

More Information: On Page 8-25 of the “Microsoft COBOL Compiler 3.0: Operating Guide” is a description of the CALL X“E6” function. You call this function with the following format: CALL X“E6” USING result, parameter The “result” argument is not used; however, you must specify this argument on the CALL statement. You can define this data item as a PIC X data type.

Code Sample
DATA DIVISION. WORKING-STORAGE SECTION. 01 E6-PARAMS. 05 ROW-Y PIC 99 COMP-X VALUE 15. 05 COL-X PIC 99 COMP-X VALUE 40. 01 E6-RESULT PIC X VALUE &quot;Z&quot;. SCREEN SECTION. 01 CLS. 03 BLANK SCREEN. PROCEDURE DIVISION. DISPLAY CLS. DISPLAY&quot;START PROGRAM&quot; AT LINE 1 COLUMN 1. CALL X&quot;E6&quot; USING E6-RESULT,E6-PARAMS. DISPLAY&quot;IS THIS IN THE MIDDLE OF THE SCREEN?&quot;. MOVE 23 TO ROW-Y. MOVE 50 TO COL-X. CALL X&quot;E6&quot; USING E6-RESULT,E6-PARAMS. DISPLAY&quot;HELLO THERE&quot;. STOP RUN. Copyright Microsoft Corporation 1990.