Try this I JUST KNOW I'll get a lot of replies on ways to do it better but
it works for me. 

Yes I know I can PIPE instead of EXECIO But I am OLD so me be set  in my old
ways. 

 

/*  */                                  

PARSE UPPER ARG STR                     

"LISTFILE (EXEC"                        

MAKEBUF                                 

PUSH STR                                

"XEDIT CMS EXEC A (PROF TCMSCAN"        

DROPBUF                                 

SET CMSTYPE HT                          

ERASE CMS EXEC A                        

SET CMSTYPE RT                          

EXIT                                    

 

 

/*  */                                                                   

PULL STR                                                                 

"TRUNC *"                                                                

"L 1"                                                                    

SAY "S C A N   B E G I N S . . . . "                                     

DO FOREVER                                                               

 "EXTRACT /CURLINE"                                                      

 IF CURLINE.3 = "" THEN LEAVE                                            

 PARSE VAR CURLINE.3 . . FILENAME FILETYPE FILEMODE .                    

 "EXECIO * DISKR" FILENAME FILETYPE FILEMODE" (FINIS SKIP LOCATE /"STR"/"

 IF RC = 0 THEN SAY "LOCATED STRING IN" FILENAME FILETYPE                

 "NEXT 1"                                                                

END                                                                      

SAY "S C A N   C O M P L E T E . . . . "                                 

QQUIT                                                                    

EXIT                                                                     

 

 

From: The IBM z/VM Operating System [mailto:[email protected]] On
Behalf Of Schuh, Richard
Sent: Wednesday, July 22, 2009 10:46 AM
To: [email protected]
Subject: Re: Find command

 

It has used GETFILES from the very early days. I may have to abandon it and
add some logic if it doesn't specify OLDDATEREF by default. Of course, this
assumes that updating the reference date when one only looks at the files is
bad. One could take the position that the user was really referencing the
file. I suspect if one would use any other program, BROWSE, SHOW, XEDIT,
etc., to view a file, the last reference date would be updated. What is the
harm in updating the reference date when one peruses a file to see if it
contains specific data strings? 

 

Since the search facility is heavily used and nobody has complained in over
20 years, I will have to add this to a long list of things to think about
and, perhaps, do. 

 

Richard

 

 

 

  _____  

From: The IBM z/VM Operating System [mailto:[email protected]] On
Behalf Of Kris Buelens
Sent: Wednesday, July 22, 2009 1:26 AM
To: [email protected]
Subject: Re: Find command

Richard, as you are using Pipelines as search engine, I hope you use the
OLDDATEREF parameter on the <SFS stage.  This way a search will not
influence the Last Reference date SFS carefully maintains.  
I changed my LOOK package when we found SFS directories with last ref date
of almost all files set to a specific date.  We also created a PIEK EXEC
that avoids changing the SFS last ref date (PIEK in Dutch it is pronounced
the same  as PEEK in English).

(my LOOK package is *not* on the download lib, but I have the similar well
known secrets)

2009/7/21 Schuh, Richard <[email protected]>

If it is a single file that we are interested in, do not forget the ALL
command in XEDIT. ALL /banana/ will limit the display to only those records
containing the string "banana".

If we are just talking about searching a set of files for a set of strings,
I have been using a search facility for a couple of decades. The search is
Pipelines based, allows for simple Boolean expressions (AND, OR and NOT
operators, no parentheses), multiple arguments, per argument or global
specification of columns or case (respect or ignore), etc. If there are any
hits, an XEDIT session is entered for viewing the results. If you want to
edit one of the files in the results display, placing the cursor on one of
its lines and pressing PF11 xedits the file and positions it so that the
line where the cursor was becomes the current line. The files to search and
the search arguments can be specified on the command line or in files. The
arguments may also be entered interactively. When entering arguments via
file, the only constraint is virtual memory; each argument causes an
addpipe. It is pretty darn fast.

<whisper on>
It's a secret - don't tell anybody. I have been known to send the package to
others who have expressed interest.
<whisper off>


Regards,
Richard Schuh




> -----Original Message-----
> From: The IBM z/VM Operating System

> [mailto:[email protected]] On Behalf Of Dave Wade
> Sent: Tuesday, July 21, 2009 12:32 PM
> To: [email protected]
> Subject: Re: Find command
>
> > -----Original Message-----
> > From: The IBM z/VM Operating System
> [mailto:[email protected]]
> > On Behalf Of P S
> > Sent: 21 July 2009 14:24
> > To: [email protected]
> > Subject: Re: Find command
> >
> > On Tue, Jul 21, 2009 at 6:24 AM, Bob
> Woodside<[email protected]>
> > wrote:
> > > On Tuesday 21 July 2009, Philip Hitti wrote:
> > >> Is there any command to find a word in the midle of the
> vm file and
> > >> continue seaching until the end of the text as TSO.
> > >
> > >    I'm not sure what you mean by "as TSO", but IIRC there
> is a grep
> > > command under z/VM. Also, I thought the SuperCE tool was
> available
> > > under z/VM also. Or are you talking about finding a
> string in XEDIT?
> >
> > There's no standard grep on VM. There are several floating around,
> > though. SuperCE is available but isn't free, unless that's changed.
>
> There is a SCANCMS here
>
> http://zvm.sru.edu/~DOWNLOAD/ <http://zvm.sru.edu/%7EDOWNLOAD/> 
>
> but is says it needs "370accom on" so it may need tweaks for zVM...
>
> Dave
> G4UGM
> 




-- 
Kris Buelens,
IBM Belgium, VM customer support

Reply via email to