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
 

 

line break in DB2

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

New User


Joined: 18 Aug 2008
Posts: 50
Location: Bangalore

PostPosted: Wed Feb 29, 2012 3:39 pm    Post subject: line break in DB2
Reply with quote

Hi,

How to insert a line break in db2.
I want the text to be split into seperate lines.

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

dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Feb 29, 2012 3:48 pm    Post subject:
Reply with quote

db2 is a product.

what are you talking about?

spufi output
qmf output
imbedded sql
db2 dump utility with sql?

provide an example so that i can follow your question.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Feb 29, 2012 3:52 pm    Post subject: Reply to: line break in DB2
Reply with quote

well since most of us keep telling that psychic day is on wednesday
they try to check if it is true by posting <funny> questions
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Feb 29, 2012 4:19 pm    Post subject:
Reply with quote

I used to wonder why z/OS and Windows people are different, now I understand - this question helps in that direction a bit more! icon_rolleyes.gif
Back to top
View user's profile Send private message
sandhyaimmadi

New User


Joined: 18 Aug 2008
Posts: 50
Location: Bangalore

PostPosted: Wed Feb 29, 2012 4:26 pm    Post subject: line break in DB2
Reply with quote

I am talking abt the value in the column of a table.
We are inputting the data using a query
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Feb 29, 2012 4:48 pm    Post subject: Re: line break in DB2
Reply with quote

sandhyaimmadi wrote:
I am talking abt the value in the column of a table.
We are inputting the data using a query


what does that have to do with a line break?

you are not being very clear with your question.

you are providing us with no information.

spend 2 minutes and describe what you are doing and what results you expect.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Wed Feb 29, 2012 6:14 pm    Post subject: Re: line break in DB2
Reply with quote

sandhyaimmadi wrote:
I want the text to be split into seperate lines.

please specify "the text".
Are we talking about content within a CLOB or a VARCHAR ?
UNICODE/EBCDIC ?
Embedding x'0A' in a unicode CLOB or varchar constitutes a NewLine. Whether it will be displayed as a new line depends on your output platform/tool.
Back to top
View user's profile Send private message
sandhyaimmadi

New User


Joined: 18 Aug 2008
Posts: 50
Location: Bangalore

PostPosted: Thu Mar 01, 2012 3:10 pm    Post subject: line break in DB2
Reply with quote

The column is of type varchar

sample text is below. lines should be aligned as below

[For rolling or seasonal covenants:]
• [From dd/mm/yy to dd/mm/yy, required ratio is #(insert amount):1]
• [From dd/mm/yy to dd/mm/yy, required ratio is #(insert amount):1]
• [From dd/mm/yy to dd/mm/yy, required ratio is #(insert amount):1]
• [From dd/mm/yy to dd/mm/yy, required ratio is #(insert amount):1]


GUI we are using is VC++
I have tried with embedding x'0A' but still it is not working.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Thu Mar 01, 2012 7:05 pm    Post subject: Reply to: line break in DB2
Reply with quote

Quote:
GUI we are using is VC++

the chances of getting help on a mainframe/zOS forum for VC++ things are pretty slim.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Wed Mar 07, 2012 7:03 am    Post subject:
Reply with quote

Sandhya,
If I remember my 'C' correctly, in order to get a line break you need Carriage Return along with Line Feed .
The problem I see here is the Line Feed in ASCII is x'0A' but in EBCDIC it is x'25'. Hex code for CR is same in EBCDIC as well as ASCII, x'0D'.
You can download the EBCDIC chart from the downloads link at the top of this page to confirm.

Please give this a try and let us know if it works.
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 Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm
No new posts ISREDIT - Position Cursor on the Comm... Tarique Anwer TSO/ISPF 5 Wed Feb 03, 2016 12:44 pm
No new posts Use Edit Line Command Table with ISPF... Mickeydusaor TSO/ISPF 5 Thu Jan 28, 2016 4:52 pm
No new posts ISPF 3.4, SF line command does not su... Pedro TSO/ISPF 0 Fri Jan 15, 2016 11:09 pm
No new posts Can someone explain me this JCL line ... PeterHolland JCL & VSAM 9 Sat Dec 12, 2015 7:22 am


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