Specifies an explicit time format to use when time values are returned from SQL Server time columns in PIC X character output host variables.
Restriction: This topic applies to Windows environments only.
When used in addition to DETECTDATE, specifies the explicit time format to recognize in character input host variables.
Note: This topic documents TIME as used as an HCOSS SQL compiler directive option and therefore assumes that you have set DIALECT=MAINFRAME. For information on using TIME as a generic SQL compiler directive option, see
TIME under
SQL Compiler Directive Options. For information on the DIALECT HCOSS SQL compiler directive option, see
DIALECT.
Syntax:
TIME={ODBC | ISO | USA | EUR | JIS}
Parameters:
- ODBC
- hh:mm:ss (SQL Server default format)
- ISO
- hh.mm.ss (mainframe default format)
- USA
- hh:mm{AM|PM}
- EUR
- hh.mm.ss
- JIS
- hh:mm:ss
Properties:
Default:
|
ISO (mainframe default format)
|
Dependencies:
For input host parameters, requires that the DETECTDATE HCOSS SQL compiler directive option also be set.
Scope:
Used at compile time:
|
Yes
|
Behavior at run time:
|
Source file
|
See
Scope - HCOSS SQL Compiler Directive Options for more information.
Comments:
TIME changes the display format of output host variables as specified.
Note: If you do not specify an alternative format using TIME, HCOSS returns your SQL Server time columns using mainframe ISO format in your output character host variables by default, as specified in the
Properties section of this topic.
When you specify both TIME and DETECTDATE, HCOSS uses TIME to recognize time values in your input host variables. See
DETECTDATE for more information.
The following apply to USA format:
- Minutes can be omitted. For example, 1 PM is equivalent to 1:00 PM.
- AM and PM are not case sensitive.
- There must be a single blank before AM or PM.
- The hour must not be greater than 12 and cannot be 0 except for the special case of 00:00 AM.