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
 

 

Adding line breaks in between a text string

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Susanta

Active User


Joined: 17 Nov 2009
Posts: 118
Location: India

PostPosted: Mon Aug 10, 2015 6:15 pm    Post subject: Adding line breaks in between a text string
Reply with quote

Need to convert text string from EBCDIC to UTF-8.

Based on functionality need to have linefeeds in between the string. How to achieve that. provided the receiving applciation don't want to add any code change. They want us to send the string with necessary line feeds so that the text string gets line breaks in front end without any more effort by them.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Mon Aug 10, 2015 6:54 pm    Post subject:
Reply with quote

Your post is pretty confusing as it is NOT clear what you want. Questions that come up from reading your post include:
- Do you need help in adding line feeds to a variable (COBOL does not have strings -- it has variables; strings behave in specific ways that COBOL does not support)?
- Do you need help in converting EBCDIC to UTF-8?
- What do you mean "between the string"?
- How are you transferring the data?
- Does the data to be transferred contain nothing but USAGE DISPLAY variables?

You need to go back and explain what you are wanting to do, what you have tried so far, what is not working for you and WHY it is not working (that is, error messages you are getting with the message identifier on the front), and include some sample data for us.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Mon Aug 10, 2015 6:55 pm    Post subject: Reply to: Adding line breaks in betwwen a text string.
Reply with quote

Well, you can have a look here, but exactly what you mean about inserting linefeeds, I don't know. Can you can some examples of the data you have and what you'd like to see for that output?
Back to top
View user's profile Send private message
Susanta

Active User


Joined: 17 Nov 2009
Posts: 118
Location: India

PostPosted: Tue Aug 11, 2015 10:56 am    Post subject: Reply to: Adding line breaks in betwwen a text string.
Reply with quote

I want to insert line break in between a text string(of display format).
I need the hex code in EBCDIC which represents line break.
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 461
Location: The Universe

PostPosted: Tue Aug 11, 2015 12:31 pm    Post subject:
Reply with quote

Do you mean the "new line" character as it exists in the C language? In other words, are you asking, Is there a mainframe COBOL equivalent to the C language "new line" character as used in something like

printf("Line 1\nLine 2\n"); ?
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Aug 11, 2015 12:50 pm    Post subject:
Reply with quote

I believe that X'15' is the EBCDIC 'newline' whereas X'0A' is the UTF-8 coding.

Garry
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Tue Aug 11, 2015 2:43 pm    Post subject: Reply to: Adding line breaks in betwwen a text string.
Reply with quote

We still have no clue of what "in between" some text means, and if it is there that you have a problem.

If you are converting to UTF-8 in the COBOL program, you need the target-system value, if the conversion is done outside the COBOL program you need the EBCDIC value, both of which have been pointed out to you already.

If you're now good-to-go, fine. If not, we need better description and sample data and expected output.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 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