-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Chase, John
Sent: Monday, January 07, 2008 7: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'> =20
<SNIP>
>From the old CICS 1.1.1 macro level COBOL days:
What you do is, in your editor, you change to HEX and you put the values
you are specifically looking for in your 88 level.
Thusly:
88 DFHERASE VALUE '.' '.' .
Where '.' the . is a non-displayable value that gets xlated to x'4b'
(period) for display purposes. But when you edit (using ISPF) you will
be told that your source contains hex values (or non-displayable
values).
COBOL will accept those and will build your IF statement using CLI not
TM, so make sure that you specify all the bit patterns that will contain
the bit you are after.
OTHERWISE, you will have to "explode" the byte(s) on your own (I don't
know of any LE or COBOL build in functions to do this) and then do the
test of the byte that contains the bit you are interested in.
Regards,
Steve Thompson
-- All opinions expressed by me are my own and may not necessarily
reflect those of my employer. --
----------------------------------------------------------------------
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