Dynamically changing Extened attributes like Highlighting it

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
m4mainframe
New Member
Posts: 8
Joined: Thu Aug 08, 2013 12:34 pm

Dynamically changing Extened attributes like Highlighting it

Post 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?
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Dynamically changing Extened attributes like Highlightin

Post 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.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Quasar Chunawala
Registered Member
Posts: 34
Joined: Sun Aug 11, 2013 4:48 pm
Location: Pune

Re: Dynamically changing Extened attributes like Highlightin

Post 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
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”