COBOL/400 Language Help

Format 2 (System Information Transfer)

Description
Format 2 of the ACCEPT statement transfers system information contained in the specified conceptual data items DATE, DAY, or TIME into the identifier. The transfer must follow the rules for the MOVE statement without the CORRESPONDING phrase.
Format 2 (System Information Transfer)
 
->->--ACCEPT identifier FROM--*--DATE---------*----><-
                            *--DAY----------*
                            *--TIME---------*
 

DATE

DATE has the implicit PICTURE 9(6).

The sequence of data elements (from left to right) is:

2 digits for year of century
2 digits for month of year
2 digits for day of month

Thus 25 December 1991 is expressed as:

911225

The conceptual data items DATE, DAY, and TIME implicitly have USAGE DISPLAY. Since they are conceptual items, they cannot be described in the COBOL program.

DAY

DAY has the implicit PICTURE 9(5).

The sequence of data elements (from left to right) is:

2 digits for year of century
3 digits for day of year

Thus 25 December 1991 is expressed as:

91359

The conceptual data items DATE, DAY, and TIME implicitly have USAGE DISPLAY. Since they are conceptual items, they cannot be described in the COBOL program.

TIME

TIME has the implicit PICTURE 9(8).

The sequence of data elements (from left to right) is:

2 digits for hour of day
2 digits for minute of hour
2 digits for second of minute
2 digits for hundredths of second

Thus 2:41 P.M. is expressed as:

14410000

The conceptual data items DATE, DAY, and TIME implicitly have USAGE DISPLAY. Since they are conceptual items, they cannot be described in the COBOL program.


[ Top of Page | Previous Page | Next Page | Table of Contents ]