---
title: "OMIT condition in Sort top example to read now"
description: "OMT condition in sort explained with best examples to use in your project."
url: https://srinimf.com/2015/05/12/jcl-include-omit-examples/
date: 2015-05-12
modified: 2026-10-07
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2018/06/rubber-duck-bath-duck-toys-costume-106144-e1528092693807.jpeg?fit=1495%2C1121&ssl=1
categories: ["DFSORT", "JCL"]
tags: ["DFSORT tips and Tricks"]
type: post
lang: en
---

# OMIT condition in Sort top example to read now

The best way to improve the efficiency of a sort of a merge is to reduce the number of records that are sorted or merged.

To do that, you can use the **INCLUDE and OMIT** statements to identify the records that should be included or omitted from the sort or merge.

**The syntax of the INCLUDE and OMIT statements**

```
INCLUDE COND=(field,comparison,{field }, [ {AND}, ]…)
 {constant} {OR }
OMIT COND=(field,comparison,{field }, [ {AND}, ]…)
 {constant} {OR }
```

**Examples:**

```
INCLUDE COND=(1,1,CH,EQ,C'A')
Include only the records that have an A in byte 1.
```

Related[SQL Delete Top Examples Explained](https://srinimf.com/2010/05/16/db2-delete-in-sql/)

```
OMIT COND=(1,1,CH,EQ,C'A')
Omit the records that have an A in byte 1.
```

```
INCLUDE COND=(72,5,PD,GE,1000)
Include only the records with a packed-decimal value in bytes 72-76 
that’s greater than or equal to 1000.
```

```
INCLUDE COND=(72,5,PD,GE,1000,OR, 72,5,PD,LT,10)
Include only the records with a packed-decimal value in bytes 72-76 
that’s greater than or equal to 1000 or less than 10.
```

Related Posts

- [10 Best DFSORT Really useful Ready to Use Examples](https://srinimf.com/2017/02/14/10-best-dfsort-really-useful-ready-to-use-examples/)DateFebruary 14, 2017
- [Best DFSORT INREC and OUTREC Example](https://srinimf.com/2013/03/19/inrec_outrec/)DateMarch 19, 2013
- [Include COND: Matching TimeStamp Example](https://srinimf.com/2016/06/21/include-cond-matching-records-with-timestamp/)DateJune 21, 2016

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2015%2F05%2F12%2Fjcl-include-omit-examples%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2018%2F06%2Frubber-duck-bath-duck-toys-costume-106144-e1528092693807.jpeg%3Ffit%3D1200%252C900%26ssl%3D1&description=OMIT%20condition%20in%20Sort%20top%20example%20to%20read%20now)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2015/05/12/jcl-include-omit-examples/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2015/05/12/jcl-include-omit-examples/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2015/05/12/jcl-include-omit-examples/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2015/05/12/jcl-include-omit-examples/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20OMIT%20condition%20in%20Sort%20top%20example%20to%20read%20now&body=https%3A%2F%2Fsrinimf.com%2F2015%2F05%2F12%2Fjcl-include-omit-examples%2F&share=email)
-

### Like this:

Like Loading…