Like this

        05  MAP-FIELD1-ATTRIBUTE  PIC X.
                 88  FIELD1-ERASED       VALUES X'80' X'82'.
....
        05  MAP-FIELD2-ATTRIBUTE  PIC X.
                 88  FIELD2-ERASED       VALUES X'80' X'82'.
....


        IF FIELD1-ERASED
        ....

....
        IF FIELD2-ERASED
        ....


        
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Chase, John
Sent: Monday, January 07, 2008 5: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

Reply via email to