See z/OS MVS Programming: Assembler Services Guide and z/Architecture® Principles of Operation for information comparing the formats of the TOD and ETOD.
The STCKCONV time of day and date formats are compatible with the formats returned by the TIME macro, which returns a time of day and date value or the contents of the TOD clock. The STCKCONV time of day and date formats are also compatible with the input formats accepted by the CONVTOD macro, which converts a time of day and date value to TOD clock format.
The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Problem state and any PSW key. |
Dispatchable unit mode: | Task or SRB |
Cross memory mode: | PASN=HASN=SASN or PASN¬=HASN¬=SASN |
AMODE: | 24-bit or 31-bit addressing mode |
ASC mode: | Primary or access register (AR) |
Interrupt status: | Enabled or disabled for I/O and external interrupts |
Locks: | No requirement |
Control parameters: | Must be in the primary address space or be in an address/data space that is addressable through a public entry on the caller's dispatchable unit access list (DU-AL). |
If the program is in AR mode, issue the SYSSTATE ASCENV=AR macro before STCKCONV. SYSSTATE ASCENV=AR tells the system to generate code appropriate for AR mode.
None.
Primary-mode callers must make sure that access register 1 is zero before issuing the execute form of the STCKCONV macro. For other registers, the caller does not have to place any information into any register unless using it in register notation for a particular parameter, or using it as a base register.
Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.
None.
The standard form of the STCKCONV macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede STCKCONV. |
STCKCONV | |
␢ | One or more blanks must follow STCKCONV. |
STCKVAL=TOD clock addr | TOD clock addr: RX-type address or register (2) - (12). |
STCKEVAL=ETOD clock addr | ETOD clock addr: RX-type address or register (2) - (12). |
,CONVVAL=conv addr | conv addr: RX-type address or register (2) - (12). |
,TIMETYPE=DEC |
Default: TIMETYPE=DEC |
,DATETYPE=YYYYDDD |
Default: DATETYPE=YYYYDDD |
The parameters are explained as follows:
Only one of STCLVAL or STCKEVAL can be specified.
None.
When STCKCONV macro returns control to your program, GPR 15 contains a return code.
Hexadecimal Return Code | Meaning and Action |
---|---|
0 | Meaning: Successful completion. Action: None. |
C | Meaning: System error. Action: Retry the request. |
10 | Meaning: Program error. The user's parameter
list is not in addressable storage. Action: Ensure that the parameter list address is valid and the storage is addressable. |
14 | Meaning: Unsuccessful completion. The
ETOD value was not valid. Action: Avoid specifying a date or time that occurs after the second epoch (the corresponding ETOD value would have a value greater than x'01' in the first byte). |
STCKCONV STCKVAL=TODSTAMP,CONVVAL=OUTAREA,TIMETYPE=DEC, X
DATETYPE=MMDDYYYY
TODSTAMP DC X'A0569832F1241000' TOD CLOCK VALUE
OUTAREA DS CL16 CONVERTED VALUE
STCK TODCLOCK
STCKCONV STCKVAL=TODCLOCK,CONVVAL=OUTVAL,TIMETYPE=BIN, X
DATETYPE=YYYYMMDD
TODCLOCK DS XL8 TOD CLOCK VALUE
OUTVAL DS CL16 CONVERTED VALUE