IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to clear the screen in Rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jramuk

New User


Joined: 14 Nov 2007
Posts: 18
Location: US

PostPosted: Tue Aug 19, 2008 9:45 am
Reply with quote

Hi,

Can some one tell me how to clear the screen in Rexx
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Aug 19, 2008 10:34 am
Reply with quote

There is no way to clear the screen using REXX only.

You can, however, code a tiny Assembler program, something like this (taken from Google Groups):
Code:
CLS      CSECT
CLS      RMODE ANY
         STLINENO LINE=1,CLEAR=YES
         BR    14
         END


O.
Back to top
View user's profile Send private message
mpawan
Warnings : 2

New User


Joined: 03 Nov 2008
Posts: 42
Location: Pune

PostPosted: Thu Feb 05, 2009 1:19 pm
Reply with quote

how can i call this assembler program in my rexx code
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Feb 05, 2009 1:29 pm
Reply with quote

There are many flavours of calling load modules from within REXX. Please refer to the fine manuals.

O.
Back to top
View user's profile Send private message
mpawan
Warnings : 2

New User


Joined: 03 Nov 2008
Posts: 42
Location: Pune

PostPosted: Thu Feb 05, 2009 1:48 pm
Reply with quote

is there any other method as i am not able to use the assembler program
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Feb 05, 2009 2:02 pm
Reply with quote

Please clarify what do you mean by "not able to use the assembler program"... As far as I know, Assembler is available in all Z/os versions...

O.
Back to top
View user's profile Send private message
manikant pathak

New User


Joined: 09 May 2005
Posts: 37
Location: bangalore

PostPosted: Thu Feb 05, 2009 2:18 pm
Reply with quote

Hi,

I am using the code CLRSCRN in my REXX script here. It does clear the screen before displaying any messages from the script. I don't think this code is shop specific also.

Can you please try tthe same and let us know?

Regards,
Manikant
Back to top
View user's profile Send private message
mpawan
Warnings : 2

New User


Joined: 03 Nov 2008
Posts: 42
Location: Pune

PostPosted: Thu Feb 05, 2009 2:33 pm
Reply with quote

CLRSCRN is working for me.

Thanks
Back to top
View user's profile Send private message
Peter Poole

New User


Joined: 07 Jan 2009
Posts: 50
Location: Scotland

PostPosted: Thu Feb 05, 2009 6:27 pm
Reply with quote

CLRSCRN used (many, many years ago) to be for REXX under VM only.

If it's now supported under TSO I am one happy camper!

(Makes note to su** it and see next time he gets hold of a TSO session!)

Cheers!
Back to top
View user's profile Send private message
smileseenu

New User


Joined: 27 Sep 2006
Posts: 13
Location: India

PostPosted: Fri Feb 27, 2009 11:20 am
Reply with quote

CLRSCRN is work for me as well, Thanks guys..!!
Back to top
View user's profile Send private message
giridaran

New User


Joined: 07 Sep 2006
Posts: 1
Location: Bangalore

PostPosted: Wed Oct 14, 2009 12:46 pm
Reply with quote

Try this

"ISPEXEC SELECT PGM(CLRSCRN)"

Thanks,
Giri
Back to top
View user's profile Send private message
RazVorox

New User


Joined: 19 Oct 2022
Posts: 32
Location: Israel

PostPosted: Tue Jun 27, 2023 12:49 pm
Reply with quote

not working on all/for all.

was wondering - since its a pgm,
any chance to find it in any IBM db or get the member or ..
source code or something?
legally of-course,
where would one look for this magic of a pgm?
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1329
Location: Bamberg, Germany

PostPosted: Tue Jun 27, 2023 5:47 pm
Reply with quote

See CBTTAPE.org for example. It has a bunch of good tools for everyone.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1314
Location: Vilnius, Lithuania

PostPosted: Tue Jun 27, 2023 8:55 pm
Reply with quote

Doug Nadel wrote this one, which is ISPF aware:

Code:
ISPCLEAR CSECT    ,                 ISPF aware clear screen module
ISPCLEAR AMODE    31
ISPCLEAR RMODE    24
         STM      14,12,12(13)
         LR       12,15
         USING    ISPCLEAR,12
         LA       15,SAVEAREA
         ST       15,8(13)
         ST       13,4(15)
         LR       13,15
         STFSMODE INITIAL=YES       Initialize full screen mode
         TPUT     CLR,L'CLR,FULLSCR,,HOLD   Clear the screen
         STLINENO LINE=1            Clear screen & set cursor to line 1
         STFSMODE OFF               Go back to line mode
         STTMPMD  OFF               Let session manager play with us
         TCLEARQ  INPUT             Clear input queue
         L        15,=V(ISPQRY)     Load ISPF environment test address
         BALR     14,15             See if ISPF is available
         LTR      15,15
         BNZ      NOISPF            If not, go to exit
         L        15,=V(ISPLINK)    Load ISPLINK interface address
         LA       1,ISPPARMS        ISPLINK CONTROL DISPLAY REFRESH
         BALR     14,15             To force screen refresh on return
NOISPF   L        13,4(13)
         LM       14,12,12(13)
         XR       15,15             Always return a zero return code
         BR       14
SAVEAREA DS       9D
ISPPARMS DC       A(CONTROL),A(DISPLAY),A(REFRESH+X'80000000')
CONTROL  DC       CL8'CONTROL '
DISPLAY  DC       CL8'DISPLAY '
REFRESH  DC       CL8'REFRESH '
CLR      DC       X'401140403C40400013'
         DS       0F
         LTORG
         END      ISPCLEAR

Rename it to whatever you fancy, or create a bunch of ALIAS'es
Back to top
View user's profile Send private message
RazVorox

New User


Joined: 19 Oct 2022
Posts: 32
Location: Israel

PostPosted: Thu Jun 29, 2023 10:48 am
Reply with quote

Thanks a bunch!!
Gopnna go play with the asm for a while :-)
Back to top
View user's profile Send private message
Vadzim

New User


Joined: 12 Jul 2023
Posts: 1
Location: PL

PostPosted: Wed Jul 12, 2023 10:33 pm
Reply with quote

When ISPF aware clear screen module invoked via REXX from ISPF it show '***' and waiting for <Enter> before cleanup the screen... Is it possible just to cleanup without extra actions?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Wed Jul 12, 2023 11:55 pm
Reply with quote

CONTROL DISPLAY REFRESH

Specifies that the entire screen image is to be rewritten when the next ISPF-generated full-screen write is issued to the terminal. This facility should be used before or after invoking any program that uses non-ISPF services for generating full-screen output.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts Help needed in automation cics transa... CLIST & REXX 1
No new posts Reroute print output via REXX/SDSF TSO/ISPF 6
Search our Forums:

Back to Top