Previous Topic: SyntaxNext Topic: SKIPRECIF


Parameters

SKIP supports one parameter.

number

An integer between 0 and 999,999,999. If 0 is used, no records are skipped.

Example 1

Select the 21st and subsequent records for processing.

COPY,
  SKIP(20)

Example 2

Copy a file and bypass all records for which the CUST-PURCHASE-CODE does not equal an A and also bypass the first 20 records that do match the SELRECIF criteria. Only the 21st and subsequent records matching the SELRECIF are copied.

COPY,
  LAYOUTFILE(LAYOUT),
  SELRECIF(CUST-PURCHASE-CODE,EQ,C'A'),
	SKIP(20)

Example 3

Copy all records in the file, and CHANGE the CUST-REWARD-LEVEL from 706 to 859 in the 21st and subsequent records whose CUST-PURCHASE-CODE equal an A.

COPY,
  IF(1,5,EQ,C'A'),
	SKIP(20),
	CHANGE(62,EQ,C'706',C'859')