Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SCALAR FUNCTION not compiling

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
komal

New User


Joined: 09 May 2005
Posts: 18

PostPosted: Fri Mar 21, 2008 1:02 pm    Post subject: SCALAR FUNCTION not compiling
Reply with quote

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
View user's profile Send private message

Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Fri Mar 21, 2008 2:22 pm    Post subject:
Reply with quote

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
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Fri Mar 21, 2008 3:10 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts IDMS/DC-COBOL program - SNAP error wh... rakeshsekar1987 IDMS/ADSO 5 Tue Sep 13, 2016 8:28 pm
No new posts Replace function abdulrafi COBOL Programming 13 Mon Sep 12, 2016 10:12 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us