• Aucun résultat trouvé

SPECIAL CHARACTERS IN FILE IDENTIFIERS

Dans le document FILE MANAGER (Page 81-96)

In HOW TO WRITE A FILE IDENTIFIER we discussed exactly how F.I.'s must be written.

That information described how to write an F.I. for a single file. An F.I., however, may be far more useful with the addition of special characters.

The special characters are the pound sign (#), the asterisk (*), the question mark (?), the commercial "at" sign (@), and the dollar sign ($).

Special or Multiple File Selection (#) (*) (?)

The following commands can be written to locate more than just a single file: OPEN, DIRECTORY, KILL, COPY ... TO, CALL "RENAME," CALL "FILE." By using special characters you can write commands that will find:

• All files on all levels below any 1 st level library.

• All files on any single level.

• All files with common names, common prefixes or common extensions on any single level.

The files involved will be chosen in order of their hashing address. Only "eligible" files will be selected, and files are eligible only if:

• Passwords are entered completely and correctly.

• Device or disc is not write protected.

• The MOUNT c9mmand has been executed.

4907 FILE MANAGER OPERATOR'S @ 4-27

HOW TO WRITE A COMMAND

4-28

Pound Sign (#). The pound sign selects all eligible libraries and files at the level the character is entered as well as all libraries and files at subsequent levels.

Limitations:

1. Only one" #" may be used in any F.I.

2. Slash marks (/) cannot be used immediately adjacent to a "#". The exception is the slash marks assigned automatically in the CALL "USERLlB" command since the slash mark in this instance is "invisible" to the" #."

3. Only one file level (with an optional extension) may be specified to the right of a "#."

EXAMPLES:

These examples show the use of the" #" in an F.I.

Assume "MYLlBRY" is the current library.

Example 1:

"#"

This example locates all files in "MYLlBRY" as shown in Figure 4-11.

1 st level

2nd, 3rd, 4th, 5th levels

2380-27

Figure 4-11. Sample Storage Structure (2 Levels).

@ 4907 FILE MANAGER OPERATOR'S

HOW TO WRITE A COMMAND

Example 2:

"A,#"

This example locates all files on the 3rd, 4th and 5th levels in library "A" as shown in Figure 4-1 2.

1 st level

2nd level

All Files 3rd, 4th, 5th levels

Figure 4-12. Sample Storage Structure (3 Levels).

4907 FILE MANAGER OPERATOR'S @

2380-48

4-29

HOW TO WRITE A COMMAND

4-30

Example 3:

"A/8#"

This example locates all files on the 4th and 5th levels below library "8" as shown in Figu re 4-1 3.

1 st level

2nd level

3rd level

4th, 5th levels

2380-29

Figure 4-1 3. Sample Storage Structure (4 Levels).

@ 4907 FILE MANAGER OPERATOR'S

HOW TO WRITE A COMMAND

Example 4:

"A/B/C#"

This example locates all files on the 5th level below libraries "A," "B," and

"c"

as shown in Figure 4-14.

1st level

2nd level

3rd level

4th level

5th level

2380-30

Figure 4·14. Sample Storge Structure (5 Levels).

4907 FILE MANAGER OPERATOR'S @ 4-31

HOW TO WRITE A COMMAND

Example 5:

"A/B#.BLUE"

This example locates all files under library "B" with the extension "BLUE". All other files in the storage structure with the extension "BLUE" will be ignored.

1 st level

2nd level

3rd level

4th level

5th level

Figure 4-15. Sample Storage Structure (5 Levels).

2380-31

4-32 @ 4907 FILE MANAGER OPERATOR'S

HOW TO WRITE A COMMAND

Asterisk(*). The asterisk may be used three ways:

1. To select all eligible libraries or files at the level or levels the character is entered.

2. To select all eligible libraries or files with a particular prefix.

3. To select all files using extensions with a particular prefix.

Limitations:

1. An asterisk locates only those libraries or files within a single level. All names on preceding and subsequent levels must be specified. If no subsequent names are specified, only files at the asterisk level will be selected.

2. An asterisk cannot be used to locate a file or library with a password.

3. Characters in a name cannot be used to the right of an asterisk; for example,

"00*" is legal but "O*N" is not.

EXAMPLES:

Examples 1 through 4 show how to locate all eligible libraries or files at the level the character is entered. Examples 5 through 7 show how to locate a file, library or extension with a particular prefix. Examples 5 through 7 are not whole F.I.'s but typical entries usable at any level. Assume that MYLIBRY is the current library.

4907 FILE MANAGER OPERATOR'S @ 4-33

HOW TO WRITE A COMMAND

Example 1:

"*/B/C"

This example locates all files named "C" under any 3rd level library named "B"

which is under ANY 2nd level library.

Figure 4-16. Sample Storage Structure (4 Levels, 8 Files).

1st level

2nd level

3rd level

4th level

2380-32

4-34 @ 4907 FILE MANAGER OPERATOR'S

HOW TO WRITE A COMMAND

Example 2:

"A/*/C"

This example locates any file named "C" under ANY 3rd level library which is under 2nd level library "A" in "MYLlBRY."

Example 3:

"A/BI*"

This example locates all 4th level files in the 3rd level library "B" which is under the 2nd level library "A."

Example 4:

"A/B.*"

This example locates all 3rd level files "B" with any extension under 2nd level library

"A." The arrows in Figure 4-17 show these files.

1st level

2nd level

3rd level

Figure 4-17. Sample Storage Structure (3 Levels, 7 Files).

4907 FILE MANAGER OPERATOR'S @

2380-33

4-35

HOW TO WRITE A COMMAND

4-36

Example 5:

A*

This example locates any library or a single file with the first letter of "A" such as these:

Example 6:

AS A1 AASCO

A*.RED

This example locates any file with the first letter "A" and the extension "RED".

Remember that extensions cannot be assigned to library names.

Example 7:

JUMP*

This example locates any library or file with the prefix "JUMP" such as these:

JUMPING JUMP JUMPY

@ 4907 FILE MANAGER OPERATOR'S

HOW TO WRITE A COMMAND

Question Mark (?). The question mark may be used to replace single characters when specifying library names, file names or extensions.

Limitations:

The question mark cannot represent more than a single character.

EXAMPLES:

These examples are not complete F.I.'s but typical entries using the "?" which may be employed at any level. SCRATCHLIB is the current library.

Example 1:

?

This example locates any library or file with a name one character in length.

Example 2:

????

This example locates any library or file name one, two, three or four characters in length.

Example 3:

???I???

This example locates all library names on one level which are one, two, or three characters long with any file on the next level with a name one, two, or three characters long.

4907 FILE MANAGER OPERATOR'S @ 4-37

HOW TO WRITE A COMMAND

4-38

Example 4:

CA?/CO?

This example locates all library or file names on one level with two or three characters beginning with "CA" with any file name on the next level with two or three characters begining with "CO."

The example will locate:

This example will not locate:

USERLIB String Suppression (@)

CA/CO

When a string representing the first part of an F.I. is entered with a CALL "USERLlB"

command, that portion is accessed and placed in front of any F.I. in subsequent commands. This portion is called the current library, and its purpose is to reduce the amount of work and space in accessing files in subsequent commands.

However, it is not always desirable to access a file in the current library. To circumvent the current library, a commercial "at" sign (@) must precede the F.I. By using the "@," the system will access any other library named in the F.I.

@ 4907 FILE MANAGER OPERATOR'S

HOW TO WRITE A COMMAND

EXAMPLES:

100 CALL "USERLlB","YOURLlBRY"

250 OPEN "@ MYLIBRY IA/B";3,"F",A$

300 OPEN "L/M";2,"F",B$

When line 1 00 is executed, "YOURLlBRY" is specified as the current library.

When line 250 is executed, the system accesses "MYLlBRY" because of the "@" in the F.I. and ignores the current library, "YOURLlBRY".

When line 300 is executed, the system automatically accesses the current library,

"YOURLlBRY," and locates 1 st level library "L" and 3rd level file "M."

Remember:

• The" @" must be used to access a user library UNLESS that library is the current library .

• The default current library is SCRATCHLIB .

• The" @" also can be used to create or access a 1 st level file in the same way it creates or accesses a library.

Simplified SYSLIB Access ($)

There are three ways to access SYSLIB (system library):

1. Enter SYSLIB into a CALL "USERLlB" command. The $ should not be used in a CALL

"USERLlB" command.

2. Enter an "@" as the first character in an F.I. followed by "SYSLlB" and the balance of the F.I.

3. Enter a "$" (which reads "SYSLlB" to the 4051) as the first character in an F.I.

followed by the balance of the F.I. No slash mark (I) is necessary after entering the $.

When method 2 or 3 is employed, the current library is ignored.

4907 FILE MANAGER OPERATOR'S @ 4-39

SECTION 5

4907 FILE MANAGER OPERATOR'S

CONTENTS

Introduction ... 5-1 How to Read Command Descriptions ... 5-1 Format ... 5-2

Purpose ... 5-2 Syntax Form ... 5-2 Descriptive Form ... 5-3 Field Definitions ... 5-3 General Information ... 5-3 Prerequisites ... 5-3 Examples ... 5-3 System Commands ... 5-5 Controller/Device Commands ... 5-19 File Management Commands ... 5-43 Fi Ie I/O Commands ... 5-89

@ 4907 FILE MANAGER OPERATOR'S

Section 5

Dans le document FILE MANAGER (Page 81-96)

Documents relatifs