Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

RUN

&pagelevel(3)&pagelevel

Start command file

Component:

BS2000

Functional area:

Editing command files

Domain:

not allocated

Privileges:

OPERATING

Routing code:

E

Function

This command starts the execution of a command file. The command is acknowledged with console message NBR1000, which specifies a RUN ID. This message specifies a RUN ID, which is also displayed in subsequent event messages during RUN processing. The processing of a command file can be canceled by specifying the CANCEL-RUN-PROCESS command together with the RUN ID.

Command file usage is described in “Command files for the operator” in the “Introduction to System Administration” [14].

Restrictions when using the “Operator LOGON” function

When using the “Operator LOGON” function (system parameter NBCONOPI=Y), note the following:

  • Explicit issuing of a RUN command prior to “SYSTEM READY” is rejected.

  • After “SYSTEM READY”, unrestricted use of the RUN command is possible only for authorized user programs with generated authorization names.

  • After “SYSTEM READY”, the operator cannot issue a RUN command until the operator LOGON has been completed (SET-LOGON-PARAMETERS command). The commands in the RUN file are then processed with the file access rights (permissions) and command privileges of the operator ID. Please note the following:

    • If the user ID is not specified explicitly in the name of the RUN file, it defaults to the operator ID. If the specified file does not exist under the operator ID, the system attempts to run the file under the user ID defined in the NBRUNUID system parameter. If the file does not exist under that user ID, or if no user ID is defined in the system parameter, the system makes a third and last attempt to run the file under the TSOS ID. Searching among the various user IDs ends once the specified file is found in one of them. If the file still cannot be executed (no execute permission or invalid content), the RUN command terminates and the call may have to be corrected and repeated. If the catalog ID is not specified, it defaults to the catalog ID defined in the user catalog as the default for the user ID which is established as described above.

    • The RUN file name completion algorithm also applies to RUN command sequences generated when the RUN file is executed.

    • If RUN files under IDs other than the user’s own are accessed, the file protection attributes are evaluated (access control and passwords). This is of particular significance if the operator ID does not have TSOS privilege.

    • RUN command sequences cannot be processed correctly unless the operator ID is authorized to issue the RUN command and all the commands which are invoked within the RUN command sequence (including commands in follow-up sequences). 

  • The loss of routing codes as the result of an EXIT-JOB command or the failure of the operator terminal takes immediate effect, which means that any commands still awaiting processing which require a routing code other than @ will be rejected. The same applies if operator LOGON has been repeated in the meantime. RUN commands from a physical operator terminal which has become inactive are always rejected, even if @ is the assigned routing code (message NBR1014).

  • The SET-LOGON-PARAMETERS and REQUEST- and RELEASE-OPERATOR-ROLE commands are rejected within a RUN command sequence.

Format

RUN

FROM-FILE = <filename 1..54 without-gen-vers> / *LIBRARY-ELEMENT(...)


*LIBRARY-ELEMENT(...)



|

LIBRARY = <filename 1..54 without-gen-vers>



|

,ELEMENT = <composed-name 1..64>

,FILE-PASSWORD = *NONE / <c-string 1..4> / <x-string 2..8> / <integer -2147483648..2147483647>

With the support of libraries the command syntax has been brought into line with SDF. For reasons of compatibility, the earlier syntax is also accepted for command files which are not contained in a library (FPASS=*STD corresponds to FILE-PASSWORD=*NONE in this case).

Operands

FROM-FILE = <filename 1..54 without-gen-vers> / *LIBRARY-ELEMENT(...)
Name of command file (SAM or ISAM) to be executed.

FROM-FILE = *LIBRARY-ELEMENT(...)
The command file is stored in a PLAM library member.

LIBRARY = <filename 1..54 without-gen-vers>
Name of the PLAM library which contains the command file as a member (type J).

ELEMENT = <composed-name 1..64>
Name of the member.
Only records with format “A” and record type 1 are processed.

FILE-PASSWORD = *NONE / <c-string 1..4> / <x-string 1..8> / <integer -2147483648..2147483647>
Execute password of the command file or read password of the PLAM library.

Notes

  • The system processes the SHOW-PENDING-MSG command with a higher priority than other commands. If this command is specified in a command file, it can overtake other commands which are ahead of it in the command file.

  • Reading of the RUN file can be interrupted by means of an ASTOP command within the file. Commands that have already been read can be processed before reading of the RUN file has been completed. ASTOP wait states can be canceled by means of AGOGO commands. If not enough AGOGO commands are entered during the ASTOP wait states, reading of the RUN file is resumed after 3 minutes. The system parameter NBRUNWT can be used to set a different wait time.

  • An ASTOP command should be included in the RUN file after every 30 commands or so.

  • Only one RUN command can be processed at a time. RUN commands in RUN files are not processed until all other commands in the RUN file have been read.

  • Processing of a RUN file is aborted if a record is more than 201 bytes long.

  • If the content of a record cannot be interpreted or if a record contains an incorrect command, the record is rejected, but processing of the RUN command continues.

Return codes

(SC2)

SC1

Maincode

Meaning


0

CMD0001

No errors

1

0

NBR1018

RUN file empty; command ignored

1

0

NBR1303

RUN library member is empty or contains only unsuitable records (type or format). Command ignored.

2

0

NBR0746

Command revoked

2

0

NBR1005

At least one timeout in ASTOP wait state


1

CMD0202

Syntax error


64

NBR0796

Password in command is missing or wrong


64

NBR0826

Record in RUN file too long


64

NBR1002

Specified file is missing or contains errors


64

NBR1003

Read error during command file processing


64

NBR1015

RUN file on foreign ID and not shareable or protected against execution by GUARDS


64

NBR1305

RUN library does not exist


64

NBR1306

RUN library is not a library


64

NBR1307

RUN library member not found or has incorrect type


64

NBR1308

Password for RUN library missing or incorrect


64

NBR1310

RUN file on foreign ID and not shareable or protected against reading by GUARDS


129

NBR1014

Command rejected because issued from inactive operator terminal


130

NBR0921

Memory shortage


130

NBR1017

Catalog not available


130

NBR1301

General PLAM error, take note of message inserts


130

NBR1304

Library or library member locked in RUN command


130

NBR1309

PLAM not available