Previous Topic: Operand DefinitionsNext Topic: IGNORE Line Command


Components Used with the FIRST Command

The FIRST command applies to the following components. Default column boundaries for each component are also listed.

 

Column Edited

Column Boundaries

Member

Data area

1‑72

Report

 

 

Detail

Field name

1‑25

Heading

Field name

1‑56

Column

Field name

1‑25

Program

 

 

Procedure

Data area

1‑72

Parameter

Field name

1‑19

Working data

Field name

1‑19

Dataview

 

 

Field

Field name

1‑19

Key (VSAM)

Field name

1‑32

Plan

 

 

DBRM

DBRM

1‑8

Resource

Program name

1‑8

If you use the n operand to search for all occurrences or any number of occurrences greater than 1, FIRST displays only those lines containing the string. You can use the following commands without changing this display.

FIND, FIRST, NEXT, LAST, PREVIOUS (where n > 1)
IGNORE
SCROLL

The use of any command other than those listed above replaces this display with a display showing the lines of data in sequence.

Example

The FIRST command searches for the first three occurrences of the string NUMBER.

=> FIRST 3 /NUMBER/ ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.... IDEAL: PROCEDURE DEFINITION PGM CRTEST (001) TEST SYS: $ID FILL-IN ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..Command ================================ T O P ================================= ====== SELECT 000100 WHEN $ENTER-KEY 000200 FOR EMPLOYEE 000300 WHERE EMPLOYEE.NUMBER = DISPLANEL.NUMBER 000400 MOVE DISPANEL TO EMPLOYEE BY NAME 000500 WHEN NONE 000600 SET DISPANEL.MSG = 'EMPLOYEE DELETED' 000700 SET ATTR HIGHLIGHT TEMP ON DISPANEL.NUMBER 000800 ENDFOR 000900 SET NEXT_PANEL = 'DISPANEL' 001000 WHEN $PF11 001100 SET NEXT_PANEL = 'EMPMENU' 001200 WHEN $PF12 001300 DO TERMINATE_SES 001400 WHEN $ENTER-KEY 001500 FOR EMPLOYEE 001600 WHERE EMPLOYEE.NUMBER = DISPLANEL.NUMBER 001700

The lines that contain the string are displayed.

=>

....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.... IDEAL: PROCEDURE DEFINITION PGM CRTEST (001) TEST SYS: $ID FILL-IN INCL /NUMBER/ ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..Command ================================ T O P ================================= ====== WHERE EMPLOYEE.NUMBER = DISPLANEL.NUMBER 000400 SET ATTR HIGHLIGHT TEMP ON DISPANEL.NUMBER 000800 WHERE EMPLOYEE.NUMBER = DISPLANEL.NUMBER 001700