IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Scalar function REPLACE


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
komal

New User


Joined: 09 May 2005
Posts: 17

PostPosted: Tue Mar 18, 2008 7:38 pm
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;

can any one let me know what is the issue

Thanks

Kiran
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Mar 18, 2008 7:42 pm
Reply with quote

What error message are you getting?
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Tue Mar 18, 2008 8:09 pm
Reply with quote

Your functions are DB2. How about the argument you are applying the functions to - is it DB2 or COBOL?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Mar 18, 2008 8:10 pm
Reply with quote

What are the definitions of xyz and xxx.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Mar 18, 2008 9:43 pm
Reply with quote

since xyz and xxx are host variables, it appears that the OP is using db2 cycles to accomplish abit of data manipulation instead of using the appropriate cobol commands.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling an Open C library function in... CICS 1
No new posts DATE2 function SYNCSORT 15
No new posts Help on PL/I jsonPutValue function PL/I & Assembler 8
Search our Forums:

Back to Top