Re: SRCHFOR for multile strings

2006-09-18 Thread Robert Bardos
Jim,

I did what I often do when I don't know the features of commands.
I enter them in a form that triggers an error message (srchfor
gaga gaga). Pressing help gave:

Es
sN
e Only one search string may be specified on this panel. Enter
SRCHFOR with no e
e operands for other options.
e
Ds
sM

Kind regardos

Robert Bardos
Ansys AG, Zürich, Switzerland



-Ursprüngliche Nachricht-
Von: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED]
Auftrag von Jim McAlpine
Gesendet: Montag, 18. September 2006 11:33
An: IBM-MAIN@BAMA.UA.EDU
Betreff: SRCHFOR for multile strings


Is it possible to use SRCHFOR to search for string1 AND string2
and
only show members that contain both strings.  I can't seem to see
a process
option that does that.  FINDALL gets me any member containing
either
string.  Alternatively, is there anything on the CBTTAPE.

Jim McAlpine

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: SRCHFOR for multile strings

2006-09-18 Thread Norbert Friemel
On Mon, 18 Sep 2006 10:33:17 +0100, Jim McAlpine wrote:

Is it possible to use SRCHFOR to search for string1 AND string2 and
only show members that contain both strings.  I can't seem to see a process
option that does that.  FINDALL gets me any member containing either
string.  Alternatively, is there anything on the CBTTAPE.


PDS Command (File 182)?

//S1  EXEC PGM=IKJEFT01
//SYSTSPRT  DD SYSOUT=*
//SYSTSIN   DD *   
  PDS 'my.lib' 
  FIND $:Z ' target1 ' THEN(SUBLIST)  
  FIND * ' target2 ' THEN(LIST)
/*

Norbert Friemel

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: SRCHFOR for multile strings

2006-09-18 Thread Tom Marchant
On Mon, 18 Sep 2006 10:33:17 +0100, Jim McAlpine [EMAIL PROTECTED] 
wrote:

Is it possible to use SRCHFOR to search for string1 AND string2 and
only show members that contain both strings.  I can't seem to see a process
option that does that.  FINDALL gets me any member containing either
string.  Alternatively, is there anything on the CBTTAPE.

Look at HELP under Specifying the search string.  C 
indicates continuation.  e.g.

string1
string2 c

Tom Marchant

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: SRCHFOR for multile strings

2006-09-18 Thread Jim McAlpine

Norbert, that does work but unfortunatley I end up with 500,000 lines of
output with the source of every member that is successfully found when all I
really want is a list of members.  Obviously I can edit the ouitput
somehow but it''s a bit kludgy.

Jim McAlpine


On 9/18/06, Norbert Friemel [EMAIL PROTECTED] wrote:


On Mon, 18 Sep 2006 10:33:17 +0100, Jim McAlpine wrote:

Is it possible to use SRCHFOR to search for string1 AND string2 and
only show members that contain both strings.  I can't seem to see a
process
option that does that.  FINDALL gets me any member containing either
string.  Alternatively, is there anything on the CBTTAPE.


PDS Command (File 182)?

//S1  EXEC PGM=IKJEFT01
//SYSTSPRT  DD SYSOUT=*
//SYSTSIN   DD *
PDS 'my.lib'
FIND $:Z ' target1 ' THEN(SUBLIST)
FIND * ' target2 ' THEN(LIST)
/*

Norbert Friemel

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: SRCHFOR for multile strings

2006-09-18 Thread Norbert Friemel
On Mon, 18 Sep 2006 13:08:44 +0100, Jim McAlpine wrote:

Norbert, that does work but unfortunatley I end up with 500,000 lines of
output with the source of every member that is successfully found when all I
really want is a list of members.  Obviously I can edit the ouitput
somehow but it''s a bit kludgy.


//S1  EXEC PGM=IKJEFT01 
//SYSTSPRT  DD DSN=amp;SYSTSPRT,DISP=(,PASS,DELETE),  
// SPACE=(TRK,(45,45))  
//SYSTSIN   DD *
PDS 'my.lib'
FIND $:Z 'string1' THEN(SUBLIST) 
FIND * 'string2' THEN(MEMBERS)
/*  
//S2  EXEC PGM=ICETOOL  
//TOOLMSG   DD SYSOUT=* 
//DFSMSGDD SYSOUT=* 
//INDD DSN=amp;SYSTSPRT,DISP=(OLD,DELETE) 
//OUT   DD SYSOUT=* 
//INCLCNTL  DD *
  INCLUDE COND=(2,20,SS,EQ,C'** FIND')  
//TOOLINDD *
  COPY FROM(IN) TO(OUT) USING(INCL) 
/*   

Better?

Norbert Friemel   

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: SRCHFOR for multile strings

2006-09-18 Thread Robert Bardos
Or a combination of SRCHFOR and SAS

//SEARCH  EXEC PGM=ISRSUPC,
// PARM=(SRCHCMP,'ANYC,FINDALL,XREF,NOPRTCC,NOSUMS')
//NEWDD DD DSN=input_dataset,DISP=SHR
//OUTDD DD DSN=LISTING,DISP=(,PASS),SPACE=(CYL,1)
//SYSIN DD *
 SRCHFOR  '%sysfunc'
 SRCHFOR  'getoption'
 SRCHFOR  'outfile'
 CMPCOLM  1:72
 LNCT 45
//STEP010 EXEC SAS8,OPTIONS='noovp nonews ls=79 ps=40',COND=(1,NE)
//SRCHFOR   DD DSN=LISTING,DISP=(OLD,DELETE)
//SYSIN DD *
  data memnames (keep=member) / view=memnames;
infile srchfor;
input;
if scan(_infile_,-2,' ') ne 'IN' then delete;
if input(scan(_infile_,1,' '),?? 6.) ne . then delete;
member = scan(_infile_,-1,' ');
  run;
  proc sql;
select * from
  ( select count(member) as number, member
  from memnames group by member )
 having number = max(number)
 order by member
 ;
  quit;
//

With the usual caveats like one should not rely on output
listings as API, developed in haste etc. etc. Should you have
access to SAS you might give it a try.

Sorry for misreading your inital post.

Robert

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: SRCHFOR for multile strings

2006-09-18 Thread Jim McAlpine

No SAS here Robert, but thanks anyway.

Jim McAlpine


On 9/18/06, Robert Bardos [EMAIL PROTECTED] wrote:


Or a combination of SRCHFOR and SAS

//SEARCH  EXEC PGM=ISRSUPC,
// PARM=(SRCHCMP,'ANYC,FINDALL,XREF,NOPRTCC,NOSUMS')
//NEWDD DD DSN=input_dataset,DISP=SHR
//OUTDD DD DSN=LISTING,DISP=(,PASS),SPACE=(CYL,1)
//SYSIN DD *
SRCHFOR  '%sysfunc'
SRCHFOR  'getoption'
SRCHFOR  'outfile'
CMPCOLM  1:72
LNCT 45
//STEP010 EXEC SAS8,OPTIONS='noovp nonews ls=79 ps=40',COND=(1,NE)
//SRCHFOR   DD DSN=LISTING,DISP=(OLD,DELETE)
//SYSIN DD *
data memnames (keep=member) / view=memnames;
   infile srchfor;
   input;
   if scan(_infile_,-2,' ') ne 'IN' then delete;
   if input(scan(_infile_,1,' '),?? 6.) ne . then delete;
   member = scan(_infile_,-1,' ');
run;
proc sql;
   select * from
 ( select count(member) as number, member
 from memnames group by member )
having number = max(number)
order by member
;
quit;
//

With the usual caveats like one should not rely on output
listings as API, developed in haste etc. etc. Should you have
access to SAS you might give it a try.

Sorry for misreading your inital post.

Robert

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: SRCHFOR for multile strings

2006-09-18 Thread Jim McAlpine

No Simplist either Dave, but thanks anyway.

Jim McAlpine


On 9/18/06, Dave Salt [EMAIL PROTECTED] wrote:


Jim,

If you have SimpList installed, enter any number of SEEK commands on the
member list command line. For example:

=== seek apple all
=== seek berry suffix 10 20 all
=== seek 'red grape' 60 all

The resulting member list will only display the members containing all of
the specified strings. Members can be selected for any function (e.g.
copy,
edit, print, transfer to PC, etc), or you can print a report of all the
members that matched the criteria. At any point you can reverse back
through
the chain; e.g. go back to the list of members containing 'apple' and
'berry' and perform a new search for 'white grape' instead of 'red grape'.

HTH,

Dave Salt
SimpList(tm) - The easiest, most powerful way to surf a mainframe!
http://www.mackinney.com/products/SIM/simplist.htm





From: Jim McAlpine [EMAIL PROTECTED]
Reply-To: IBM Mainframe Discussion List IBM-MAIN@BAMA.UA.EDU
To: IBM-MAIN@BAMA.UA.EDU
Subject: SRCHFOR for multile strings
Date: Mon, 18 Sep 2006 10:33:17 +0100

Is it possible to use SRCHFOR to search for string1 AND string2 and
only show members that contain both strings.  I can't seem to see a
process
option that does that.  FINDALL gets me any member containing either
string.  Alternatively, is there anything on the CBTTAPE.

Jim McAlpine

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: SRCHFOR for multile strings

2006-09-18 Thread Jim McAlpine

That's great Norbert, thanks.  Isn't PDS wonderful.  One of these days I'll
get a chance to have a real good look at it.

Jim McAlpine


On 9/18/06, Norbert Friemel [EMAIL PROTECTED] wrote:


On Mon, 18 Sep 2006 13:08:44 +0100, Jim McAlpine wrote:

Norbert, that does work but unfortunatley I end up with 500,000 lines of
output with the source of every member that is successfully found when
all I
really want is a list of members.  Obviously I can edit the ouitput
somehow but it''s a bit kludgy.


//S1  EXEC PGM=IKJEFT01
//SYSTSPRT  DD DSN=amp;SYSTSPRT,DISP=(,PASS,DELETE),
// SPACE=(TRK,(45,45))
//SYSTSIN   DD *
PDS 'my.lib'
FIND $:Z 'string1' THEN(SUBLIST)
FIND * 'string2' THEN(MEMBERS)
/*
//S2  EXEC PGM=ICETOOL
//TOOLMSG   DD SYSOUT=*
//DFSMSGDD SYSOUT=*
//INDD DSN=amp;SYSTSPRT,DISP=(OLD,DELETE)
//OUT   DD SYSOUT=*
//INCLCNTL  DD *
INCLUDE COND=(2,20,SS,EQ,C'** FIND')
//TOOLINDD *
COPY FROM(IN) TO(OUT) USING(INCL)
/*

Better?

Norbert Friemel

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html