Q: (IF WS-VAR NOT = SPACE) does not work in DBCS context 
Author Message
 Q: (IF WS-VAR NOT = SPACE) does not work in DBCS context

Hi everybody,

as a novice working with ILE-COBOL I encountered a problem adapting
codes to DBCS (Double Byte Character Set).

On AS400 DBCS strings (say Chinese or Japanese) begin with a shift-out
byte hex-valued '0E' and end with a shift-in '0F'.

Oft there are code lines like

IF WS-VAR1 not = SPACE

With possibly WS-VAR1 containing DBCS strings, this does not work any
more if somehow shift-out or shift-in slip in.

One solution is to scan every byte and replace shift-out and shift-in
before comparing the string to SPACES, which I believe will reduce
performance and make new codes unbearably long.

Anyone can help me on that?



Thu, 28 Jul 2005 06:14:39 GMT  
 Q: (IF WS-VAR NOT = SPACE) does not work in DBCS context

Quote:

>Hi everybody,

>as a novice working with ILE-COBOL I encountered a problem adapting
>codes to DBCS (Double Byte Character Set).

>On AS400 DBCS strings (say Chinese or Japanese) begin with a shift-out
>byte hex-valued '0E' and end with a shift-in '0F'.

>Oft there are code lines like

>IF WS-VAR1 not = SPACE

>With possibly WS-VAR1 containing DBCS strings, this does not work any
>more if somehow shift-out or shift-in slip in.

>One solution is to scan every byte and replace shift-out and shift-in
>before comparing the string to SPACES, which I believe will reduce
>performance and make new codes unbearably long.

>Anyone can help me on that?

It's not slow if you say
inspect a-string converting x'0E0F' to '  '  *> two spaces
if  a-string equal to spaces ...


Thu, 28 Jul 2005 07:50:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. context-sensitive help in ActiveX methods not working

2. awk: -v Var=VAR Obviously not a syntax issue

3. To VAR or not to VAR...

4. Disk free space code not working

5. REALdatabase not null and primary key not working

6. NOT Allow Inserts not working

7. tcl/tk man pages use .HS, not .TH for title, so man -k does not work

8. STV error DC context not released

9. Context menu for chart not accessible when VI is running

10. Passing a $var (not from a form) w/globals off

11. Does not work with TPS but works with DBF

12. 5.2 Network application works with 95, does not work with 98

 

 
Powered by phpBB® Forum Software