Check out the SET SCOPE command (ie, SET SCOPE DISPLAY) and 'EXTRACT /NBSCOPE/'. While many of the EXTRACT options can be QUERY'd, the NBSCOPE option can only be used through EXTRACT. I assume the code below is part of some larger XEDIT macro since by itself it would have a few bugs.
Of course, if you wanted count the lines, let the DO construct do the work. That is, replace "do until rc \= 0" with "do count=1 by 1 until rc \= 0" From: The IBM z/VM Operating System [mailto:[email protected]] On Behalf Of Huegel, Thomas Sent: Tuesday, May 12, 2009 11:22 AM To: [email protected] Subject: XEDIT macro question I have a simple question about a XEDIT macro. I have a macro that does a locate and select on some lines and then displays the selected lines. My question, is there a way to find the number of lines that have been selected without counting them as I select them? EXTRACT '/selectedlines/' doesn't seem to exist.. snipit: do until rc ¬= 0 /* loop until locate fails (rc > 0) */ 'command set select 1 1' /* set selection level 1 */ 'command up 1' /* go back up one line */ 'command locate /' machid '/' /* look for the rest */ end /* end of loop */ command set shadow off /* turn shadow display off */ command set display 1 1 /* display selected lines */ Thanks
