Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Environment information

&pagelevel(4)&pagelevel

The functions presented in this section are used to obtain information on the calling task, the job, the procedure, user switches, job variables, system options, etc. Most of these functions are called without input parameters, since they are uniquely allocated to the value to be queried.

Information on a job/task/files

Job name

JOB-NAME( )

Returns the job name of the current task
(the name specified in SET-LOGON-
PARAMETERS)

Operating mode

TASK-MODE( )

Outputs the current operating mode of the
current task

TSN

TSN( )

Returns the job number (TSN) of the
current task

Priority

RUN-PRIORITY( )

Returns the priority level of the current
task

Account number

ACCOUNT( )

Returns the account number of the task

User ID

USER-IDENTIFICATION( )

Returns the user ID for the current task

Default catalog ID

STD-CAT-ID( )

Returns the catalog ID of the default
pubset for the user ID of the current task

Home pubset

HOME-CAT-ID( )

Returns the catalog ID (CATID) of the
home pubset for the user ID of the current
task

Catalog entry

IS-CATALOGED-FILE( )

Checks whether the specified file is
cataloged

IS-CATALOGED-JV( )

Checks whether the specified job variable
is cataloged

IS-LIBRARY( )

Checks whether the specified file is a
library

IS-LIBRARY-ELEMENT( )

Checks whether the specified library
element exists

Call counter

COUNTER( )

Counts the COUNTER() calls

Program name

PROG-NAME( )

Returns the name of the program file
currently loaded

Path name

INSTALLATION-PATH( )

Specifies the path name of a file in accordance
with the product version

File contents

IS-EMPTY-FILE( )

Checks whether the file is empty

SYSFILE management: system files

SYSCMD

SYSCMD( )

Returns *PRIMARY or the name of the file to which SYSCMD is assigned

SYSDTA

SYSDTA( )

Returns *PRIMARY or *SYSCMD or the name of the file to which SYSDTA is assigned

SYSLST

SYSLST( )

Returns *PRIMARY or the name of the file to which SYSLST is assigned

SYSOUT

SYSOUT( )

Returns *PRIMARY or the name of the file to which SYSOUT is assigned

Date/time

Date

DATE( )

Returns the current date in the specified format

DATE-VALUE( )

Returns a particular day’s date in the specified format

ELAPSED-DAYS( )

Returns number of days difference between two specified dates

Day of week

DAY( )

Returns the name of the current day abbreviated in the specified language

Month

MONTH( )

Returns the name of the current month abbreviated in the specified language

Time

TIME( )

Returns the current time to the second with any separator between the various units

System data

This section presents the functions that return system data relating to the hardware and software used and to the settings made by the system administrator for the current system. This does not include task-related data or job variable information.

Host name

HOST( )

Returns the internal name of the BS2000 computer on which the current task is running

Query: SDF-P on the
system

IS-SDF-P( )

Returns TRUE if SDF-P is loaded on the system

System parameters

SYSTEM-INFORMATION( )

Returns the values of system parameters; input parameters as in the SINF macro

System ID

SYS-ID( )

Returns the system ID

Session number

SESSION-NUMBER( )

Returns the internal number of the current session

SDF-P version

SDF-P-VERSION( )

Returns the current version designations of the loaded subsystems SDF-P and SDFPBASY

TIAM information

Station name

STATION( )

Returns the station name of the TIAM station

Device type

STATION-TYPE( )

Returns the device type of the TIAM station

Processor name

PROCESSOR( )

Returns the processor name of the TIAM station

Procedure information

The functions below check the settings of procedure attributes and return information on the current procedure.

Nesting level

PROC-LEVEL( )

Returns the nesting level of the
S procedure at the time of the function call

Logging

LOGGING-MODE( )

Indicates whether the logging of
commands or data is enabled for the
current S procedure

Spin-off

STMT-SPINOFF( )

Indicates whether statement spin-off is
enabled

User switch

USER-SWITCH( )

Queries the status of the specified user
switch

Call

EXPLICIT-CALL( )

Returns the type of the procedure call

SYSTEM-CALL( )

Returns the syntax file hierarchy level for
the command calling the procedure

Job variables

The functions below return information on job variables that monitor the job or program. Job variables are part of the (chargeable) product JV (Job Variable System) and were used up until now in BS2000 procedures for procedure monitoring and control.

Job monitoring

JOB-MONJV( )

Returns the name of the monitor JV that monitors the current job

Program monitoring

PROG-MONJV( )

Returns the name of the monitor JV that supervises the current program

Contents

JV( )

Returns the contents of the specified job variable

Class

JOB-CLASS( )

Returns the job class of the current task

Catalog entry

IS-CATALOGED-JV( )

Checks whether the specified job variable is cataloged