Skip to main content

[archive] populating a hexadecimal property

  • April 10, 2010
  • 5 replies
  • 0 views

[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

5 replies

[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
Try just defining it as a level 78 like this:

78 PR-BODY    VALUE  X#1000001E.

[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
Try just defining it as a level 78 like this:

78 PR-BODY    VALUE  X#1000001E.

[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
Try just defining it as a level 78 like this:

78 PR-BODY    VALUE  X#1000001E.

[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
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...

[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
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.