EXECUTE (Execute Library Program)

MCP Control Instruction

Access Level: 1

The EXECUTE command is used to execute a library program on disk or diskpack.

_ EXECUTE ____________ <program name> ________________________________________________| 
           |        |                  |                  | |                    |
           |_ /MCP _|                  |_ ON <medium ID> _| |_ <parameter list> _|
           |        |
           |_ /OWN _|

Explanation

EXECUTE
EX
These are synonymous.

/MCP
This specifies that the bound MCP intrinsic of the name specified is the program to be executed. A user-coded intrinsic of the same name is not executed.

If you specify this option, the ON <medium ID> option (if included) must specify DISK or not be used.

/OWN
This specifies that only the user-coded intrinsic with the correct name can be used.

If the /MCP or /OWN option is omitted, the user-coded intrinsic will be used if present on disk. If not, then the MCP intrinsic will be executed.

<program name>
This is the name of the program to be executed. It must be a permanent file on disk or on the named diskpack (or diskpack family if more than one diskpack is present with the appropriate name).

<medium ID>
This specifies to the MCP the location of the program. The <medium ID> can be one of the following:

DISK This directs the MCP to look for the program to be executed only on 100-byte media. If the program is not found, an appropriate message will be displayed by the MCP.
PACK This directs the MCP to search all of the unrestricted diskpacks on the system for the program to be executed. If the program is not found, an appropriate message will be displayed. The program must be in 180-byte code file format. A 180-byte format code file is created when a code file is copied from disk to diskpack using the PCOPY utility, or when the generating compiler is directed to create such a code file. See COMPILE (Compile Program), in this section.
A diskpack family name This directs the MCP to search for the program to be executed on that diskpack family name only. If the program is not found, an error message will be displayed.

If no <medium ID> is specified, the MCP looks first on disk, then on unrestricted diskpack.

If you don't provide a <medium ID>, the MCP first searches all 100-byte disks for the program. If not found in the disk directory, a search of all unrestricted diskpacks is performed. If the program is not found in the disk directory or in any of the unrestricted diskpacks, an appropriate message is displayed.

You can reduce the extensive search that might result from not using the ON <medium ID> clause by including a CONTROL CODEPACK record in the system configuration file. Including the CONTROL CODEPACK record forces the MCP to look for the program on the specified diskpack only, if the program was not found on disk.

<parameter list>
These are up to three parameters that can be inserted into a program when the program is started.

The <parameter list> option appears in the syntax of the COMPILE (Compile Program), DEBUG (Attach Program to Session), and EXECUTE (Execute Library Program) commands. These parameters allow you to enter Boolean, string, and integer values, which can be used by the program when the program is being compiled or executed.

The syntax for <parameter list> is shown in the following figure.

_ ( _________________________________________________________________ ) ______________| 
     |                 | |                                         |
     |_ <parameter 1> _| |_ , <parameter 2> _______________________|
                         |                   |                   | |
                         |                   |_ , <parameter 3> _| |
                         |                                         |
                         |_ , _ , <parameter 3> ___________________|

The rules for <parameter list> resemble those for parameters in the Work Flow Language (WFL) RUN command.

Integer parameters

* Contain unsigned numeric data up to eight digits in length (8 UN) * Have values ranging from 0 through F * Are right-justified and zero-filled in the high-order digits if less than the maximum length * Will cause a syntax error if greater than the maximum length

String parameters

* Contain alphanumeric data up to six characters in length (6 UA) * Must be within quotation marks. To pass a quoted string as a parameter, a double quote must appear in the parameter string (for example, EXECUTE MYPROG ON PACK (,”TRY” “XX”). * Can be composed of any EBCDIC characters * Are left-justified and blank-filled in the low-order bytes if less than the maximum length * Will be truncated in the low-order bytes if greater than the maximum length

<parameter 1>
This can be an integer up to eight digits in length. It sets the switches at program address 0. For example, EX MYPROG (10100000).

<parameter 2>
<parameter 3>
This can be 8-digit integers or 6-character strings. The value of <parameter 2> is inserted into the code file at base-relative address 8. The value of <parameter 3> at base-relative address 20. For example, EXECUTE /OWN MYPROG (,12345678) or EXECUTE /OWN MYPROG (101,”TOTEST”).

When either <parameter 2> or <parameter 3> are specified, you must have either a value or at least a comma in the preceding parameters. For example, EXECUTE MYPROG /OWN (,,”TAPE”).

A null entry is allowed. For example, EXECUTE MYPROG /OWN (,0,”ABC”” ”) does not change the switches and inserts 00000000 at address 8 and the string “ABC”” at address 20.

Note: Slash parameters were available on previous releases of the MCP. However, slash parameters will be deimplemented in a future release of the MCP. The <parameter list> option replaces them.

Examples

EX BIOG ON PACK; PR 5

This executes the library program BIOG, which resides on PACK, and then assigns the program a setting of 5 for the memory priority, processing and I/O priority, and schedule priority.

EXECUTE /MCP AUDIT (,"TEST10")

This executes the library program AUDIT, an MCP intrinsic that resides on disk, and inserts “TEST10” at base-relative address 8. This command does not set any switches.

EX MDCOPV (0100000)

This executes the MDCOPV utility, which provides maintenance for flexible disks. Starting at memory location 1, this command sets switch number 1 to 1, and switch numbers 2 through 6 to 0.

See also

ssog2/commands/execute.txt · Last modified: 2009/07/07 07:08 by scott
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki