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 |
| Returns the job name of the current task |
Operating mode |
| Outputs the current operating mode of the |
TSN |
| Returns the job number (TSN) of the |
Priority |
| Returns the priority level of the current |
Account number |
| Returns the account number of the task |
User ID |
| Returns the user ID for the current task |
Default catalog ID |
| Returns the catalog ID of the default |
Home pubset |
| Returns the catalog ID (CATID) of the |
Catalog entry |
| Checks whether the specified file is |
| Checks whether the specified job variable | |
| Checks whether the specified file is a | |
| Checks whether the specified library | |
Call counter |
| Counts the COUNTER() calls |
Program name |
| Returns the name of the program file |
Path name |
| Specifies the path name of a file in accordance |
File contents |
| Checks whether the file is empty |
SYSFILE management: system files
SYSCMD |
| Returns *PRIMARY or the name of the file to which SYSCMD is assigned |
SYSDTA |
| Returns *PRIMARY or *SYSCMD or the name of the file to which SYSDTA is assigned |
SYSLST |
| Returns *PRIMARY or the name of the file to which SYSLST is assigned |
SYSOUT |
| Returns *PRIMARY or the name of the file to which SYSOUT is assigned |
Date/time
Date |
| Returns the current date in the specified format |
| Returns a particular day’s date in the specified format | |
| Returns number of days difference between two specified dates | |
Day of week |
| Returns the name of the current day abbreviated in the specified language |
Month |
| Returns the name of the current month abbreviated in the specified language |
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 |
| Returns the internal name of the BS2000 computer on which the current task is running |
Query: SDF-P on the |
| Returns TRUE if SDF-P is loaded on the system |
System parameters |
| Returns the values of system parameters; input parameters as in the SINF macro |
System ID |
| Returns the system ID |
Session number |
| Returns the internal number of the current session |
SDF-P version |
| Returns the current version designations of the loaded subsystems SDF-P and SDFPBASY |
TIAM information
Station name |
| Returns the station name of the TIAM station |
Device type |
| Returns the device type of the TIAM station |
Processor name |
| 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 |
| Returns the nesting level of the |
Logging |
| Indicates whether the logging of |
Spin-off |
| Indicates whether statement spin-off is |
User switch |
| Queries the status of the specified user |
Call |
| Returns the type of the procedure call |
| Returns the syntax file hierarchy level for |
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 |
| Returns the name of the monitor JV that monitors the current job |
Program monitoring |
| Returns the name of the monitor JV that supervises the current program |
Contents |
| Returns the contents of the specified job variable |
Class |
| Returns the job class of the current task |
Catalog entry |
| Checks whether the specified job variable is cataloged |