2009/12/2 Ron Thomas <[email protected]>:

> Yes this is Db2 time stamp, but is comming in to the application from outside
> and in the program received in a container, so i need to use cobol only to
> manipulate and get the difference.

Well, if both are represented as standard COBOL representations of a
DB2 timestamp, i.e. PIC X(26), just compare them directly.

 01 TIMESTAMP-1 PIC X(26).
 01 TIMESTAMP-2 PIC X(26).

 IF TIMESTAMP-1 > TIMESTAMP-2 THEN
     DISPLAY 'TIMESTAMP-1 IS THE GREATER'
 ELSE
     IF TIMESTAMP-2 > TIMESTAMP-1 THEN
         DISPLAY 'TIMESTAMP-2 IS THE GREATER'
     ELSE
         DISPLAY 'THE TIMESTAMPS ARE EQUAL'
     END-IF
 END-IF.

.tsooJ

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to