COBOL-DB2 Program, how to get Current timestampe from DB2 
Author Message
 COBOL-DB2 Program, how to get Current timestampe from DB2

Hi

I have to write a DB2-COBOL program, in which i have to take DB2 timestamp

Any body know how to get DB2 timestamp, and store in variable.

Example will be highly appricaite

Regards
Samir



Sat, 16 Dec 2000 03:00:00 GMT  
 COBOL-DB2 Program, how to get Current timestampe from DB2

Quote:

> Hi

> I have to write a DB2-COBOL program, in which i have to take DB2 timestamp

> Any body know how to get DB2 timestamp, and store in variable.

> Example will be highly appricaite

> Regards
> Samir

EXEC SQL
  SET host-variable TO TIMESTAMP
END-EXEC

host variable is a 26 byte field CCYY-MM-DD HH:MM:SS:mmmmmm

Bob
--
<---------------------------------------------------------------------->
                 Bob Berman   -    West Hartford, CT                  

                 THE TRUE TERRORISTS IN AMERICA ARE                    
          THE PEOPLE WHO DEMAND TO SEE THE STORE MANAGER !              
<----+----+----+----+----+----+----+----+----+----+----+----+----+----+>



Sat, 16 Dec 2000 03:00:00 GMT  
 COBOL-DB2 Program, how to get Current timestampe from DB2

Quote:

> Hi

> I have to write a DB2-COBOL program, in which i have to take DB2 timestamp

> Any body know how to get DB2 timestamp, and store in variable.

> Example will be highly appricaite

> Regards
> Samir

EXEC SQL VALUES(CURRENT TIMESTAMP)
               INTO :host-variable-pic-x26  
               END-EXEC.

...use this format if you are on an Intel-based on Unix based platform.
It might work on the mainframe, too. I dunno.
-RP



Sat, 16 Dec 2000 03:00:00 GMT  
 COBOL-DB2 Program, how to get Current timestampe from DB2

Quote:

> Hi

> I have to write a DB2-COBOL program, in which i have to take DB2 timestamp

> Any body know how to get DB2 timestamp, and store in variable.

> Example will be highly appricaite

> Regards
> Samir

We don't do your homework for you here!!!
--

Joe.
+-----------------------------------------------------------+

|                                                           |
| Nothing is foolproof to a sufficiently talented fool!     |
+-----------------------------------------------------------+



Sat, 16 Dec 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. REXX/DB2 = COBOL/DB2 ???

2. How to call a Cobol/DB2 program from REXX

3. Compiling CICS / DB2 programs on IBM VisualAGE COBOL v2.2

4. COBOL DB2 sub-program

5. DECLARATIVES for a COBOL/DB2 program

6. Accessing Different DB2 instances thru One COBOL Program on Mainframe

7. AZ - COBOL,IMS,DB2,CICS programming

8. DB2/6000 accessed direct from cobol program?

9. Automatic documentation extraction for Cobol, DB2, Cics programs in a repository-centered technology

10. Nationwide Openings for DB2/CICS Developers and DB2 DBA's

11. Nationwide Openings for DB2/CICS Developers and DB2 DBA's

12. Python-DB2 module and DB2 Connect

 

 
Powered by phpBB® Forum Software