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
 

 

continuation problem in DB2 query

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

New User


Joined: 17 Nov 2007
Posts: 16
Location: banglore

PostPosted: Thu Dec 20, 2007 12:23 pm    Post subject: continuation problem in DB2 query
Reply with quote

Code:
   UPDATE                                                       

         DCNTRL01.TPRM_CONTROL_PARM                               

     SET DATA_FILLER_1  = (BAS SB  PB  XB  RB  SB0 SB1 SB2 SB3 SB4

                          SB5 SB6 SB7 SB8 SB9 SBS SBF PBS PBF RBS 

                          RBF XBS XBF J04 J05 J06 J07 J08 F05 F06 

                          F07 F08 M06 M07 M08 A07 A08 Y08 U09 U10 

                          L10 L11 L12 G11 G12 S12 U08 D03 D04 D05 

                          D06 BSC D07 D08 L01 G01 S01 O01 U12 )   

     WHERE APPL_PGM_ID = 'PRE9SEAS'                   


This query is returning error like string is too long
some body please let me know the solution

Thanks
Ramesh
Back to top
View user's profile Send private message

abhishekmdwivedi

New User


Joined: 22 Aug 2006
Posts: 95
Location: india

PostPosted: Thu Dec 20, 2007 12:41 pm    Post subject: Reply to: continuation problem in DB2 query
Reply with quote

Hi ramesh,

Can you please give us some more info. about the field DATA_FILLER_1. (Data Type , length etc.)
Back to top
View user's profile Send private message
ramesh_ibm

New User


Joined: 17 Nov 2007
Posts: 16
Location: banglore

PostPosted: Thu Dec 20, 2007 2:28 pm    Post subject: Reply to: continuation problem in DB2 query
Reply with quote

abhishek
here r the details u have asked for

DATA_FILLER_4 CHAR(250)

I ahve tried wit concatenate symbol but that one is also not successful
Code:

UPDATE                                                           
    DCNTRL01.TPRM_CONTROL_PARM                                   
SET DATA_FILLER_1  = 'BAS SB  PB  XB  RB  SB0 SB1 SB2 SB3 SB4 '||'
                      SB5 SB6 SB7 SB8 SB9 SBS SBF PBS PBF RBS '||'
                      RBF XBS XBF J04 J05 J06 J07 J08 F05 F06 '||'
                      F07 F08 M06 M07 M08 A07 A08 Y08 U09 U10 '||'
                      L10 L11 L12 G11 G12 S12 U08 D03 D04 D05 '||'
                      D06 BSC D07 D08 L01 G01 S01 O01 U12 '       
WHERE APPL_PGM_ID = 'PRE9SEAS'                                   
Back to top
View user's profile Send private message
arivazhagan_k

New User


Joined: 05 Dec 2007
Posts: 57
Location: chennai

PostPosted: Thu Dec 20, 2007 2:30 pm    Post subject:
Reply with quote

Your update may overflow the field DATA_FILLER_1 actual length.Can we get your table info ?
Back to top
View user's profile Send private message
abhishekmdwivedi

New User


Joined: 22 Aug 2006
Posts: 95
Location: india

PostPosted: Thu Dec 20, 2007 2:35 pm    Post subject: Reply to: continuation problem in DB2 query
Reply with quote

Ramesh,

Quote:
UPDATE
DCNTRL01.TPRM_CONTROL_PARM
SET DATA_FILLER_1 = 'BAS SB PB XB RB SB0 SB1 SB2 SB3 SB4 '||'
SB5 SB6 SB7 SB8 SB9 SBS SBF PBS PBF RBS '||'
RBF XBS XBF J04 J05 J06 J07 J08 F05 F06 '||'
F07 F08 M06 M07 M08 A07 A08 Y08 U09 U10 '||'
L10 L11 L12 G11 G12 S12 U08 D03 D04 D05 '||'
D06 BSC D07 D08 L01 G01 S01 O01 U12 '
WHERE APPL_PGM_ID = 'PRE9SEAS'


You can't use || symbol in the set statement. Below is the approach to do this :
DCNTRL01.TPRM_CONTROL_PARM
SET DATA_FILLER_1 = 'BAS SB PB XB RB SB0 SB1 SB2 SB3 SB4' CONCAT
'SB5 SB6 SB7 SB8 SB9 SBS SBF PBS PBF RBS' CONCAT
'RBF XBS XBF J04 J05 J06 J07 J08 F05 F06' CONCAT
'F07 F08 M06 M07 M08 A07 A08 Y08 U09 U10' CONCAT
'L10 L11 L12 G11 G12 S12 U08 D03 D04 D05' CONCAT
'D06 BSC D07 D08 L01 G01 S01 O01 U12 '
WHERE APPL_PGM_ID = 'PRE9SEAS'
Back to top
View user's profile Send private message
ramesh_ibm

New User


Joined: 17 Nov 2007
Posts: 16
Location: banglore

PostPosted: Thu Dec 20, 2007 8:04 pm    Post subject: Reply to: continuation problem in DB2 query
Reply with quote

it worked......thanks a lot abhishek
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
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm


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