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

New line character in DB2


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

New User


Joined: 20 Aug 2006
Posts: 34
Location: chennai

PostPosted: Wed Jul 20, 2011 4:54 am
Reply with quote

Hi ,

Anybody has any idea or any reference which describes about whether DB2 supports any kind of newline character like \n or \t. If yes then how to process the field in any COBOL. I mean any special datatype w need to use to extract thru a COBOL or Stored procedure.


Thanks
Shakti
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 20, 2011 5:09 am
Reply with quote

What do you want this newline character to do? You can use EBCDIC X'15' as a "newline" character, but as far as the system is concerned, it's just another byte.

Enterprise COBOL now allows the use of null-terminated variables, but again whether or not they make sense for you depends, entirely, upon what you think you're going to do with them.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 20, 2011 5:12 am
Reply with quote

Why do you actually want to store them?

If you are sending data to unix/windows-type systems you can do something when formatting the file to be sent. Process them out on receipt. I suppose it might be convenient to store them for some particular requirement (maybe a lump of text).

Each has a particular single value. The "\" is an "escape code" and then the letter following has a particular meaning, but this is just a convention so that you can easily use them in a program/script. They are actually stored as a single binary value.

Cobol doesn't directly understand the escape sequence, but you can put them on/strip them off in the "usual sort of way" (look at STRING, UNSTRING and I always throw in INSPECT, among other possible techniques). Cobol does understand "null terminated strings", which may or may not help you in what you are doing (I could only guess, so far).
Back to top
View user's profile Send private message
shaktiprasad

New User


Joined: 20 Aug 2006
Posts: 34
Location: chennai

PostPosted: Wed Jul 20, 2011 7:25 am
Reply with quote

Hi ,

Thanks for the quick reply. It was just an initial discussion going on whether on Mainframe can handle any new line character provided by Unix/Abinitio. Hence thought of understanding how to do the same.
I will try to understand the requirements more and get back to this topic.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 20, 2011 10:00 am
Reply with quote

Hello,

Quote:
It was just an initial discussion going on whether on Mainframe can handle any new line character provided by Unix/Abinitio.
If thesse are sent to the mainframe, certainly the mainframe "can handle" them. Not as Unix/Windows might, but as simply other data bytes.

If you expect some action based on these, you will have to provide processes to do what you believe is needed.

Personally (with rather incomplete informaton) i would not use them on the mainframe. . . I suppose i could be convinced to consider otherwise icon_smile.gif
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 Panvalet - 9 Character name - Issue c... CA Products 6
No new posts Merge files with a key and insert a b... DFSORT/ICETOOL 6
Search our Forums:

Back to Top