Datetime host variables in COBOL applications that use SQL

The following figure shows the syntax for valid date, time, and timestamp host variable declarations. Datetime host variables are supported only for ILE COBOL for iSeries™.

Datetime host variable

Read syntax diagramSkip visual syntax diagram
>>-+-01------+--variable-name----------------------------------->
   +-77------+                  
   '-level-1-'                  

           .-OF-.                 .-IS-.                   
>--FORMAT--+----+--+-DATE------+--+----+--format-options-------><
                   +-TIME------+                           
                   '-TIMESTAMP-'                           

Notes:
  1. level-1 indicates a COBOL level between 2 and 48.
  2. format-options indicates valid datetime options that are supported by the COBOL compiler. See the ILE COBOL Reference manual on the V5R1 Supplemental ManualsLink outside information center Web site for details.