Page 1 of 1

Dynamically changing Extened attributes like Highlighting it

Posted: Sat Feb 22, 2014 9:08 am
by m4mainframe
How to dynamically change the extended attributes of the CICS MAPS in the COBOL Program?

I have turned on the Extended attributes on the CICS MAP, I have the variables with suffixes like A,H,C,U etc. Lets say the Variable name is MSG. So we have MSGA, MSGH, MSGC, MSGU etc. Now lets say first time the screen is present and then a user pressed PF5 which should outline the input field on the MAP. Lets say he entered Number instead of Alphabets which the program logic will not accept then We need to change the colour of the field as blue and if the value entered in the field is matching with a particular value in the program , we want to highlight it.

Please do not worry about the logic. I only need to now how can we change these extended attributes of the field dynamically in the cobol program? Like if we have to move the cursor to MSG field we move -1 to MSGL Same way I want to know what we have to do with the MSGH, MSGC, MSGU, MSGA etc..

Can anybody please help?

Re: Dynamically changing Extened attributes like Highlightin

Posted: Mon Feb 24, 2014 8:21 pm
by Anuj Dhawan
"Sub-field suffixing", which you are talking about, allows an application program to change the data in a data structure.

To make use of them you've to include the bit-patterns of different attributes which represents the "behavior". The bit patterns that represent particular attributes are difficult to remember, so CICS provides a list of named standard attribute bytes. You can code these names in a program instead of their hexadecimal equivalents. To use them, you must use the name DFHBMSCA, and copy the list, into your program - this is a supplied copybook that is stored in the system source library at installation.

From your example, MSGH, attribute byte would define the highlighting that is to be used within a field in a display like this:

Code: Select all

       MOVE 'this is message' TO MSGO 
       MOVE DFHHLT TO MSGH.
Hope this helps.

Re: Dynamically changing Extened attributes like Highlightin

Posted: Tue Feb 25, 2014 11:23 pm
by Quasar Chunawala
To add, here's the entire list of DFHBMSCA constants that you can use -

http://publib.boulder.ibm.com/infocente ... stants.htm

We can have this one as a sticky in fact!

HTH,
Quasar