sync (BPX1SYN, BPX4SYN) — Schedule file system updates

Function

The sync callable service causes all information in memory that updates file systems to be scheduled for writing.

Requirements

Operation Environment
Authorization: Supervisor state or problem state, any PSW key
Dispatchable unit mode: Task
Cross memory mode: PASN = HASN
AMODE (BPX1SYN): 31-bit
AMODE (BPX4SYN): 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 BPX1SYN,(Return_value,
              Return_code,
              Reason_code)

AMODE 64 callers use BPX4SYN.

Parameters

Return_value
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the sync service returns 0 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 sync service stores the return code. The sync 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.

Reason_code
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the sync service stores the reason code. The sync 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

The actual writing of data to all file systems is scheduled, but is not necessarily completed, upon return from the sync() service.

Characteristics and restrictions

There are no restrictions on the use of the sync service.

Examples

For an example using this callable service, see BPX1SYN (sync) example.