| View previous topic :: View next topic |
| Author |
Message |
antichoc Beginner
Joined: 08 Jun 2006 Posts: 18 Topics: 6
|
Posted: Wed Aug 09, 2006 10:16 am Post subject: Find no comment ... |
|
|
Hello,
I looking for a find command or parameter that can found a string into a programme without search into the comment line ?
When I make a x all and find 'string' command, the program search into the line in comment (* AAAAA)
Thank you for your answer |
|
| Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12399 Topics: 75 Location: San Jose
|
Posted: Wed Aug 09, 2006 10:29 am Post subject: |
|
|
antichoc,
Use the Option DPLINE when searching. Try this job (batch version of 3.15)
| Code: |
//SEARCH EXEC PGM=ISRSUPC,PARM=(SRCHCMP,'')
//NEWDD DD DSN=YOUR FILE TO BE SEARCHED,
// DISP=SHR
//OUTDD DD SYSOUT=*
//SYSIN DD *
SRCHFOR 'your search string'
DPLINE '* '
/*
|
ex:
| Code: |
DPLINE 'PAGE ',87:95 Exclude line if "PAGE " found in columns 87:99
DPLINE 'PAGE ' Exclude if "PAGE " found anywhere on line
|
_________________ Kolusu
www.linkedin.com/in/kolusu |
|
| Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Wed Aug 09, 2006 12:46 pm Post subject: |
|
|
You could stack all commands in one: | Code: | | X ALL;F 'string' ALL;X '*' 7 ALL | and the end result is what you seek. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
| Back to top |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Wed Aug 09, 2006 2:41 pm Post subject: |
|
|
Bill, even shorter:
| Code: | | X '*' 7 ALL; F 'string' NX ALL |
O.
________
mexico hotels
Last edited by ofer71 on Sat Feb 05, 2011 11:39 am; edited 1 time in total |
|
| Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Wed Aug 09, 2006 3:09 pm Post subject: |
|
|
I think antichoc wants to start with EVERYTHING excluded, so I don't think you'll satisfy his need. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
| Back to top |
|
 |
antichoc Beginner
Joined: 08 Jun 2006 Posts: 18 Topics: 6
|
Posted: Wed Aug 09, 2006 5:13 pm Post subject: |
|
|
| Bill, it's exact, this solution are great but I need to see the code around my search, so with the w command, it's not possible ... |
|
| Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Aug 09, 2006 7:03 pm Post subject: |
|
|
You can use my old FINDX macro for this:
[code:1:fc257c5272]/* Rexx - Edit macro to find a string show only lines with the */
/* string and a few lines above and below found strings. */
/* This uses the COMPARE EXCLUDE command to perform the */
/* line exclude function. */
/* -------------------------------------------------------------- */
Address isredit /* */
'MACRO (PARM)' /* Accept input string */
If parm |
|
| Back to top |
|
 |
antichoc Beginner
Joined: 08 Jun 2006 Posts: 18 Topics: 6
|
Posted: Thu Aug 10, 2006 2:13 am Post subject: |
|
|
| thank you, i will try this solution |
|
| Back to top |
|
 |
|
|
|