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

line break in DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 29, 2012 3:52 pm
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

Superior Member


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

PostPosted: Wed Feb 29, 2012 4:19 pm
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
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
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: 1281
Location: Belgium

PostPosted: Wed Feb 29, 2012 6:14 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 01, 2012 7:05 pm
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: 691
Location: Earth

PostPosted: Wed Mar 07, 2012 7:03 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts rewrite same SAY line CLIST & REXX 8
No new posts Merge files with a key and insert a b... DFSORT/ICETOOL 6
No new posts Repeat a DD line- comment and insert ... CA Products 3
Search our Forums:

Back to Top