SKIP Specification

The syntax of the SKIP specification is as follows:

label SKIP YEAR=year,MONTH=month,DAY=day
label
Label for the SKIP statement. Use this label on the first statement in a set. This name is used to identify the group on an OVERRIDE or FORMAT statement.
SKIP
Macro name for defining a skip value. It must be preceded by a space.
year
Value in the year portion that identifies a field to skip.
month
Value in the month portion that identifies a field to skip.
day
Value in the day portion that identifies a field to skip.
Notes:

Examples

The following SKIP statements are provided in the FOP9SAPF member.

These statements are grouped by the units that are included. Thus, a single SKIP statement can be defined for several FORMAT statements regardless of data type. (Examples for specifying the SKIP parameter on the FORMAT statements follow.)

*-----DEFINE THE SKIP DATES WITH: YEAR, MONTH, AND DAY
GBLSKIP SKIP  YEAR=1999,MONTH=99,DAY=99
        SKIP  YEAR=9999,MONTH=12,DAY=31
        SKIP  YEAR=1,MONTH=1,DAY=1
        SKIP  YEAR=0,MONTH=0,DAY=0
        SKIP  YEAR=1900,MONTH=0,DAY=0
*-----DEFINE THE SKIP DATES WITH YEAR AND DAY
        SKIP  YEAR=1999,DAY=999
        SKIP  YEAR=9999,DAY=999
        SKIP  YEAR=0,DAY=0
        SKIP  YEAR=1900,DAY=0
        SKIP  YEAR=2000,DAY=0
*-----DEFINE THE SKIP DATES WITH YEAR AND MONTH
        SKIP  YEAR=1999,MONTH=99
        SKIP  YEAR=9999,MONTH=99
        SKIP  YEAR=0,MONTH=0
        SKIP  YEAR=1900,MONTH=0
        SKIP  YEAR=2000,MONTH=0
*-----DEFINE THE SKIP DATES WITH MONTH AND DAY
        SKIP  MONTH=99,DAY=99
        SKIP  MONTH=0,DAY=0
*-----DEFINE THE SKIP DATES WITH YEAR ONLY
        SKIP  YEAR=0
        SKIP  YEAR=9999
*-----DEFINE THE SKIP DATES WITH MONTH ONLY
        SKIP  MONTH=0
        SKIP  MONTH=99
*-----DEFINE THE SKIP DATES WITH DAY ONLY
        SKIP  DAY=0
        SKIP  DAY=99
        SKIP  DAY=999
        SKIPEND 

When coding a SKIP macro for a format with a base day or month, the macro must contain the Lilian day of the base date and the number to be skipped. For example, the following SKIP macro directs Optim to skip fields containing binary zeros or all nines formatted as D1900R1 (the number of days since January 1, 1900).

GLBSKIP  SKIP   DAY=115860      Value of zeros
         SKIP   DAY=215859      Value of all 9s
         SKIPEND

Global Skipped Dates

The list of global skipped values is defined using the OVERRIDE macro as described in the following section. The distributed version uses the values shown on the previous page.

Assigning on FORMAT

You use the label on the SKIP statement to assign them to the FORMAT statements.

The following SKIP statements demonstrate specifying two groups of labeled SKIP statements and using the asterisk.

*-----DEFINE THE SKIP DATES WITH: YEAR, MONTH, AND DAY
FULLFMT      SKIP  YEAR=*,MONTH=99,DAY=99
      SKIP  YEAR=*,MONTH=0,DAY=0
*-----DEFINE THE SKIP DATES WITH YEAR AND DAY
YRDAY      SKIP  YEAR=*,DAY=999
      SKIP  YEAR=9999,DAY=*

Using FORMAT statements provided in FOP9SAPF for the examples, you can assign these SKIP statements as shown:

For Character Data:

FORMAT 6,'MMDDYY',C_MMDDYY,SKIP=FULLFMT
FORMAT 8,'YYYYDDMM',C_YYYYDDMM,SKIP=FULLFMT
FORMAT 8,'YYYY/DDD',C'/',SKIP=YRDAY

For Decimal Data:

FORMAT 3,'YYDDD',D_YYDDD,SKIP=YRDAY

Note that you must assign SKIP to the format in each data type for which it is to be applied.

You can use the OVERRIDE statement to apply a set of SKIP statements globally and then specify other SKIP statements on individual FORMAT statements. The FORMAT specifications override any OVERRIDE specifications.

To override global specifications for an individual FORMAT, use SKIP=NONE. For example,

FORMAT 6,'MMDDYY',C_MMDDYY,SKIP=NONE

This is useful when fields defined for a specific format must contain a valid date and cannot be skipped.