IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SuperC utility


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 44
Location: India

PostPosted: Fri Nov 14, 2014 6:32 pm
Reply with quote

Hi everyone,

I have tried ro develop a tool which actually searchs all available proclib for string and put the results along with member name where the string found, using a superc thru JCL.

But i noticed running a JCL and ISPF 3.4 SRCHFOR both are taking same time to produce results.

Here I would like to copy macro of TSO command SRCHFOR and do a little modifications for an effective and clear output.

Could any please tell me where the TSO SRCHFOR macro resides. Or macro of SRCHFOR.

Thanks in advance,
Basha[/u]
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri Nov 14, 2014 6:40 pm
Reply with quote

SRCHFOR is not a macro, it's one of the many options of the ISRSUPC program written by IBM and the only way you can tailor its output is to use the process options, or to write a program that post-processes the output.
Back to top
View user's profile Send private message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 44
Location: India

PostPosted: Fri Nov 14, 2014 6:46 pm
Reply with quote

Hi Robert,

Thanks for the reply.

I was thinking in this way SRCHFOR is a TSO co
command which internally calls ISRSUPC.

Correct me if am wrong. May be confused. Please clarify.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Sat Nov 15, 2014 8:28 am
Reply with quote

Basha,

Why not read manuals first?


www-01.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.f54u200/sfcmdfgrr.htm
Back to top
View user's profile Send private message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 44
Location: India

PostPosted: Sat Nov 15, 2014 8:42 am
Reply with quote

Hi Sambhaji,


Thanks for the link. I got it. Its a primary command like save, cancel etc.

Thanks all icon_smile.gif
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Sat Nov 15, 2014 3:37 pm
Reply with quote

Khadhar Basha wrote:
I got it. Its a primary command like save, cancel etc.


Whatever gave you the impression that it is a primary command???
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Sat Nov 15, 2014 4:46 pm
Reply with quote

Quote:
Whatever gave you the impression that it is a primary command???

Maybe because IBM include it in the list Data set list utility primary commands
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Mon Nov 17, 2014 7:34 pm
Reply with quote

Quote:
a little modifications for an effective and clear output.

What would you like to do differently?
Back to top
View user's profile Send private message
Jan Leo

New User


Joined: 16 Jan 2015
Posts: 2
Location: Germany

PostPosted: Mon Jan 19, 2015 8:45 pm
Reply with quote

Hi Khadar !
Perhaps the following rexx code may help you. You can add it into your TSO sessions command procedure contatenated library e.g. as member SPJSRCH.
Calling it with TSO SPJSRCH library_name search_argument(s) will provide you with a list shown with ISPEXEC VIEW containing one line per member in a Format:
library_name(member)

Code:

/* rexx =============================================================*/
/*                                                                   */
/* %SPJSRCH means: call with TSO SPJSRCH ...                         */
/*                                                                   */
/* Examples:                                                         */
/*                                                                   */
/* -------- - library -- - search argument -                         */
/* %SPJSRCH SYS1.SAMPLIB ample JCL                                   */
/* %SPJSRCH SYS1.SAMPLIB ' sample JCL '                              */
/* %SPJSRCH SYS1.PARMLIB 'IEASYM'                                    */
/* %SPJSRCH ISP.SISPPENU Compilers                                   */
/*                                                                   */
/* The search argument is case sensitive                             */
/* Quotes me be useful for leading/trailing blanks                   */

  parse arg options

  options = translate(options," ",",") ; wops = words(options)
  if wops < 2 then exit 8

  filter = "" ; lino = 0 ; att = 0 ; mfnd = 0
  myproc = sysvar(sysicmd)
  tempfx = sysvar(syspref)

  supin  = word(options,1) ; supino = supin ; upper supin
  supin  = strip(supin,,"'")
  srarg  = strip(strip(delword(options,1,1)),,"'",)
  help   = translate(supin,"  ","()") ; if words(help) = 2 then do
  supin  = word(help,1)    ; filter = word(help,2)            ; end

  supsi  = "'"tempfx"."myproc".SEQL'"
  supout = "'"tempfx"."myproc".LIST'" ; cntl = msg("OFF")

  call intsupc "'SRCHCMP,''ANYC'''"
  call getres
  call viewres
exit /* from SPJSRCH main line ======================================*/

/*-------------------------------------------------------------------*/
intsupc:
  parse arg supcop

  "FREE  FILE(NEWDD)"
  "ALLOC FILE(NEWDD)    DATASET('"supin"') SHR" ; nrc = rc
  "FREE  FILE(OUTDD SYSIN)"    ; "DELETE" supsi ; "DELETE" supout
  "ALLOC FILE(SYSIN)    DATASET("supsi") NEW"   ; irc = rc
  stm.1 = " SRCHFOR '"srarg"'"                  ; lstm = 1 ; stm.0 = 1
  "EXECIO" lstm "DISKW SYSIN (STEM STM. FINIS)" ; "FREE FILE(SYSIN)"
  "ALLOC FILE(SYSIN)    DATASET("supsi") SHR"   ; crc = rc
  "ALLOC FILE(OUTDD)    DATASET("supout") NEW RECFM(F,B,A) LRECL(121)" ,
  "SPACE(600,300) TRACKS"      ; arc = rc
  "CALL  *(ISRSUPC)" supcop    ; lrc = rc
  "EXECIO  *  DISKR OUTDD (FINIS STEM ON.)"
 "FREE  FILE(SYSIN)" ; "DELETE" supsi

return /* from intsupc ----------------------------------------------*/

/*-------------------------------------------------------------------*/
getres:

  "EXECIO * DISKR OUTDD (FINIS STEM ON.)"
  "FREE  FILE(OUTDD)"
  call sl left("  /* Dataset:" supino "searched for: ",69," ")"*/"
  call sl left("  /*" srarg,69," ")"*/"
  do line = 1 to on.0 ; utln = substr(on.line,2)
  select
    when line = 1 then att = 1
    when att then call process
  otherwise ; end ; end ; "DELETE" supout
  call sl left("  /* Members found:" mfnd,69," ")"*/"
return /* from getres -----------------------------------------------*/

/*-------------------------------------------------------------------*/
process:
  help = utln ; upper help
  if index(utln,"- STRING(S) FOUND -")   = 0  then return
  mbrname = word(utln,1)
  if filter ^= "" then do
  if mbrname ^= filter then  crc = 4
  if crc ^= 0  then return ; end
  mfnd = mfnd + 1
  call sl "  "supin"("mbrname")"
return /* from process ----------------------------------------------*/

/*-------------------------------------------------------------------*/
viewres:

  address "ISPEXEC"    ; "VGET (ZSCREEN) SHARED"   ; address "TSO"
  myprvw = myproc ; if length(myproc) > 7 then myprvw = left(myproc,7)
  view  = "'"tempfx"."myprvw!!zscreen".SEQL'"      ; cntl = msg("OFF")
  "DELETE" view ; "FREE FILE(SYSUT2)" ; VIEW. = "" ; vidx = 0
  "ALLOC FILE(SYSUT2) DATASET("view") NEW RECFM(F,B) LRECL(255)"
  if rc = 0 then do indx = 1 to lino  ; if out.indx = "" then iterate
  vidx  =   vidx + 1   ; VIEW.vidx = out.indx      ; end
  "EXECIO"  vidx "DISKW SYSUT2 (STEM VIEW. FINIS)" ; "FREE FILE(SYSUT2)"
  "ISPEXEC" "CONTROL ERRORS RETURN"
  "ISPEXEC" "VIEW DATASET("view")"                 ; "DELETE" view

return /* from viewres ----------------------------------------------*/

/*-------------------------------------------------------------------*/
sl:

 parse arg output_line
 lino = lino + 1 ; out.lino = output_line
return /* from sl ---------------------------------------------------*/


To read and check this code should use HILITE REXX under ISPF VIEW/EDIT
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts REASON 00D70014 in load utility DB2 6
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts Any JCL or VSAM Utility to get number... JCL & VSAM 1
No new posts DATA SET LIST UTILITY screen TSO/ISPF 6
No new posts exclude the 5 first lines for compare... TSO/ISPF 2
Search our Forums:

Back to Top