Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bold result ?

Status
Not open for further replies.

IBI

IS-IT--Management
Jun 13, 2002
76
DE
I'm a new cobol user ......
Is there any cobol command to write a bold result in a text file ?

Thanks in advance
IBI
 
a TEXT file does not have BOLD or other font options as such.

If you wish to have a document to be opened by a Word processor, such as MS word or WordPerfect, then you can write a RTF file or a HTML file with the correct codes.

If you wish to PRINT a document and have some of the printout on BOLD, then there are some codes for this also, but they will depend on the PRINTER and on the LANGUAGE the printer uses.


So you need to be very clear on what you need, and if it is the first option, then search these forums and for more info on those keywords, as this is well documented elsewhere.



Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
...or in general

There are 3 issues here:
1. the data.
2. the context or meaning (of the data).
3. the presentation (of the context).

1. COBOL only provides the (raw) data
(though you may/can consider a record a form of context).
2. You may consider using XML to define the context (of the data).
3. You may use style sheets to present the context.

Realise that the above are 3 distinctly different responsibilities!
Personally I would not want any of the above responsibilities to be dependent on the other or be intertwined with each other.
Instead I would delegate these different responsibilities.

Regards, Wim Ahlers.
 
You can't store bold characters in a text file or anywhere else.

But, you can print bold characters, and you can display bold characters.

As for printing, as it has been pointed out earlier, check the printer manual for any bold printing commands.

There are tons of ways of displaying bold characters on a screen. Any language that can manipulate rich text formats can do it . Of course, COBOL can do it; but why bother when there are tons (I like the sound of 'tons') of utilities (yes, such as HTML) and add-ons that can interact with COBOL in manipulating rich text formats.

If you have specific requirements, we'll show you how to involve COBOL.

Dimandja
 
To: Dimandja
(and all the rest)

I agree!
That is why I distingish between:
1. the data
2. the context
3. the presentation (HTML is 1 option)

as i stated before...

Regards, Wim.
 
It's very possible, though, to just get a bold effect in the printout by print the line, and then printing the same line after advancing one line.

e.g.:
Code:
write prtrec from "this is just some text" after advancing 1 line
write prtrec from "             some     " after advancing zero lines

will have the effect of bolding the word "some". The effet is much more noticeable on a dot matrix printer than on a laser.

Note, though, that if you send this to a file first, the file will contain the line that says " some" as well. I don't know if that will bother you ...

GL,
.DaviD.
 
On most laser printers, the effect is not noticeable at all (a bit turned on cannot be turned on "harder"). Back on the mainframe, we used to specify an "old" ribbon for documents where it was important to have bold vs non-bold, and we used the technique noted by david.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top