Page 1 of 1

CLRSCRN / CLEAR / IKJ? / ISP? supported clear-screen

PostPosted: Fri Oct 21, 2016 12:23 pm
by Steve Coalbran
I am searching for a supported clear-screen module.
Yes, I know that one can code one's own using assembler but this would not necessarily be available at the sites to which I am sending (compiled) REXX code.
I got this one years ago and it's perfect (forgot who wrote it! Doug Nadel I think)
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

Is there not any standard TSO (or better ISPF) module which does this?
An...
ADDRESS ISPEXEC "CONTROL DISPLAY CLEAR"
would have been nice?

Re: CLRSCRN / CLEAR / IKJ? / ISP? supported clear-screen

PostPosted: Fri Oct 21, 2016 1:05 pm
by prino
Have been using this one for years, and I think it's simple enough to be supported by about every systems programmer...

Anyway, if you want something supported, enter an RFE on the IBM site, publish the URL here, on IBM-MAIN, and on ISPF-L and it may attract enough votes to come into supported existence...

FWIW, if you do an XMIT of just ISPCLEAR to an XMI dataset, it will contain 29 lines, you can almost type it in yourself... Or send yourself an email with the data in HEX format and paste it... Or convert it to REXX, I've got a useful macro for this, but at 600 lines it's a bit too long to post here... Actually, I've posted it at the sister-site, EPANQ, together with some samples of EXECs using the generated data.

Re: CLRSCRN / CLEAR / IKJ? / ISP? supported clear-screen

PostPosted: Fri Oct 21, 2016 2:19 pm
by enrico-sorichetti
I would check also

        L        15,=V(ISPQRY)     Load ISPF environment test address  
         LTR      15,15                                                
         BZ       NOISPF            If stub not found , go to exit          
         BALR     14,15             See if ISPF is available            
         LTR      15,15                                                
         BNZ      NOISPF            If not, go to exit