Use the following general syntax when defining scan arguments:
To search for a ... |
Enter the following argument: |
---|---|
string |
string |
hexadecimal string |
X'hex_string' |
pattern |
P'picture' |
You may enclose the entire search string in single quotation marks. For example, the following two search arguments will lead to the same result:
You must enclose the search string in single quotation marks if the search string includes blanks (see sidehead "Searching for blanks").
The following characters can be used to define picture strings in scan arguments:
This character ... |
Represents ... |
||||||||
---|---|---|---|---|---|---|---|---|---|
A |
any alphabetic character |
||||||||
U |
any uppercase alphabetic character |
||||||||
L |
any lowercase alphabetic character |
||||||||
9 |
any numeric character |
||||||||
B |
a space character (blank) |
||||||||
N |
any non-space character |
||||||||
* |
any single character |
||||||||
S |
any of the following special characters (see hexadecimal notation in table; the characters from codepage 037 (English) and codepage 273/1141 (German) are examples only): |
||||||||
|
Hex |
037 |
273 |
Hex |
037 |
273 |
Hex |
037 |
273 |
|
4D |
( |
( |
7A |
: |
: |
6B |
, |
, |
|
5D |
) |
) |
5E |
; |
; |
6E |
> |
> |
|
5C |
* |
* |
7F |
" |
" |
4C |
< |
< |
|
50 |
& |
& |
7D |
' |
' |
4E |
+ |
+ |
|
6C |
% |
% |
60 |
- |
- |
6F |
? |
? |
|
5B |
$ |
$ |
7E |
= |
= |
4F |
| |
| |
|
7B |
# |
# |
61 |
/ |
/ |
|
|
|
|
7C |
@ |
§ |
4B |
. |
. |
|
|
|
Place two single quotation marks in the scan argument when looking for this character in the list.
For example, to search for a string consisting of two uppercase letters (AB, BC, DE, etc.) enter the following in the scan argument:
To search for a string of two uppercase letters enclosed in single quotation marks ('AB', 'BC', 'DE', etc.), enter the following in the scan argument:
You may also enter the entire search string or part of the search string in hexadecimal notation (see "Searching for hexadecimal strings").
Use single quotation marks to enclose a search string that contains one or several blanks.
Alternatively, you can also code a blank in a search argument as follows:
P'B' or enter a hexadecimal string instead.
The following three search strings are equivalent:
You can also use hexadecimal notation when defining scan arguments.
For example, to search for the string "ABC DEF" (EBCDIC) of the previous example, you can enter the entire search string or part of the search string in hexadecimal notation:
entering the entire search string in hexadecimal notation
entering the blank in hexadecimal notation (ABCX'40'DEF)
entering the blank in hexadecimal notation ('ABCX'40'DEF') and enclosing the entire string in single quotation marks ('ABCX'40'DEF')
You may combine strings, hex strings, and patterns in a scan argument.
For example, to search for the string "LSTn.REPORTn", where n refers to any numeric character, enter one of the following in the scan argument:
The following examples combine a string, a hex string (EBCDIC), and a pattern:
The following examples illustrate how you can define scan arguments using picture strings.
This pattern ... |
Will find ... |
But not ... |
---|---|---|
P'999S999' |
123.456 |
123-ABC |
P'999'-P'999' |
123-456 |
123-ABC |
P'AAAS999' |
ABC.456 |
123-456 |
P'999SUUU' |
123.ABC |
123-456 |
P'LLLS999' |
abc.456 |
123-456 |
The following examples illustrate how you can combine a fixed string and a picture strings when defining scan arguments.
This pattern ... |
Will find ... |
But not ... |
---|---|---|
CUST#P'9' |
CUST#0 |
CUST#A |
CUST-P'A' |
CUST-A |
CUST-1 |
CUST-P'U' |
CUST-A |
CUST-a |
CUST-P'L' |
CUST-a |
CUST-A |
CUSTP'S*' |
CUST#9 |
CUSTAA |
CUSTP'B*' |
CUST 9 |
CUSTAA |
CUSTP'N*' |
CUST-9 |
CUST 9 |