Previous Topic: Operand DefinitionsNext Topic: Input Line Command


INPUT Command

The INPUT command inserts null lines (open a window) into the data based on the cursor position.

This command has the following format:

      [[CONTEXT] n]
INPUT [WINDOW m   ]
[CONTEXT] n

Indicates the number of required context lines (lines retained on the screen for reference). n lines display at the bottom of the screen if the cursor remains in the command area; or n lines appear at the top and bottom of the screen if the cursor is placed in the region. The rest of the screen is opened up for input.

You can set the default number of context lines with the SET EDIT CONTEXT command.

WINDOW m

Indicates the number of null lines to insert. The window is opened at the top of the screen if the cursor remains in the command area or following the line with the cursor if the cursor is placed in the region.

When possible, CA Ideal scrolls the window forward or backward to center the window in the region. When the value of m exceeds the number of lines left in the region, minus context lines, the maximum number of lines that can fit between the context lines is inserted.

Example

In the following example, a window 5 lines long is requested in the region starting below the line with the cursor (900).

=> INPUT WINDOW 5 ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.... IDEAL: PROCEDURE DEFINITION PGM CRTEST (001) TEST SYS: $ID FILL-IN Command....+....1....+....2....+....3....+....4....+....5....+....6....+....7.. ====== ================================ T O P ================================ 000100 FOR EACH EMPLOYEE 000200 WHERE STATE_ADDRESS = 'CA' OR 'IL' 000300 AND NUMBER > 125 AND < 150 000400 FOR PAYROLL 000500 WHERE NUMBER = EMPLOYEE.NUMBER 000600 AND NUMBER > 100 AND < 150 000700 SET SALARY = YTD_WAGES + YTD_COMMISSION - YTD_TAX 000800 SET STATE1 = 'CA' 000900_ SET STATE2 = 'IL' 001000 PRODUCE CARM1 001100 ENDFOR 001200 ENDFOR 001300 FOR EACH EMPLOYEE 001400 ORDERED BY STATE_ADDRESS CITY_ADDRESS EMPLOYEE.NAME 001500 WHERE STATE_ADDRESS = 'CA' OR 'IL' 001600 AND NUMBER > 125 AND < 150

After applying the data, five null lines are inserted as shown in the next example.

=>

....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.... IDEAL: PROCEDURE DEFINITION PGM CRTEST (001) TEST SYS: $ID FILL-IN Command....+....1....+....2....+....3....+....4....+....5....+....6....+....7.. ====== ================================ T O P ================================ 000100 FOR EACH EMPLOYEE 000200 WHERE STATE_ADDRESS = 'CA' OR 'IL' 000300 AND NUMBER > 125 AND < 150 000400 FOR PAYROLL 000500 WHERE NUMBER = EMPLOYEE.NUMBER 000600 AND NUMBER > 100 AND < 150 000700 SET SALARY = YTD_WAGES + YTD_COMMISSION - YTD_TAX 000800 SET STATE1 = 'CA' 000900 SET STATE2 = 'IL' ...... ...... ...... ...... ...... 001000 PRODUCE CARM1 001100 ENDFOR 001200 ENDFOR