View previous topic :: View next topic
|
Author |
Message |
komal
New User
Joined: 09 May 2005 Posts: 17
|
|
|
|
Hi All,
My COBOL+DB2 program is not getting compiled when i am trying to use SQL Scalar function REPLACE in my application program. Please find the sample SQL Query below
SELECT REPLACE(LTRIM(RTRIM(:xyz)),',','') into :xxx
FROM SYSIBM.SYSDUMMY1;
Where XYZ and XXX are the host variables declared as follows in my application program
01 XYZ PIC X(30) value ' 2,222,222.22'.
01 XXX PIC X(30) value spaces.
When i am trying to compile my program the SQL statement is not getting commented out and equalent call statement is not getting generated.
it is gving the following error message
1. EXEC is not a cobol key word
2. SQL is not a cobol key word
3. END-EXEC is not a cobol key word
can any one let me know what is the issue
Thanks
Kiran |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Please use correct JCL to compile COBOL + DB2 program. I guess what JCL you have used is for compiling COBOL programs only.
Ask your peers for JCL. |
|
Back to top |
|
|
the_gautam
Active User
Joined: 05 Jun 2005 Posts: 165 Location: Bangalore
|
|
|
|
i think you not are doing a proper pre-compilation on your program. as the pre-compiler will convert all the EXEC SQL......END-EXEC statements into COBOL CALL statements. in that case there is no chance of getting the error message stated by you. |
|
Back to top |
|
|
|