Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Time limits in BS2000

&pagelevel(4)&pagelevel

In BS2000 there are three different time limits which are of relevance to time-sharing users: These are specific to user IDs, tasks and program runs respectively.

A user-ID-specific time limit is defined by systems support in the user entry. At task termination the accounting system in BS2000 deducts the CPU time used from this time allotment.

For a task, the maximum CPU time (task time limit, TTL) can be specified at start time. The maximum CPU time that can be specified is the minimum possible from the time allotment in the user entry and from the maximum value from the job class definition. If no maximum CPU time is specified, the default value from the job class definition or, if applicable, the lower time allotment in the user entry is taken over as the maximum CPU time for the task. The TSOS user ID and users having the privilege No-Time-Limit in their user entry can start tasks without any time limit (NTL tasks). In a job class in whose job class definition, the default value for the maximum CPU time is not restricted (CPU-LIMIT is displayed with DEFAULT=NO-LIMIT and MAXIMUM=NO-LIMIT in the output from the SHOW-JOB-CLASS command), users can start tasks without any restriction on time even if there is no corresponding user entry.

Since the time allotment in the user entry is not updated until the task has terminated, the maximum CPU time (and possibly the CPU time actually used) for two or more tasks of one user ID may together exceed the time allotment.

When a program is loaded or started, a maximum program run time can be specified for the relevant program run (program time limit, PTL).

Interactive and batch jobs behave differently in respect of the maximum CPU time for the task (TTL) and the maximum program run time (PTL). The description below initially examines the normal case, i.e. the CPU time for an interactive job is not limited by the system parameter DIATTL (= presetting DIATTL=N).

TTL reached in batch job

The user can specify a task time limit (TTL) in the ENTER-JOB or ENTER-PROCEDURE command when starting a batch job. Once the batch job has used its maximum CPU time, message EXC0070 is displayed on the operator terminal (console). Systems support now has a maximum of 20 minutes in which to raise the batch job’s TTL using the CHANGE-TASK-CPU-LIMIT command. This is a way of preventing important batch jobs being terminated prematurely because they have exceeded their TTL.

If the maximum CPU time for the batch job is not increased within the wait time of 20 minutes, the batch job is terminated. A distinction must be drawn between two cases:

  1. If the TTL is reached during processing of BS2000 commands, the task terminates with message CMD1011.

  2. If the TTL is reached during a program run, message EXC0072 is output and, where applicable, an STXIT routine is executed, but this may use no more than 30 CPU seconds. After execution of the STXIT routine or when 30 CPU seconds have elapsed, the program terminates with message EXC0073. Then the task terminates.

PTL reached in a batch job

If the PTL is reached during a program run in a batch job, message EXC0072 is output and, where applicable, an STXIT routine defined for the purpose is executed, but this may use no more than 30 CPU seconds. After execution of the STXIT routine or when 30 CPU seconds have elapsed, the program terminates with message EXC0073 and spin-off is triggered. If an error handling mechanism has been defined, further processing starts at the next SET-JOB-SET or IF-BLOCK-ERROR command. If not, processing ends at the next EXIT-JOB or LOGOFF command.

PTL or TTL reached in an interactive job

The user can specify a time limit in the SET-LOGON-PARAMETERS command. The user can basically continue working if a time limit is exceeded. If the TTL is exceeded and no program is loaded, message EXC0067 is output and the user can continue working for 30 CPU seconds until this process is repeated. If a program is loaded and the TTL or PTL is exceeded, the following applies: In procedure mode, message EXC0068 is output and execution continues. The time limit is incremented by 100 CPU seconds, i.e. the process is then repeated. In interactive dialog, message EXC0075 is output. The user can specify whether he wishes to continue or terminate execution. If he continues execution, the process is repeated after 30 CPU seconds.

Behavior when the default of the system parameter DIATTL is modified

The DIATTL=Y and DIATTL=Q settings enable systems support to limit the CPU time for an interactive task. These settings cause the following changes to the behavior described above:

DIATTL=Y

The interactive task is terminated when Task-Time-Runout is reached.

If the TTL is exceeded, first the message EXC0076 is issued. If a program run STXIT for timeout exists, this STXIT routine will be started after the time specified with the message has elapsed. By default, the STXIT routine is granted another 30 CPU seconds.

DIATTL=Q (quick and quiet)

As with DIATTL=Y, the interactive job is terminated when Task-Time-Runout is reached.

Furthermore, both for an interactive job and for a batch job the additional times or wait times which otherwise apply for TTL and PTL are shortened to one second (“quick”). In addition, in the case of a batch job message EXC0070 is suppressed on the console (“quiet”).