Organization: New York State Legislative Bill Drafting Commission
Newsgroups: comp.lang.rexx
Date:         Thu, 19 Nov 1992 09:35:46 EST
From:         Peter Flass <FLASS@LBDRSCS.BITNET>
Subject:      Re: Vmfclear for REXX/MVS
Comments: To: vmoper@evalun11.BITNET

> I know the command VMFCLEAR for clear the screen in an EXEC for CMS
> But I have too MVS, and I need a command to do that in an EXEC for MVS.
> Thanks.

Here is what I use.  I don't claim anything for it except that it works for
me.  Runs under XA and ESA.

----------------- Cut Here ---------------------------------------------
***********************************************************************
*                                                                     *
* MODULE ID: 'VMFCLEAR'                                               *
* AUTHOR:    PETER FLASS, NYS LBDC                                    *
* DATE:      AUGUST, 1991                                             *
* FUNCTION:  ISSUE 'TPUT' TO CLEAR TERMINAL SCREEN.                   *
*                                                                     *
***********************************************************************
         SPACE 3
*
***********************************************************************
* *            G e n e r a l   R e g i s t e r   E q u a t e s      * *
***********************************************************************
*
R0       EQU   0         General Register 0
R1       EQU   1         General Register 1
R2       EQU   2         General Register 2
R3       EQU   3         General Register 3
R4       EQU   4         General Register 4
R5       EQU   5         General Register 5
R6       EQU   6         General Register 6
R7       EQU   7         General Register 7
R8       EQU   8         General Register 8
R9       EQU   9         General Register 9
R10      EQU   10        General Register 10
R11      EQU   11        General Register 11
R12      EQU   12        General Register 12
R13      EQU   13        General Register 13
R14      EQU   14        General Register 14
R15      EQU   15        General Register 15
*
***********************************************************************
*
         SPACE 3
BASE     EQU   R12
         SPACE 3
VMFCLEAR CSECT
VMFCLEAR AMODE 24
VMFCLEAR RMODE 24
         B     BEGIN-VMFCLEAR(,R15)
VMFCLEAR VERSION 1.0
BEGIN    DS    0H
         SAVE  (14,12)             SAVE REGISTERS
         LR    BASE,R15            ESTABLISH NEW BASE
         USING VMFCLEAR,BASE             +
         GETMAIN RU,LV=WALEN       ACQUIRE AND CHAIN SAVEAREAS
         ST    R13,4(,R1)                +
         ST    R1,8(,R13)                +
         LR    R13,R1                    +
         USING WORKAREA,R13
         LH    R0,=H'3'            SET BUFFER LENGTH
         LA    R1,TERMBUF          LOAD BUFFER ADDRESS
         ICM   R1,B'1000',=AL1(FULSCR) SET FULLSCREEN FLAG
         TPUT  (1),(0),R           CLEAR THE SCREEN
         LR    R1,R13              STASH SAVEAREA ADDR
         L     R13,4(,R13)         GET A(CALLER'S SAVEAREA)
         FREEMAIN RU,A=(1),LV=WALEN FREE SAVEAREA
         RETURN (14,12),RC=0       RETURN TO CALLER
         SPACE 1
FULSCR   EQU   X'03'               FLAG FOR TPUT
TERMBUF  DS    0F                  TERMINAL BUFFER
         DC    X'27F583'           ESC, ERASE-WRITE, RESET
         LTORG ,
         SPACE 3
WORKAREA DSECT ,                   SAVEAREA, ETC.
SAVEAREA DS    9D                        +
WALEN    EQU   *-WORKAREA          L'WORKAREA
         END   VMFCLEAR
---------------- End of Program ------------------------------------------

=====================================================================
= PETER FLASS                               FLASS@LBDRSCS           =
= Systems Programmer                        tel (518)458-5114       =
= NYS Legislative Bill Drafting Commission                          =
= 1450 Western Ave.                                                 =
= Albany, NY  12203                                                 =
=====================================================================
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU