COBOL/DB2 Date edit question
- From: Graham Hobbs <ghobbs@xxxxxxxxxxx>
- Date: Sat, 11 Aug 2007 13:51:34 -0400
Help please.
The following code fails - think I've missed something simple.
Table and column exist, database is connected.
I thought I could get a field off screen and edit it via the
SQL below but I get a compile error. I get the same error for
Time and Timestamp fields.
Might there be an 'industry standard' for dealing with these
types of fields?
My docs give little guidance on this and since I work in
isolation there's no-one to ask.
Environment is Visualage Cobol 2.2, DB2 V7.2
02 MP1ZADATEI PIC X(00010).
*------------------------------
E1-ADATE.
*------------------------------
IF MP1ZADATEL NOT = ZERO
EXEC SQL DATE(MP1ZADATEI) END-EXEC
IF SQLCODE = -180
..ETC
--------------------------------------------------------------------
SQL0060W The "COBOL" precompiler is in progress.
83 SQL0062W Starting INCLUDE of file
"E:\conrad\edi1\THEBOOK.cbl".
83 SQL0063W Completed INCLUDE of file "THEBOOK.cbl".
1057 SQL0104N An unexpected token "DATE" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include:
"SELECT". SQLSTATE=42601
Any help or code examples appreciated. please, thanks.
--
Posted via a free Usenet account from http://www.teranews.com
.
- Follow-Ups:
- Re: COBOL/DB2 Date edit question
- From: Pete Dashwood
- Re: COBOL/DB2 Date edit question
- From: Robert Jones
- Re: COBOL/DB2 Date edit question
- From: Michael Mattias
- Re: COBOL/DB2 Date edit question
- Prev by Date: Re: OT: Baby Update
- Next by Date: Re: COBOL/DB2 Date edit question
- Previous by thread: OT: Baby Update
- Next by thread: Re: COBOL/DB2 Date edit question
- Index(es):