sysconf (BPX1SYC, BPX4SYC) — Determine system configuration options

Function

The sysconf callable service gets the value of a configurable system variable.

Requirements

Operation Environment
Authorization: Supervisor state or problem state, any PSW key
Dispatchable unit mode: Task
Cross memory mode: PASN = HASN
AMODE (BPX1SYC): 31-bit
AMODE (BPX4SYC): 64-bit
ASC mode: Primary mode
Interrupt status: Enabled for interrupts
Locks: Unlocked
Control parameters: All parameters must be addressable by the caller and in the primary address space.

Format

CALL BPX1SYC,(Sysconf_name,
              Return_value,
              Return_code,
              Reason_code)

AMODE 64 callers use BPX4SYC with the same parameters.

Parameters

Sysconf_name
Supplied parameter
Type:
Structure
Length:
Fullword
The name of a fullword that specifies the configurable system variable that is to be retrieved. Each configurable system variable is mapped to a specific value that is defined in the BPXYCONS macro. See BPXYCONS — Constants used by services.
Constant Configurable system variable returned
SC_ARG_MAX For ARG_MAX
SC_CHILD_MAX For CHILD_MAX
SC_CLK_TCK For CLK_TCK
SC_JOB_CONTROL For _POSIX_JOB_CONTROL
SC_NGROUPS_MAX For NGROUPS_MAX
SC_OPEN_MAX For OPEN_MAX
SC_SAVED_IDS For _POSIX_SAVED_IDS
SC_MMAP_MEM_MAX_NP For MMAP_MEM_MAX_NP
SC_TTY_GROUP For TTY GROUP
SC_THREADS_MAX_NP For _THREADS_MAX_NP
SC_THREAD_TASKS_MAX_NP For _THREAD_TASKS_MAX_NP
SC_TZNAME_MAX For TZNAME_MAX
SC_VERSION For _POSIX_VERSION
SC_2_CHAR_TERM For CHAR_TERM
SC_PAGESIZE For PAGESIZE
SC_PAGE_SIZE For PAGE_SIZE
Return_value
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the sysconf service returns the actual value of the configurable system variable if the request is successful, or -1 if it is not successful.

Return_code
Returned parameter
Type:
Integer
Length:
Fullword
The name of a fullword in which the sysconf service stores the return code. The sysconf service returns Return_code only if Return_value is -1. See z/OS UNIX System Services Messages and Codes for a complete list of possible return code values. The sysconf service can return the following value in the Return_code parameter:
Return_code Explanation
EINVAL The value of the Sysconf_name argument is not valid.
Reason_code
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the sysconf service stores the reason code. The sysconf service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.

Usage notes

  1. SC_MAX_THREADS_NP, SC_CHILD_MAX, SC_OPEN_MAX, SC_MMAP_MEM_MAX, and SC_MAX_THREAD_TASKS_NP return the limits that are defined for the caller's process, not the system-wide limits.
  2. SC_PAGE_SIZE and SC_PAGESIZE return the page size based on the AMODE of the caller. AMODE 31 callers get a page size of 4 K, and AMODE 64 callers get a page size of 1M.

Related services

Examples

For an example using this callable service, see BPX1SYC (sysconf) example.