Question String Manipulation Problem - Urgent

Hello Everyone, hope you all are doing well. :)

I am stuck in a problem of long URL string.

What I did:
I wanted to display complete URL message and the size of URL string is 260 chars. I wanted to display that in doc print and we could display maximum 80 chars in a single line, for that I have divided this long char string (complete URL) into 4 parts, took all four lines into variables and display them line by line.

Problem:
Initial line of URL is coming with http:// and displayed as underline (perhaps because of http) and rest comes as plain char string lines, I want to display all the lines same as first line (underline). In other words, i want complete URL in underline format.

For Example:

This is what i am currently getting:

http:// www.progress talk.com rhuhd hicks uhduh asdhue sdewd idjwe njsajdsc
rhuhd hicks uhduh asdhue sdewd idjwe njsajdscrhuhd hicks uhduh asdhue sdfd
rhuhd hicks uhduh asdhue sdewd idjwe njsajdscrhuhd hicks uhduh asdhue sdes
rhuhd hicks uhduh asdhue sdewd idjwe njsajdscrhuhd hicks uhduh asdhue sdea

This is what i want to achieve:

http:// www.progress talk.com rhuhd hicks uhduh asdhue sdewd idjwe njsajdsc
rhuhd hicks uhduh asdhue sdewd idjwe njsajdscrhuhd hicks uhduh asdhue sdfd
rhuhd hicks uhduh asdhue sdewd idjwe njsajdscrhuhd hicks uhduh asdhue sdes
rhuhd hicks uhduh asdhue sdewd idjwe njsajdscrhuhd hicks uhduh asdhue sdea


I want to display all lines as underlined because all are part of the URL.

Please help ASAP.

Thanks & Regards!
Rajat.
 
Last edited:
I searched in my docs and conclude towards UNDERLINE keyword or FILL method. i will try these and update if this could fix the issue. If you have any other suggestion then please share.
 

TheMadDBA

Active Member
Most likely whatever you are using to view the document is deciding that everything after HTTP is a URL and doing the underlining... since the other information is not part of the same string as HTTP it just sees it as regular text.

Not really a Progress issue.
 
Thanks for replying!

I know that everything after HTTP is a URL and comes with underlining by default, but as per my scenario i have to break the URL into lines (Because of length issue) and underline them as well because they all are part of it. but i don't know how could i achieve that?

Thanks & Regards!
Rajat.
 

TomBascom

Curmudgeon
Why?

To elaborate:
  • Why do you have to break up the line?
  • Why must the text be underlined?
  • What is it that you are doing with this text that makes it so that you must do these things?
 

TomBascom

Curmudgeon
This might be interesting:

Code:
/* editlong.p
 *
 */

define variable longText as character no-undo format "x(300)" view-as fill-in size 40 by 1 label "Long Text".

update longText "...".
 

LarryD

Active Member
Unless you really need that large display, why not use the tinyurl API ? Here is an example using curl (*nix) at the command line and it could easily be scripted and use input-output stream for the input parameter and the result:

Code:
curl http://tinyurl.com/api-create.php?url=http://www.myreallyreallylongurl.com
 
Thanks for replying Tom!

1. We are doing a doc print here, and maximum char that we could take in a line is 80.
2. Because all the lines are part of the URL message so ideally all the lines should be underlined. If we are not able to achieve this then at least all the lines should be in plain text (without underline) . The problem here is that http message (first line) comes with default underline message.
3. As i mentioned above, I want to take this string in a doc print and maximum length of a single line is not more then 80 chars.

Thanks & Regards!
Rajat.
 
Last edited:

LarryD

Active Member
What kind of "doc" are you creating? Word? Email? Something else? You may also be able to create a hyperlink depending on what you are creating.
 

TomBascom

Curmudgeon
Ok, that clarifies somewhat.

1) What is the point of printing such a long URL? I seriously doubt that anyone will ever rekey it.

2) If you insist on printing it anyway:

2a) Printing without underlines is, in my opinion, better. If you print with underlines there is probably no way for the reader to tell if an "_" character is part of the URL or if it is a space. Underlining URLs is a visual hint used by *browsers*. There is no reason to use it on printed material.

2b) -- how is the printer currently underlining line#1? Underlining text on a printout is not a Progress function -- that is a function of the print control and formatting mechanism which depends completely on factors outside of Progress (haven't we had this discussion recently?) My guess is that you are running this output through another program (such as MS-Word) that is adding the underline. Progress certainly didn't do it
 
Thanks for replying Larry!

I don't know about the exact type of the document, But we usually do Doc print before printing the content, its a kind of print preview. Could you please suggest something that how could we create hyperlink for a char string.

Thanks & Regards!
Rajat.
 

LarryD

Active Member
The method to create a hyperlink is really dependent on the type of document and the process you use to create the document (and it might not even be possible), so I couldn't imagine how I or anyone else might offer any suggestions. The only one that might work is using the tinyurl to convert it to something you can print in your text before running it through your "Doc print". Beyond that I have no clue what to tell you. Tom and the MadDBA both have stated correctly that it's not a Progress function... it's whatever you are using to create and print the document that does the underlining.
 
Tom,

I checked the URL in doc print and there URL comes with underline for line 1 but i didn't check by printing that doc. In our local development shop, we can't test via printing the document.
How we could remove underline of first URL string and is it possible that, When the hole thing goes to printer then underline of first line doesn't print and all URL of 260 chars prints the same way?

Please suggest.

Thanks & Regards!
Rajat.
 
Larry,

I will check the exact document type and the respective methods or something similar that i could use there. I don't know exactly how to use this API with my code, i will try that as well.

Thanks & Regards!
Rajat.
 

TomBascom

Curmudgeon
Like Larry said -- we can't tell you. We have no idea what you are using to "doc print". But we can tell you that it is NOT a Progress function. Some external component is doing that. You will need to find out what that is and how it works.
 
Thanks Tom, Larry, for your mentorship on this. I will search for the document type and related stuff and may get back to you on this.

Thanks & Regards!
Rajat.
 
Hello Everyone,

Depending on Tom said above, i further discussed in my local shop and finally we have concluded that we should take whole string URL in a single scrollable line instead of breaking the URL message into multiple lines. we did that successfully by using PUT UNFORMATTED and TEMP-TABLES.
If in future, i want do the same underlining stuff that i wanted before than how could i achieve that? As Larry said, "The method to create a hyperlink is really dependent on the type of document and the process you use to create the document". Here, our document type for doc print is .txt, then what are the methods or similar stuff that i could try for doing underling stuff or customizing my .txt page.

Please Suggest.

Thanks & Regards!
Rajat.
 

TheMadDBA

Active Member
Text has no formatting to speak of... it is just text. Whatever editor/viewer you were using to look at the text file providing the underline.

Again... this is not a Progress issue. No disrespect intended but you probably need to take some classes/training and/or read up some computer concepts.
 
Thanks for replying Mad DBA,

Sorry its in word doc (.doc) format. Actually concurrently i was writing at two different forums so, by mistake i wrote .txt there. i know .txt is a simple plain text without any formatting.

By the way, thanks for your suggestion.

Thanks & Regards!
Rajat.
 
Top