View previous topic :: View next topic |
Author |
Message |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
|
Posted: Tue Jan 23, 2018 10:11 am Post subject: Displaying excluded lines via a macro |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12358 Topics: 75 Location: San Jose
|
Posted: Tue Jan 23, 2018 11:34 am Post subject: |
|
|
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 |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
|
Posted: Tue Jan 23, 2018 1:20 pm Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12358 Topics: 75 Location: San Jose
|
Posted: Tue Jan 23, 2018 2:20 pm Post subject: |
|
|
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 |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
|
Posted: Wed Jan 24, 2018 7:56 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12358 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
|
Posted: Wed Jan 24, 2018 2:32 pm Post subject: |
|
|
Thanks, I'll make a note of that in my "cheat sheet" so I can find it again _________________ Michael |
|
Back to top |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
|
Posted: Wed Jan 24, 2018 2:35 pm Post subject: |
|
|
Sorry, forgot to answer your question about xstatus, will try and get back to you with a result tomorrow _________________ Michael |
|
Back to top |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
|
Posted: Mon Jan 29, 2018 9:12 am Post subject: |
|
|
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
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 |
|
|
|
|