• Aucun résultat trouvé

The BATCH or RUN Command

Dans le document rn} GOULD (Page 180-187)

Figure 2-5. Default Memory Allocation for Overlays

5.6.2 The BATCH or RUN Command

The BATCH command (the RUN command is equivalent) is used to copy a job file into the batchstream. The file can be the current workfile or another job file in the user's directory. In either case, the file must contain job control statements for a complete job. (See Batch Processing, Volume 1, Chapter 6.)

An alternative to this command is the OPCOM BATCH command as described in Volume 1, Chapter 4.

Syntax:

where:

jobfile

UNN

Response:

BATCH [jobfile] [UNN)

is any one-to-eight character name of a file in the user's directory. If no file is specified, defaults to the current workfile. (To copy another workfile in your directory into the batchstream, use the WORKFILE command, then BATCH.)

changes the line numbers in physical line positions 73-80 to blanks. This is not required for batch processing with any of the SYSTEMS utilities. (See Section 5.4.2.3.)

The file is entered in the batchstream and the EOT

>

prompt is returned. (The OPCOM LIST command can be used to check on the status of the job.)

Errors:

If a job file specified for BATCH is PO (Password Only) protected, the password is required to read it. The prompt:

ENTER PASSWORD

is displayed. Enter the valid password followed by a carriage return. If the password is not valid, the BATCH command terminates.

Errors encountered during batch processing are shown on the listing produced for the job. (See BATCH PROCESSING, Volume 1, Chapter 6.)

(

5.6.3 The CHANGE Command

The CHANGE command is used to replace an existing string with another string.

Existing characters following the replacement string are adjusted left or right to compensate for replacing a string of one length with a longer or shorter string. (It is not uncommon to exceed the 72-character line limit with this command. See Errors.)

Text in tabbed lines will be shifted left or right to adjust for a replacement string just like any other line. To compensate for the shift, you can type extra blanks in the existing string (if it is shorter than the replacement) or type extra blanks in the replacement string (if it> is shorter than the existing string). This will maintain the original alignment of tabbed values.

Syntax:

where:

group

string newstring

NOLIST

Response:

CHANGE [group] \ string\\[newstring] \ [NOLIST]

is a line number, a range of lines, or a group of ranges and/or lines to be modified. (See Section 5.4.1.) A content identifier cannot be used with the CHANGE command.

If a group is not specified, the last range specified in the previous command is used by default.

identifies the existing string to replace. It must be enclosed in backslashes.

is the string to replace the existing string. It must also be enclosed in backslashes. To delete the existing string, replace it with nothing by using two consecutive backslashes.

inhibits the automatic display of lines as they are changed.

recommended on large groups.

Not

As each line is changed, the resulting line is displayed. Changed lines scroll up on the screen, and no intervention except the Break key is possible until a full screen of changes is displayed. At that point, the Editor pauses, waiting for a signal from the terminal.

Use a carriage return to continue the specified changes. Or, use any other character to terminate the command. (A No response to an error prompt also terminates the command. See Errors.)

5-15

Example:

EDT > ...;::C;.;..H~A:....-.=E::X:::.:P~R=. ~E=X~P:.;R~E.;;:SS~I:;:O==-:N~A;.;;L~L

14.

*

OUTPUTS: R6=O GOOD EXPRESSION 15.

*

R7=VALUE OF EXPRESSION

674.

*

FOUND END OF EXPRESSION EDT>

Comment:

In this example, the Editor searches the workfile for every occurrence of the term

"EXPR." and changes each one to "EXPRESSION".

Errors:

If a change in a line results in a line longer than 72 characters, the modified line is displayed with the characters beyond 72 truncated. The following message appears:

TOO LONG, GO = Y

Type Y (Yes) or enter a carriage return to keep the truncated, modified line. Type N (No) to leave the line as it was before you attempted to make the change.

Typing N terminates the CHANGE command.

(_ 5.6.4" The CLEAR Command

£f-f" ,'.

(

The CLEAR command is used to clear the current contents of the workfile. It is used in conjunction with the USE command to access a different disc file or before building text into a new file interactively via a COLLECT command.

To preserve the contents of the workfile before clearing it (e.g., to retain editing changes made since you accessed the Editor), use the SAVE or STORE commands before using CLEAR. (See the SAVE and STORE command descriptions.)

CLEAR is also an option on the USE command. If you have not specifically cleared the workfile already with the CLEAR command or the CLEAR option, USE prompts CLEAR=N, to discourage clearing the workfile, knowing that it must be cleared before you can use another file and assuming that you want to take action to SAVE or STORE the current workfile if you have not done so already.

Note that a file does not have to be read into the workfile with a CLEAR/USE sequence in order to be listed, copied, or printed.

Syntax:

CLEAR Response:

The workfile is cleared and its status is updated as reflected in the SHOW command.

Example:

1 EDT>CLEAR

2 EDT>USE XXX CLEAR Comment:

1 The current contents of the workfile are cleared and the workfile is now 'empty'.

2 The current contents of the workfile are replaced by the contents of file XXX.

Errors:

To be supplied.

5-17

5.6.5 The COLLECT Command

The COLLECT command is used to enter new lines of text into the workfile.

Syntax:

where:

lineno

/lineno

COLLECT [lineno (flineno]] [BY increment]

is the line number in the workfile at which collection is to begin. The least significant digit in the specified line number determines the line numbers the Editor generates for the collected text. (See Section 5.4.2.1.) If the line number you specify currently exists, the Editor adds 1/10 of OEL TA, and provides that line number for you.

If a beginning line number is

!!2!.

specified, EDIT defaults to the line following the last line entered with the previous COLLECT or INSERT command or to E, if neither command has been issued. The line number which prompts for collected text reflects the least significant digit of line numbers used in the previous collection or insertion. (It does not reflect the increment used in the previous command, but defaults back to 1., .1, .01, or .001 as applicable, unless overridden with BY.)

Note that 0., .0, .00, or .000 up to 0.999 are acceptable line numbers. This is useful when inserting lines at the beginning of an existing workfile.

To collect lines at the end of the workfile, use IE' to signify the last line in the file plus 1, e.g., COLLECT E. When E is used, line numbers for collected text will reflect the least significant position and increment of the DELTA 'value for line numbers. See the SET DELTA command.

is the line number in the work file at which collection is to end. This line number must not currently exist. If not specified, collection ends when the Editor reaches a line number that does already exist.

Line numbers used to prompt for collected text reflect the decimal position of the line number specified for beginning or ending the collection, whichever is least significant.

BY increment is an absolute number to add to each line number to generate the next

( Response:

c

The beginning line number is displayed as a prompt. Enter the text of the line followed by a carriage return. From this point on, line numbers are generated automatically. The next sequential line number is displayed. Continue entering lines. A blank followed by a carriage return creates a blank line.

To terminate the command, use a carriage return after the line number is displayed, or depress the Break key. The EDT

>

prompt is returned.

The command terminates automatically if the next line number in a collection sequence already exists or if you have specified a line at which to end collection and have entered

Therefore, it is necessary to set the Editor up with a new command sequence to start-the next collect. In this example we chose start-the E command.

Errors:

If more lines are to be collected than there are available lines, EDIT collects as many lines as it can. It then displays the line number where collection stopped with the message:

lineno NOT PROCESSED.

5-19

Use COLLECT again with a beginning line number specification and/or TO increment that generates enough new lines to accommodate the text that still must be collected.

Start collecting again. (See Section 5.4.2.1 and the lineno descriptions under Syntax.) The NUMBER command can be used if you have gotten to a .nnn position with no line numbers left for insertion. See the NUMBER command.

If you type more than 72 characters in a line, the additional characters are not displayed and the following message appears:

TOO LONG, GO = Y

Type Y (Yes) or enter a carriage return to keep the truncated line as displayed on the screen. Type N (No) to re-enter the line.

(

(/

Dans le document rn} GOULD (Page 180-187)

Documents relatifs