Highlighted
Absent Member.
Absent Member.
865 views

[archive] populating a hexadecimal property

[Migrated content. Thread originally posted on 09 April 2010]

I am trying to convert this VBScript code used in an ActiveX Control to Cobol and I keep getting a type mismatch error. I'm assuming this is because I'm not handling the hexadecimal field properly. Does anyone know what I'm doing wrong?

VBScript Code:
PR-BODY =  &H1000001E
ws-body =  sItem.Fields(PR-BODY)

COBOL Code:
01  PR-BODY    PIC X(04) VALUE H"1000001E".
...
INQUIRE  OUTLOOK-CDO-ITEM @FIELDS(PR-BODY)
  IN WS-BODY.
I've attached the "def" file from AXDEFGEN as well.

Thanks,
Rob
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] populating a hexadecimal property

Try just defining it as a level 78 like this:

78 PR-BODY    VALUE  X#1000001E.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] populating a hexadecimal property

Quick Q:

Does this work?:

INQUIRE  OUTLOOK-CDO-ITEM @FIELDS(268435486)
  IN WS-BODY.


268435486 is the decimal value of hex 1000001E. From my point of view, I cannot see any reason why you have to stick with the hex number, so...
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] populating a hexadecimal property

Mik- I tried that as well and it didn't work.

Gisle - This worked - thanks. I think I tried something similar, but didn't get the proper decimal version or something.

Problem solved. Thanks for both of you for your assistance.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.