Set System Time (QWCSETTM) API


  Required Parameter Group:

1 Input format Input Char(8)
2 Input variable Input Char(*)
3 Error Code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: YES

The Set System Time (QWCSETTM) API sets the Coordinated Universal Time (UTC) for the system.

For additional information on setting the time, see Usage Notes.


Authorities and Locks

User Special Authority
*ALLOBJ

Required Parameter Group

Input format
INPUT; CHAR(8)

The format of the date specified for the input variable. Valid values are:

*YYMD YYYYMMDD (4-digit year, month, day) format.
*MDYY MMDDYYYY (month, day, 4-digit year) format.
*DMYY DDMMYYYY (day, month, 4-digit year) format.

Input variable
INPUT; CHAR(*)

The date as Coordinated Universal Time (UTC) that is used to set the time-of-day clock. See Input Variable Formats to determine the structure of the input variable.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Input Variable Formats

This table shows the formats used for the input variable parameter.

Input Format Input Variable
*YYMD, *MDYY, *DMYY in microseconds The first 20 characters are used. See 20-Byte Character Date and Time Value Structure.


20-Byte Character Date and Time Value Structure

This table shows the structure used for the input variable when the format is *YYMD, *MDYY, and *DMYY.

Offset Description
0-7 Date, left-justified. This value cannot be all blanks or all zeros.
8-13 Time, in HHMMSS (hours, minutes, seconds) format.
14-19 Microseconds. This value cannot be blanks.


Usage Notes

The supported date range is from August 23, 1928, 12:03:06.314752 to May 10, 2071, 11:56:53.685240. Setting an input date that is outside this range will result in a date within this range. If you specify a precision of microseconds, it is recommended that you use a microsecond value that is evenly divisible by 8.


Error Messages

The following messages may be sent from this function:

Message ID Error Message Text
CPF1060 E Date not valid.
CPF1061 E Time not valid.
CPF1890 E *ALLOBJ authority required for requested operation.
CPF24B4 E Severe error while addressing parameter list.
CPF3C21 E Format name &1 is not valid.
CPF3C36 E Number of parameters, &1, entered for this API was not valid.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.



API introduced: V5R3

[ Back to top | Date and Time APIs | APIs by category ]