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 Join in SQL Query vickey_dw DB2 0 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


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