DROP (DR) function


The DROP function eliminates unwanted records from a data set while copying it. Use the IF, AND, and ORIF selection parameters to specify the records to be dropped. Specify the CEM parameter to copy empty members of a partitioned dataset. Use the IN, OUT, or DROP limiting parameters to stop DROP processing. After completing a DROP function, File-AID reports the number of dropped records on the SYSPRINT output.


Important

  • The DROP function is not an update-in-place. The input and output files cannot be the same file unless it is sequential and has fixed length records. For DDxxO, using the same dataset name is permitted if it is a different physical data set on a different volume. File-AID issues the message: THE INPUT DATASET CANNOT ALSO BE THE OUTPUT DATASET
  • The DROP function is not supported for PDS or PDSE load libraries.

Example 1:

$$DD01 DROP IF=(4,7,NEP)

Example 1 copies all of the input dataset records and drops any record that does not contain a valid 7-byte packed field beginning in location 4.

Example 2:

$$DD01 DROP IF=(15,EQ,P’1,2’),DROP=200

Example 2 copies the input dataset to the output dataset, and stops after dropping the first 200 records containing a valid packed field of any length, that begins in location 15, and has an arithmetic value equal to 1 or 2. For more information on packed data testing, see Packed Data.

Example 3:

$$DD01 DROP IF=(1,EQ,C’A,B’),ORIF=(19,LT,P’101’),OUT=15

To create an extract file, Example 3 copies the input dataset and drops any record that either contains the letter A or the letter B in location 1, or contains a packed data value less than 101 in location 19. Processing stops when 15 records are copied.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*