The utime callable service sets the access and modification times of a file.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1UTI): | 31-bit |
AMODE (BPX4UTI): | 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. |
|
AMODE 64 callers use BPX4UTI with the same parameters. The Newtimes parameter is two doublewords.
The name of a fullword that contains the length of the fully qualified name (pathname) of the file. The pathname can be up to 1023 bytes long.
The name of a field of length Pathname_length that contains the pathname of the file.
The name of a fullword in which the utime service returns 0 if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EACCES | One of the following is true:
|
EINVAL | The argument that was supplied is incorrect. The following reason code can accompany the return code: JRNegativeValueInvalid. |
ELOOP | A loop exists in symbolic links that were encountered during resolution of the Pathname argument. This error is issued if more than 24 symbolic links are detected in the resolution of Pathname. |
ENAMETOOLONG | The length of the pathname is greater than 1023, or some component of the fully qualified name is longer than 255 bytes. This could be as a result of encountering a symbolic link during resolution of Pathname, where the substituted string is longer than 1023 characters. |
ENOENT | No file named Pathname was found; or Pathname was blank. The following reason code can accompany the return code: JRFileNotThere. |
ENOTDIR | Some component of the pathname prefix is not a directory. |
EPERM | The Newtimes value did not specify the current time; the effective user ID of the calling process does not match the owner of the file; and the calling process does not have appropriate privileges (see Authorization). |
EROFS | Pathname is on a read-only file system. The following reason code can accompany the return code: JRReadOnlyFs. |
The name of a fullword in which the utime service stores the reason code. The utime 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.
There are no restrictions on the use of the utime service.
For an example using this callable service, see BPX1UTI (utime) example.