Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

CLIST & REXX :: RE: Display ZEDLMSG without Pressing F1 &To avoid usingword TSO

$
0
0
Author: Willy Jensen
Posted: Fri Dec 16, 2016 2:02 pm (GMT 5.5)

The only solution that I know of which will work everywhere, is using the ISPF Command Table as previously suggested.
I have done something similar to what you describe, though my program scans the screen data copy in variable ZSCREENI for the datasetname under the cursor. Note - I recently changed the Screendsn section, so it might not work in all situations.
The program is called @BEVDS and is stored in SYSEXEC:
Code:

/*                                                                      rexx 
 Browse, Edit or View named dataset                                           
*/                                                                           
 arg what ds .                                                               
 if what='' then exit xmsg("Missing 'what'")                                 
 if ds  ='' then ds=ScreenDsn()                                               
 if ds ='' then exit xmsg("Missing dataset")                                 
 ds="'"strip(ds,"b","'")"'"                                                   
 if Sysdsn(ds)<>'OK' then exit xmsg(ds Sysdsn(ds))                           
 if what='M' then Call MEMLIST                                               
 if length(what)=1 then,                                                     
   what=word('BROWSE EDIT VIEW',pos(what,'BEV'))                             
 address ispexec what "dataset("ds")"                                         
 exit 0                                                                       
                                                                             
Memlist:                                                                     
 address ispexec                                                             
 "lminit  dataset("ds") dataid(did)"                                         
 "memlist dataid("did") field(9)"                                             
 "lmfree  dataid("did")"                                                     
 exit 0                                                                       
                                                                             
ScreenDsn:                                                                   
 address ispexec "vget (zscreeni zscreenc zscreenw zscreend)"                 
 zscreeni=zscreeni '"' '"),'                                                 
 p2=min(pos(' ',zscreeni,zscreenc),,                                         
        pos(')',zscreeni,zscreenc),,                                         
        pos(',',zscreeni,zscreenc))                                           
 p1=max(lastpos(' ',left(zscreeni,zscreenc)),,                               
        lastpos('(',left(zscreeni,zscreenc)),,                               
        lastpos('=',left(zscreeni,zscreenc)))+1                               
 ds=substr(zscreeni,p1,p2-p1)                                                 
 if pos('(',ds)>0 then ds=ds')'                                               
 return ds                                                                   
                                                                             
XMsg: if arg(1)<>'' then say arg(1);return word(arg(2) 0,1)


Then I have 3 command table entries:
BDS executes @BEVDS with option B
EDS executes @BEVDS with option E
VDS executes @BEVDS with option V

The command table program I use is found at CBTTAPE.ORG file 349. I like that 'cause I wrote it, but I know that there are others.
The actual statements when using CBT349 are:
Code:

\BDS\0\SELECT CMD(%@bevds B &zparm)\
\EDS\0\SELECT CMD(%@bevds E &zparm)\ 
\VDS\0\SELECT CMD(%@bevds V &zparm)\

_________________
WJ


Viewing all articles
Browse latest Browse all 8500

Trending Articles