Previous Topic: Usage Details

Next Topic: Parameters

YCVTRCO - Convert between Row/Column/Offset

The YCVTRCO command is a utility to calculate the offset for a row/column position. Conversely, it can be used to convert an entered screen offset to its equivalent row/column.

Within generated HTML skeletons, Web Option tags and data are defined by their screen offset, where the top-left corner of a 24 * 80 screen is offset 1 and the bottom-right corner of a 24 * 80 screen is offset 1920. Because the concept of screen offsets is not one commonly used by IBM i developers or users, this command is supplied to easily provide a user-friendly conversion.

The conversion algorithm from row/column to offset and vice versa is:

OFFSET = ( ( ROW - 1 ) * 80 ) + COLUMN )