Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


IGZEDT4—get current date

IGZEDT4 returns the current date with a four-digit year in the form YYYYMMDD.

CALL IGZEDT4 syntax
Read syntax diagramSkip visual syntax diagram>>-CALL--"IGZEDT4"--USING--output_char_date.-------------------><
 
output_char_date (output)
An 8-byte fixed-length character string in the form YYYYMMDD, which represents current year, month, and day.

Usage note: IGZEDT4 is not supported under CICS.

Example

CBL LIB
      **************************************************
      ** Function: IGZEDT4 - get current date in the  **
      **                     format YYYYMMDD.         **
      **************************************************
       IDENTIFICATION DIVISION.
       PROGRAM-ID. CBLEDT4.
       . . .
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  CHRDATE                 PIC S9(8) USAGE DISPLAY.
       . . .
       PROCEDURE DIVISION.
       PARA-CBLEDT4.
      **************************************************
      ** Call IGZEDT4.
      **************************************************
           CALL 'IGZEDT4' USING BY REFERENCE CHRDATE.
      **************************************************
      ** IGZEDT4 has no nonzero return code to
      **     check, so just display result.
      **************************************************
           DISPLAY 'The current date is: '
               CHRDATE
           GOBACK.

Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)