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
 

 

New line character in DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: New line character in DB2
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: 7990
Location: Bellevue, IA

PostPosted: Wed Jul 20, 2011 5:09 am    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Wed Jul 20, 2011 5:12 am    Post subject: Reply to: New line character in DB2
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    Post subject: Reply to: New line character in DB2
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

Site Director


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

PostPosted: Wed Jul 20, 2011 10:00 am    Post subject:
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    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 Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts the use of 'B3'x character in a panel Pedro TSO/ISPF 1 Thu Feb 16, 2017 3:09 am
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm


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