TSO-ISPF JCL COBOL VSAM DB2 CICS IMS-DB IMS-DC Tools Articles Forum Quiz Interview Q&A

Cursor Positioning and Attribute Control from the Program


If you code ATTR=YES in a MFLD statement, you should prefix the data area for that field in your programs I/O area with a 2 byte prefix. The first byte if set to X’C0’ will cause the cursor to be positioned in that field.

The next byte can be used to either selectively or completely replace the PROTECTION, SHIFT, and INTENSITY or MDT bits in the field attribute byte.

Second byte bits.

PositionFunction
0 Not used must be 1 always
1 1 Override only specific bits if 0 (OR existing bits with following bits) Else override all if 1 (replace existing bits with following bits)
2 0 if unprotected, 1 if protected
3 0 is alpha shift, 1 is numeric shift
4,5 00 is normal intensity, 01 is dark, 10 and 11 is bright
6 Not used
7 0 is MDT off, 1 is MDT ON

Absolute cursor positioning, specify for example,

DPAGE   CURSOR=((3,17,CFIELD))

CFIELD is a MFLD of 4 bytes length. First two bytes will hold the line number and next two will hold the column number. If it is specified in an input MFLD these fields will have the line and column number where the cursor was positioned when the enter key was pressed.

If it specifies an output message field, the application can set the line number and column number where the cursor has to be positioned on output.



If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on IBMMainframer Community!

Are you looking for Job Change? Job Portal