|
View previous topic :: View next topic
|
| Author |
Message |
bravas
New User

Joined: 31 Oct 2008 Posts: 6 Location: madrid
|
|
|
|
Hi, I'm looking for a command in 3.14 ISPF menu .
Imagine that a search result in 3.14 menu are jcls, of a library. I would like write a command in the command line and put the cursor over the member name, and display content of jcl (member).
I have the feeling that is impossible with the ISPF's tools .But I have once seen a person unknown.
I guess it achieved through a Clist...
Can be done? |
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm looking at the output results from the 3.14 options. As long as you select View for the Output Mode, you could code an ISPF Edit Macro to process the results the way you want.
<<UPDATE>>
As a matter of fact, having an ISPF Edit Macro like this sounded like a good idea. So I just made one up to work using REXX:
| Code: |
/* REXX */
"ISPEXEC CONTROL ERRORS RETURN"
"ISREDIT MACRO"
"ISREDIT (lin,col) = CURSOR"
Do i = 1 To lin
"ISREDIT (data) = LINE "i
Parse Var data v1 v2 v3 v4 v5 v6 .
If (v4 = 'SRCH' & v5 = 'DSN:') Then thepds = Strip(v6)
If (v2 = '---------' & v3 = 'STRING(S)' & v4 = 'FOUND') Then
Do
"ISPEXEC EDIT DATASET('"thepds"("v1")')"
End
End
Exit 0
|
|
|
| Back to top |
|
 |
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
| A few years ago I saw someone use a tool called SEARCH LIST that looks like what you may have seen before. I just tried it and it seems good. |
|
| Back to top |
|
 |
bravas
New User

Joined: 31 Oct 2008 Posts: 6 Location: madrid
|
|
|
|
is just what I needed.
thanks again
Regards |
|
| Back to top |
|
 |
bodarp
New User
Joined: 04 Mar 2009 Posts: 2 Location: Belgium
|
|
|
|
Hi Superk,
Fine code is
/* REXX */
"ISPEXEC CONTROL ERRORS RETURN"
"ISREDIT MACRO"
"ISREDIT (lin,col) = CURSOR"
Do i = 1 To sourceline()
"ISREDIT (data) = LINE "i
Parse Var data v1 v2 v3 v4 v5 v6 .
If (v4 = 'SRCH' & v5 = 'DSN:') Then thepds = Strip(v6)
If (v2 = '---------' & v3 = 'STRING(S)' & v4 = 'FOUND') Then
Do
"ISPEXEC EDIT DATASET('"thepds"("v1")')"
End
End
Exit 0
I replace lin by sourceline() in the loop.
regards |
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
| bodarp wrote: |
| I replace lin by sourceline() in the loop. |
WHY ? sourceline() is a constant that shows the numbers of lines in the REXX program (in that case, it will always return 14, no matter where the cursor is).
What should have been fixed (maybe) is the fact that it is all members up to the cursor are displayed.
This code will displayed only the last member:
| Code: |
/* REXX */
"ISPEXEC CONTROL ERRORS RETURN"
"ISREDIT MACRO"
"ISREDIT (lin,col) = CURSOR"
Do i = 1 To lin
"ISREDIT (data) = LINE "i
Parse Var data v1 v2 v3 v4 v5 v6 .
If (v4 = 'SRCH' & v5 = 'DSN:') Then thepds = Strip(v6)
If (v2 = '---------' & v3 = 'STRING(S)' & v4 = 'FOUND') Then
themem = Strip(v1)
End
"ISPEXEC EDIT DATASET('"thepds"("themem")')"
Exit 0 |
|
|
| Back to top |
|
 |
bodarp
New User
Joined: 04 Mar 2009 Posts: 2 Location: Belgium
|
|
|
|
Hi Marso,
Yoooooppp , sorry for sourceline().
In fact , in the current macro,
"ISREDIT (lin,col) = CURSOR" returns 1 in LIN.
So, the DO loop does nothing.
Changing the code to retrieve all the lines in the output gives you the number of lines in the output dataset and the LOOP does the EDIT:
/* REXX */
"ISPEXEC CONTROL ERRORS RETURN"
"ISREDIT MACRO"
"ISREDIT (LASTL) = LINENUM .ZLAST"
Do i = 1 To lastl
"ISREDIT (data) = LINE "i
Parse Var data v1 v2 v3 v4 v5 v6 .
If (v4 = 'SRCH' & v5 = 'DSN:') Then thepds = Strip(v6)
If (v2 = '---------' & v3 = 'STRING(S)' & v4 = 'FOUND') Then
Do
"ISPEXEC EDIT DATASET('"thepds"("v1")')"
End
End
Exit 0
Works fine here.
Thks |
|
| Back to top |
|
 |
Debabrata Pruseth
New User

Joined: 11 Dec 2008 Posts: 59 Location: Pune , India
|
|
|
|
| Other way is if you have fileaid installed then you can use the option 3.6 MEMBER search in it. This will give the members containing the search strings and you can browse all members individually . |
|
| Back to top |
|
 |
|
|