× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Dan, I got the ASCII values wrong - sorry. It may depend on various CCSIDs. I recommend creating a DSPF with all the possible combinations of color and attribute, then do a STRCPYSCN while in SDA, then see what they turn into when brought down. I used TextPad, which has a binary display mode, to see what these values are.

High intensity is x'B9', which is ASCII 185, normal is x'B7', or ASCII 183

Searching for a phrase to be retained in Word goes something like this:

Press Ctrl-H
Open up the More... button
Check :Use wildcards"
Where it says "Find what:" put
^0185(?@)^0183
Where it says "Replace with" put
\1
There's a single space before and after the "\1"
With cursor in the Replace with textbox, click on Format..., click on Font..., and choose Bold
Try Find next, then Replace, and finally Relace all, if comfortable.


Explanation:
The caret before a 0-prefixed number is that ASCII character (decimal value).
The parentheses enclose what is called an expression.
The "?" means any character.
The "@" means at least 1 of the preceding character or expression.
The "\1" means the first expression in the Find string
Putting a space before and after replaces the control characters, with the desired string in between, modified to have the new attribute.


Similar principle applies for other codes.

HTH

Vern

At 04:19 PM 3/3/2003 -0800, you wrote:
Nifty idea, Vern! However...

Couple of problems. First, the codes you provided did not jive with what got converted. For
example, the normal attribute, which is x'20' in EBCDIC, got translated to ascii x'B7'; the high
intensity attribute (x'22') got translated to ascii x'B9'. (Those were the only ones I checked.)
I did have the 66535 checked (under File, Properties, Conversions tab, Convert CCSID 66535) per
your instructions. I'm sure I can live with that, but don't know if I messed up somewhere that
will give me a bad result down the line.


Second, I thought I knew how to scan for hex-style values in MS Word 97, but I was mistaken. Even
if I could, I have no idea how to translate (x'B9')Highlight This(x'B7') so that Highlight This is
boldfaced. If I scan for the character that I know is the high intensity attribute and replace it
with nothing but a Bold format, only that character gets bold-faced. What am I missing here?


TIA, Dan

--- Vern Hamberg <vhamberg@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> No example, but a techniaue, using MS Word. If you download the file with
> data transfer, selecting only the SIDATA field. Be sure to turn on 66535
> CCSID translation.
>
> The control codes get translated to various ASCII codes.
> Normal is x'80',
> reverse image is x'81',
> high intensity is x'82',
> underline is x'84',
> blue is x'9A'.
>
> There are others. Non-display will actually show you the text, with,
> probably, a preceding code of x'87'.
>
> Then do a wildcard find-replace on the pairing of any non-x'80' codes with
> their matching x'80' code, preserving the contents between the codes (use
> parentheses, I think) and replacing with a space before and after, in the
> appropriate formatting and even color. Highlight becomes bold, reverse
> image is a font setting, etc.
>
> Once the pairs are replaced, do a find-replace of the remaining x'80' codes.
>
> I once built a DSPF with all the color and formatting combinations, then
> did a STRCPYSCN to get it to a file, then downloaded that, in order to get
> all the combinations.
>
> The Word doc can be saved as a template, with a macro to do the conversion
> and maybe putting a border around the screen and eliminate the lines with
> the position numbers (makes a good identifiable separator for find-replace
> operation)
>
> HTH
>
> Vern


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.