MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Displaying excluded lines via a macro

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Tue Jan 23, 2018 10:11 am    Post subject: Displaying excluded lines via a macro Reply with quote

I would like to be able to exclude all lines in some code, and then show ONE specific line as well as 2-3 lines above and below it (for context). I've tried with the following:-
Code:

address ISREDIT                                             
'x all'                                                     
'find SIMMIC all'                                           
'find SIMMIC first nx'                                     
'(v1,v2) = cursor'    /* Get where we are */               
v1 = v1 - 1 /* Point up a line */                           
'cursor = 'v1' 1' /* Set the cursor to the hidden line ? */
/* Enter the L command in the prefix area to show 3 lines   
   ABOVE the first occurrence of SIMMIC */                                                                           
'L3'                                                       


If I do the above manually (apart from the cursor and L3 processing) by placing the cursor on the dotted line above the first SIMMIC and entering L3, I see the 3 lines of data before the first SIMMIC.

How do I do this in a macro ?????
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Tue Jan 23, 2018 11:34 am    Post subject: Reply with quote

misi01,

You need to use XSTATUS in a loop

something like this
Code:

..
v1 = v1 - 1 /* Point up a line */   
V2 = V1 + 3

DO i = v1 TO v2                                     
    "XSTATUS" i "= NX"                                       
  END

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Tue Jan 23, 2018 1:20 pm    Post subject: Reply with quote

Thanks Kolusu.

I'll try it tomorrow. (I have a suspicion I've asked this before using the (( and )) commands, but, for the life of me, I can't remember or find anything similar via Google)
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Tue Jan 23, 2018 2:20 pm    Post subject: Reply with quote

misi01 wrote:
Thanks Kolusu.

I'll try it tomorrow. (I have a suspicion I've asked this before using the (( and )) commands, but, for the life of me, I can't remember or find anything similar via Google)


Misi01,

)) command is used to move lines to the RIGHT by 2 positions and (( command is used to move the lines to LEFT by 2 positions.

Both of these command have nothing to do with EXCLUSE and FLIP commands
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Wed Jan 24, 2018 7:56 am    Post subject: Reply with quote

No, I realize that.

However they're similar inasmuch as the comparison was to do with ANY line commands entered in the prefix area; how do you code them in an edit macro? (and no, I'm NOT looking for shifting left/right in a macro, just line commands in general in a macro)
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Wed Jan 24, 2018 10:44 am    Post subject: Reply with quote

misi01 wrote:
No, I realize that.

However they're similar inasmuch as the comparison was to do with ANY line commands entered in the prefix area; how do you code them in an edit macro? (and no, I'm NOT looking for shifting left/right in a macro, just line commands in general in a macro)


Misi01,

Did the XSTATUS give you the results you looking for ?

Check this link which explains running LINE COMMANDS in Edit macro

https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.f54em00/plcfcnt.htm
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Wed Jan 24, 2018 2:32 pm    Post subject: Reply with quote

Thanks, I'll make a note of that in my "cheat sheet" so I can find it again
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Wed Jan 24, 2018 2:35 pm    Post subject: Reply with quote

Sorry, forgot to answer your question about xstatus, will try and get back to you with a result tomorrow
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Mon Jan 29, 2018 9:12 am    Post subject: Reply with quote

Kolusu. Tested your XSTATUS solution today and it worked a treat.

The reason I wanted it is that I have a macro that will allow you to point at a cobol variable, press a PF-key and it will then search for that variable, either in working-storage or in a "chain" of copybooks.

If the variable is defined in a copybook, I want to be able to edit and show only that variable. Trouble with that is that if the variable is a group variable, seeing a line such as
Code:

03  AM40-SVAR.

doesn't really say much. For that reason, I wanted to reverse the exclude for a number of lines around it so the user gets some idea of the context of the definition.

Thanks
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group