Cursor positioning

On 3270, 3604, or SLU 2 display devices, the cursor is positioned by its line and column position on a physical page. When a specific cursor position is always required (and device-dependence is not an issue), you can define cursor position in the DPAGE statement.

The DPAGE statement can also be defined so that cursor position is known to the application program on input and is specified dynamically by the application program on output. To dynamically define cursor position on output, specify a device field name along with its line and column position. If this field is then referred to by a MID MFLD statement, the cursor position is provided in that message field on message input. If the message field is referred to in a MOD MFLD statement, the message field can be used by the application program to specify cursor position on output.

The application program cursor position request is used if its specified size is within the line and column specifications of the SIZE= operand of the TERMINAL macro for device type 3270-An; or within the line and column boundaries of 3270, model 1 or 2. Otherwise, the line and column positions specified on the DPAGE statement or the default positions (line 1, column 2) are used.

Related reading: For a description of the TERMINAL macro, see IMS Version 15.4 System Definition.

The option of providing cursor location on input is available only for 3270 or SLU 2 devices. This method of cursor positioning is not recommended for output, because it requires the application to use a specific device field position, making the application device-dependent. MFS considers cursor position as a device field attribute; the field attribute facility can be used to establish cursor position.

Application programs can dynamically replace, modify, or simulate attributes for a device field whose corresponding message field is defined as ATTR=YES or ATTR=nn. At least the first 2 bytes of a message field defined in this way are reserved for attribute data or extended attribute data provided by the application program.

For a 3290 in partitioned-format mode, the first partition descriptor (PD) statement defined in the partition descriptor block (PDB) is the first partition created. The cursor is placed in this partition, which becomes the active partition unless overridden by the Jump Partition key or by the ACTVPID= keyword in the DPAGE statement associated with a subsequent output message.

Using the Jump Partition key causes the cursor to jump to the next sequential partition defined by the application program and that partition becomes the active one. The ACTVPID= keyword allows the application program to activate and locate the cursor in a specific partition.