It seems that you have gotten a variety of semi-correct answers. If I
understand it correctly, you are trying to test the value of
MAP-FIELD=ATTRIBUTE to see if is either X'80' or X'82' - and that you have
these values from the definition in DFHERASE - which is elsewhere in your
application. If this is the correct definition of the problem then there
are two solutions:
1) (Possibly easiest), in your procedure division code,
If MAP-FIELD-ATTRIBUTE = x'80' or x'82' ...
or
2) "more elegant) add a source line under:
05 MAP-FIELD-ATTRIBUTE PIC X.
that says,
88 Map-Field-Attribute-Erase Value X'80' x'82'.
then in your procedure division code
If map-field-attribute-erase then ....
There is no way to compare a data item's content to the values of an
unrelated 88-level (as others have pointed out).
Hopefully, this helps.
P.S. If the real issue is testing for the high order bit turned on, then I
think you need to change:
88 map-field-attribute-erase Value X'80' thru X'8f' X'f0' thru x'ff'.
It is VERY true that current COBOL is really "nasty" for handling bit
twiddling, but as someone suggested, you can use the CEE callable service
for this. If it is only the high-order bit, then the "thru" should work OK.
"Chase, John" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>..
.
> Hi, All,
>
> This is almost embarrassing to ask, but how in blazes does one code the
> equivalent of a TM instruction in COBOL? Here's what we have:
>
> In the data division:
>
> 05 MAP-FIELD-ATTRIBUTE PIC X.
> ...
> In an IBM-supplied copybook:
>
> 02 DFHBMFLG PIC X.
> 88 DFHERASE VALUES ARE <X'80'>,<X'82'>
>
> In the procedure division, we code:
>
> IF MAP-FIELD-ATTRIBUTE = DFHERASE
>
> and the compiler says:
>
> Condition-name "DFHERASE" was found inside the scope of an
> abbreviated condition
> The statement was discarded.
>
> All we want is the equivalent of
>
> TM MAP-FIELD-ATTRIBUTE,X'80'
>
> How is that done in COBOL?? Can it even be done in COBOL??
>
> TIA,
>
> -jc-
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html