You can assign a default attribute in a BMS map. But if you want to change the attributes during the execution of the task, then that is also possible. This can be achieved by dynamically assigning a new attribute character for the field.

For the dynamic attribute character assignment, you must place the predefined attribute character to the 'Name+A' of the field to which you wish to dynamically assign the attribute character. The attribute character to be dynamically assigned must be chosen with care based on the requirements and the characteristics of the field. When the map is sent using the SEND MAP command, the new attribute will be in effect on the field, overriding the original attribute defined at the map definition time.

Very similar to dynamic attribute assignment, there is some thing called dynamic cursor positioning. The cursor can be positioned in a field by placing IC in the ATTRB option of the DFHMDF macro during the map definition time. When the map is sent the cursor will be positioned in this field. But you can dynamically position the cursor, dynamic symbolic cursor positioning, by moving -1 into, the length field (Name+L) of the required field. The SEND map command to be issued must have a CURSOR option (without value) and also the mapset must be coded with MODE=INOUT in the DFHMSD macro. Here the dynamic cursor positioning overrides the static cursor positioning (i.e. ATTRB = IC). This approach provides the application program with complete device and format independence. Another method of cursor positioning is called dynamic relative cursor positioning where you can specify a value in the CURSOR option of the SEND MAP command. For example if we give CURSOR (100), in the SEND MAP option the cursor will be positioned at position 100 of the terminal, relative to zero at the beginning of the screen. But it is always better to use dynamic cursor positioning over relative cursor positioning because it ensures device and format independence.

Consider the following example where both dynamic cursor positioning and dynamic attribute character assignments are happening:

Working storage section

Working storage section

So at the completion of the SEND MAP Command, the cursor will be positioned in FLD1 and the field will be highlighted, unprotected and the MDT will be set to on.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics