Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Display members from ' a search result' into 3.14 menu

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
bravas

New User


Joined: 31 Oct 2008
Posts: 6
Location: madrid

PostPosted: Mon Mar 02, 2009 9:22 pm    Post subject: Display members from ' a search result' into 3.14 menu
Reply with quote

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
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Mar 02, 2009 9:56 pm    Post subject: Reply to: Display members from ' a search result' into 3.14
Reply with quote

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
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Mon Mar 02, 2009 10:55 pm    Post subject: Reply to: Display members from ' a search result' into 3.14
Reply with quote

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
View user's profile Send private message
bravas

New User


Joined: 31 Oct 2008
Posts: 6
Location: madrid

PostPosted: Wed Mar 04, 2009 1:44 pm    Post subject: Thank you very much
Reply with quote

is just what I needed.

thanks again

Regards
Back to top
View user's profile Send private message
bodarp

New User


Joined: 04 Mar 2009
Posts: 2
Location: Belgium

PostPosted: Thu Mar 05, 2009 3:59 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1228
Location: Israel

PostPosted: Thu Mar 05, 2009 5:49 pm    Post subject:
Reply with quote

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
View user's profile Send private message
bodarp

New User


Joined: 04 Mar 2009
Posts: 2
Location: Belgium

PostPosted: Fri Mar 06, 2009 12:46 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Debabrata Pruseth

New User


Joined: 11 Dec 2008
Posts: 59
Location: Pune , India

PostPosted: Fri Mar 06, 2009 3:15 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts scheduling between OPC and TWS give u... nsbl IBM Tools 4 Sun Mar 12, 2017 5:35 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us