YES [ EDIT/3000:Reference Manual ] MPE/iX 5.0 Documentation
EDIT/3000:Reference Manual
YES
4-25. YES COMMAND
4-26. PURPOSE
The YES command sets the flag true if it is false.
4-27. FORM
The form of the YES command is
Y[ES]
4-28. DESCRIPTION
The YES command has no effect other than setting the flag true if it is
false. (For example, the YES command does not cause the next command to
be skipped.) In the following example,
WHILE
FIND "PROGRAMMING" (+10)
BEGIN
FIND "PROBLEMS"/*(+10)
CHANGE "PROBLEMS" TO "PROB" IN *
YES
LIST *
END
EDIT/3000 lists a line if the first FIND command (FIND "PROGRAMMING"
(+10)) succeeds. The line is either one that contains "PROGRAMMING" (as
found by the first FIND command"PROBLEMS" within 10 character positions
"PROGRAMMING" , or one that contains "PROGRAMMING" and does not contain
"PROBLEMS" within 10 character positions of "PROGRAMMING" (the second
FIND command failed). In either case, the line is listed. If the second
FIND command fails, setting its flag to false, the YES command sets it
back to true and the LIST * command is executed. Thus, no commands are
skipped. The entire WHILE block repeats until the first FIND command
fails or until the SET TIME = limit value in effect is reached.
4-29. LIMITATIONS
The YES command is not limited to a WHILE block, and can be used to reset
soft errors in a Batch job.
4-30. EXAMPLES
The WORK file is shown below.
/S SHORT;T EDIT3;L ALL
1 1-2. WHAT IS EDIT/3000?
2
3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000
4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM
5 (MPE/3000) THAT IS USED TO CREATE AND
6 MANIPULATE ASCII FILES.
7
8 CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE
9 LINES OF CHARACTERS CAN BE INSERTED, DELETED
10 REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWISE
11 MANIPULATED BY USING EDIT/3000 COMMANDS.
12
13 1-2. EDIT/3000 FEATURES
14
15 WITH EDIT/3000, IT IS POSSIBLE TO
16
17 CREATE AND BUILD A NEW FILE (CALLED A WORK FILE)
18 BY ENTERING COMMANDS AND LINES OF TEXT FROM THE
19 STANDARD INPUT DEVICE OR FROM A SPECIAL DISC FILE
20 CALLED THE HOLD FILE.
21
22 SAVE THE WORK FILE INTO A PERMANENT FILE CALLED
23 THE TEXT FILE.
24
25 CALL THE TEXT FILE BACK INTO THE WORK FILE FOR
26 FURTHER ADDITIONS AND/OR EDITING.
27
28 CHANGE ALL OCCURENCES OF A CHARACTER STRING WITH
29 ONE COMMAND.
30
31 DELETE CHARACTERS AND LINES FROM THE WORK FILE.
The first FIND command in the next example finds the string "EDIT/3000"
in line 1. The second FIND command fails, EDIT/3000 sets its flag to
false and displays an error message. The YES command sets the flag to
true and the LIST * command executes, displaying the line.
If the second FIND command is successful, the LIST * command also is
executed. Thus, the YES command allows the command following it to be
executed by setting a false flag true.
The iterations continue until the first FIND command fails, setting its
flag to false.
/FINDQ FIRST
/WHILE
/ FIND "EDIT/3000"(+9)
/ BEGIN
/ FIND "HP 3000"/*(+20)
/ CHANGE "HP 3000" TO "HEWLETT-PACKARD 3000" IN *
/ YES
/ LIST *
/ END
1 1-2. WHAT IS EDIT/3000?
^ (24 )
*21*STRING NOT FOUND BEFORE LIMIT
AT DEPTH 3
1 1-2. WHAT IS EDIT/3000?
3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000
^ (11 )
3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000
^ (33 )
3 EDIT/3000 IS A SUBSYSTEM OF THE HEWLETT-PACKARD 3000
3 EDIT/3000 IS A SUBSYSTEM OF THE HEWLETT-PACKARD 3000
11 MANIPULATED BY USING EDIT/3000 COMMANDS.
^ (32 )
*21*STRING NOT FOUND BEFORE LIMIT
AT DEPTH 3
11 MANIPULATED BY USING EDIT/3000 COMMANDS.
13 1-2 EDIT/3000 FEATURES
^ (17 )
*21*STRING NOT FOUND BEFORE LIMIT
AT DEPTH 3
13 1-2 EDIT/3000 FEATURES
15 WITH EDIT/3000, IT IS POSSIBLE TO
^ (15 )
*21*STRING NOT FOUND BEFORE LIMIT
AT DEPTH 3
15 WITH EDIT/3000, IT IS POSSIBLE TO
*21*STRING NOT FOUND BEFORE LIMIT
AT DEPTH 2
MPE/iX 5.0 Documentation