You can use a divide instruction:
DIVIDE MAP-FIELD-ATTRIBUTE BY 128 GIVING WS-BIT.
IF WS-BIT IS NOT EQUAL TO ZERO THEN
DISPLAY "X'80' IS SET".
David Logan
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Chase, John
Sent: Monday, January 07, 2008 6:33 AM
To: [email protected]
Subject: COBOL is simple -- NOT!!
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
----------------------------------------------------------------------
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