Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Program in unicode

Former Member
0 Likes
724

Hi All,

I am having this problem when I am working in 4.7 unicode .

My question is that why doesn't this program give me any error

Data: begin of struc4,

line(50),

end of struc4,

begin of struc5,

line1(30),

num(30) type n,

line2(30),

i1 type I,

end of struc5.

move struc4 to struc5.

And why does this program give me an error

Data: Begin of struc1,

c1 type C,

c2 type C,

I1 type I,

X1 type X,

End of struc1.

Data: Begin of struc2,

c1 type C value 'A',

c2 type C value 'B',

X1 type X value '0D',

I1 type I value 20,

End of struc2.

move struc2 to struc1.

The error is ""STRUC1" and "STRUC2" are not mutually convertible. In Unicode systems, "STRUC1" must have the same structure layout (fragment view) as"STRUC2", regardless of the length of the Unicode character."

Now here again it say's fragment view.

Shouldn't it be copying till the fragment view's are same??? as it's doing in the previous case or this case is not the same as previous case.

Thanks in Advance.

Nishant

1 ACCEPTED SOLUTION
Read only

former_member183804
Active Contributor
0 Likes
680

There are 3 cases for flat structures (check the online docu).

a.) identicial fragment view

b.) different length and shorter struc identical to head

c.) identical but last component ( Byte or number like ).

Type N is a charlike type, which content is limited to numbers, therefore it is treated from UC view as type C.

So the layout is as following


struc1
  1.)  2 *  c
  2.)  1 *  i
  3.)  1 *  x
struc2
  1.)  2 *  c
  2.)  1 *  x
  3.)  1 *  i
struc4
  1.) 50 *  c
struc5 
  1.) 90 *  c
  2.)  1 *  i

So the assignment struc4 = struc5 is case b.).

So the assignment struc1 = struc2 is no valid case due there are 2 differnt tail fragments.

Kind Regards

Klaus

3 REPLIES 3
Read only

former_member183804
Active Contributor
0 Likes
681

There are 3 cases for flat structures (check the online docu).

a.) identicial fragment view

b.) different length and shorter struc identical to head

c.) identical but last component ( Byte or number like ).

Type N is a charlike type, which content is limited to numbers, therefore it is treated from UC view as type C.

So the layout is as following


struc1
  1.)  2 *  c
  2.)  1 *  i
  3.)  1 *  x
struc2
  1.)  2 *  c
  2.)  1 *  x
  3.)  1 *  i
struc4
  1.) 50 *  c
struc5 
  1.) 90 *  c
  2.)  1 *  i

So the assignment struc4 = struc5 is case b.).

So the assignment struc1 = struc2 is no valid case due there are 2 differnt tail fragments.

Kind Regards

Klaus

Read only

Former Member
0 Likes
680

Hi Nishant,

In the First case 50 char of Struc1 will be copied to the struc2 in this way

30 chars of struc1 -> 30 chars of struc2

20 chars of struc1 -> 20 numc of struc2

Numc is not a problem as it will be considered as Character type only.

But in the secone case the type mismatch is there ie type x is copied to integer type so it will give you error.

Regards,

Amit

Read only

0 Likes
680

Hi,

I'm getting the same problem.

Do someone how to solve the problem??

Thanks,

MC.