View previous topic :: View next topic |
Author |
Message |
mf_user Intermediate

Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Fri Mar 09, 2007 9:27 am Post subject: Using FAND command in BROWSE mode. |
|
|
Hi,
We have a VB file with 70,000 records. We need to find 2008 orders (6th column) and a 3 character value in the same line (It can be presented anywhere in that line).
I remember using the FAND command and used it but it didn't work in BROWSE mode. I tried it in VIEW mode and it worked (not on this dataset).
I would like to know if there is any command to use in BROWSE mode similar to this.
TIA. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
== |
|
Back to top |
|
 |
mf_user Intermediate

Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Fri Mar 09, 2007 9:29 am Post subject: Info about FAND. |
|
|
Quote: |
FAND (FIND AND)
DESCRIPTION
FAND finds lines that contain multiple strings.
Use RFAND to repeat the find operation.
FORMAT
FAND (STRING1,STRING2,...,STRING8) PARAMETERS
RFAND
STRING1-8 Up to 8 character strings can be found. Separate
strings by commas. Enclose strings with special
characters in apostrophes.
NOTE: Parentheses are required if multiple
strings are specified.
PARAMETERS OPTIONAL PARAMETERS:
O LABEL-RANGE
O NEXT|ALL|FIRST|LAST|PREV
O CHARS|PREFIX|SUFFIX|WORD
O COLUMN-1 (COLUMN-2)
O NX|X
EXAMPLE
COMMAND ===> FAND (SPACES,O-OUTPUT-FIELD)
002500 MOVE ZEROES TO O-OUTPUT-FIELD-1
002600 MOVE SPACES TO O-OUTPUT-FIELD-2
002700 MOVE SPACES TO O-OUTPUT-FIELD-3
RESULT:
COMMAND ===> LINE FOUND
002500 MOVE ZEROES TO O-OUTPUT-FIELD-1
002600 _ MOVE SPACES TO O-OUTPUT-FIELD-2
002700 MOVE SPACES TO O-OUTPUT-FIELD-3
COMMAND ===> RFAND
002500 MOVE ZEROES TO O-OUTPUT-FIELD-1
002600 MOVE SPACES TO O-OUTPUT-FIELD-2
002700 MOVE SPACES TO O-OUTPUT-FIELD-3
RESULT:
COMMAND ===> LINE FOUND
002500 MOVE ZEROES TO O-OUTPUT-FIELD-1
002600 MOVE SPACES TO O-OUTPUT-FIELD-2
002700 _ MOVE SPACES TO O-OUTPUT-FIELD-3
--------------------------------------------------------
COMMAND ===> RFAND
002500 MOVE ZEROES TO O-OUTPUT-FIELD-1
002600 MOVE SPACES TO O-OUTPUT-FIELD-2
002700 MOVE SPACES TO O-OUTPUT-FIELD-3
COMMAND ===> *BOTTOM OF DATA*
002500 MOVE ZEROES TO O-OUTPUT-FIELD-1
002600 MOVE SPACES TO O-OUTPUT-FIELD-2
002700 MOVE SPACES TO O-OUTPUT-FIELD-3
NOTES
Only lines containing all strings specified will be found.
RFAND does not take any parameters.
HELP
In An Edit Session: FAND (Type FAND on the Command Line)
|
_________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
== |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Mar 09, 2007 9:33 am Post subject: |
|
|
FAND is not an ISPF command so is probably a home-grown edit macro and can only be used in edit/view mode. I presume it does a 'find this AND that'. I want one! I think only standard ISPF commands (or commands added to the command table) can be used in browse but I always willing to be eddercated! _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Mar 09, 2007 10:37 am Post subject: |
|
|
mf_user,
1. Go to option 3.15
2. Put the dataset name
3. press pf1
4. Read the sections 1& 2
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
mf_user Intermediate

Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Sat Mar 10, 2007 4:24 am Post subject: wow.... |
|
|
Ok Kolusu. It is very useful. Thanks. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
== |
|
Back to top |
|
 |
mf_user Intermediate

Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Tue Mar 13, 2007 6:47 am Post subject: Here it is how I did it. |
|
|
I searched the dataset using Extended search facility this way...
Code: |
Menu Utilities Options Help
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
Extended Search-For Utility
Command ===>
Search DS Name . . 'DATASET NAME DATASET NAME DATASET NAME00'
PDS Member List . . (blank/pattern - member list, * - search all)
(Leave Search DSN "blank" for concatenated-uncataloged-password panel)
Enter Search Strings and Optional operands (WORD/PREFIX/SUFFIX,C)
Caps . . 1998
Caps . . XX1 C
Caps . .
Asis . .
Asis . .
Listing DSN . . . . SRCHFOR.LIST
Process Options . .
Statements Dsn . . SRCHFOR.STMTS
Enter "/" to select option Execution Mode Output Mode
Bypass selection list 1 1. Foreground 1 1. View
2. Batch 2. Browse
|
This found me the lines with "1998" and "XX1" in the same line.
But, If I want to search for multiple combinations in the same dataset then how to do it?
Pls suggest.
Thanks. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
== |
|
Back to top |
|
 |
|
|