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
 

 

SuperC utility

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 37
Location: India

PostPosted: Fri Nov 14, 2014 6:32 pm    Post subject: SuperC utility
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

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Fri Nov 14, 2014 6:40 pm    Post subject:
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: 37
Location: India

PostPosted: Fri Nov 14, 2014 6:46 pm    Post subject:
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    Post subject:
Reply with quote

Basha,

Why not read manuals first?


http://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: 37
Location: India

PostPosted: Sat Nov 15, 2014 8:42 am    Post subject:
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

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Sat Nov 15, 2014 3:37 pm    Post subject:
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: 258

PostPosted: Sat Nov 15, 2014 4:46 pm    Post subject: Reply to: SuperC utility
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

Senior Member


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

PostPosted: Mon Nov 17, 2014 7:34 pm    Post subject: Reply to: SuperC utility
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm
No new posts Any docs / links for isub- cobol comp... SRICOBSAS COBOL Programming 4 Fri Aug 26, 2016 2:35 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm
No new posts DXT unload utility - DVRE0000 mistah kurtz DB2 1 Thu Jul 07, 2016 4:56 pm
No new posts How to suppress retun code of partil ... mkk157 DB2 9 Fri May 27, 2016 6:59 am


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