Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 125
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: 8152
Location: East Dubuque, Illinois, USA

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: 7315

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: 125
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 Member


Joined: 30 Nov 2013
Posts: 563
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: 995
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: 7315

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 Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts String after '.' (period) is not copy... balaji81_k SYNCSORT 6 Wed Aug 23, 2017 9:35 pm
No new posts Sorting on text - but in non-alphabet... Roy Ware SYNCSORT 5 Wed Aug 23, 2017 9:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us