Previous Topic: RESTORE FunctionNext Topic: SELBKUP Function


SCAN Function

SCAN searches for occurrences of one through twelve literal character strings. You can search for matching strings through all of the members in a VLS library or you can search only through members that have names that begin with a three-character user ID. You can specify up to 24 three-character user IDs on one SCAN statement.

The SCAN operation writes a listing to AUXPRINT, the auxiliary list file. This listing displays, by member, each line that contains a match for the search string or strings.

Note: The VLSUTIL SCAN function scans the first 80 columns of a VLS member. Columns 1 through 10 contain VLSUTIL control characters. Therefore, SCAN searches only the first 70 columns of the VLS entity.

►►─ SCAN ───┬────────────┬────────────────────────────────────────────────────►◄
            ├─ /ALL/ ────┤
            └─ userlist ─┘
►►─ *string1* ───┬───────────────────┬─┬────────────────────┬─┬─────────┬─────►◄
                 └─ ,BEG= ─┬─ 1 ◄ ─┬─┘ └─ ,END= ─┬─ 80 ◄ ─┬─┘ └─ ,DATE ─┘
                           └─ n ───┘             └─ n ────┘
.
.
.
►►─ *string12* ──┬───────────────────┬─┬────────────────────┬─┬─────────┬─────►◄
                 └─ ,BEG= ─┬─ 1 ◄ ─┬─┘ └─ ,END= ─┬─ 80 ◄ ─┬─┘ └─ ,DATE ─┘
                           └─ n ───┘             └─ n ────┘
►►─ END ──────────────────────────────────────────────────────────────────────►◄
SCAN

Specifies the SCAN function.

/ALL/

Searches all of the members in a VLS library.

userlist

A list of 1 through 24 three-character user IDs. Only members with names that begin with a specified user ID are searched. Separate one user ID from another with a comma (,).

*

The asterisks (*) are search string delimiters. This delimiter can be any special character that is not part of the search string itself.

stringn

A 1- through 72-character search string. The SCAN operation searches for strings that match this search string. You can specify up to 12 search strings.

If you intend to search through the modification date stamps in a VLS library, you must specify stringn as a date in the mmddyy format, where:

mm

Month, from 01 through 12.

dd

Day, from 01 through 31.

yy

Year, from 00 through 99.

If you specify stringn as a date, you must also use the DATE operand.

BEG=

Specifies the column where the search begins. The default is 1.

END=

Specifies the column where the search ends. The default is 80.

DATE

Specifies a search through the modification date stamps of a VLS library. If you specify DATE, you must specify the search string as a date in the mmddyy format.

END

Marks the end of the SCAN function.

Examples

To produce a list of all the members of a VLS library that were updated on January 1, 1996, enter:

SCAN /ALL/
*010196*,DATE
END

To produce a list of all the members of a VLS library that belong to user ID ABC or DEF and contain the string TEST in columns 10 through 20 (corresponding to columns 1 through 10 of the VLS entity), enter:

SCAN ABC,DEF
*TEST*,BEG=10,END=20
END