---
title: "Best DFSORT INREC and OUTREC Example"
description: "INREC  and OUTREC are the two important parameters we used in Sort. https://srinimf.com/2010/11/28/outfil_outrec/. INREC ==> Reformatted input record. We do not take the complete record. We only take..."
url: https://srinimf.com/2013/03/19/inrec_outrec/
date: 2013-03-19
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2021/09/pexels-photo-7174397.jpeg?fit=1880%2C1255&ssl=1
categories: ["DFSORT"]
tags: ["DFSORT tips and Tricks", "JCL DFSORT"]
type: post
lang: en
---

# Best DFSORT INREC and OUTREC Example

INREC [and OUTREC](https://srinimf.com/2012/03/14/jcl-inrec-overlay-and-outrec-dfsort/) are the two important parameters we used in Sort.

Related[DFSORT: OUTFIL,OUTREC,INREC, INCLUDE](https://srinimf.com/2010/11/28/outfil_outrec/)

INREC ==> Reformatted input record. We do not take the complete record. We only take part in the record.

Related[ZO/S – Assembler Language – Tutorial](https://srinimf.com/2013/12/28/zos-assembler-language-tutorial/)

OUTREC=>Reformatted output record.This contains what are the input fields(in the sorted input) will have in the output file.

**General Syntax:**

INREC  FIELDS=([c:]\[[separation-fld](http://www-01.ibm.com/support/knowledgecenter/SSLTBW_1.12.0/com.ibm.zos.r12.icea100/ice1ca50204.htm%23wq1209),]position,length…)

OUTREC FIELDS=([c:]\[separation-fld,]position,length*…*)

c: Specifies the column (byte) in which a data field or separation field should be placed, relative to the start of the record. If the column settings that are coded skip over any bytes, those bytes are filled with spaces.

**Separation field:** Tells the sort/merge utility to insert a constant value into the record. The constant can be specified in one of these forms:

Nx: Inserts n repetitions of spaces

Nz: Inserts n repetitions of binary zeros

Nc’text’: Inserts n repetitions of the specified text

NX’hex’: Inserts n repetitions of the specified hex value

If n is omitted, one repetition of the specified constant is inserted.

[IBM example-Check here](http://www-01.ibm.com/support/knowledgecenter/SSLTBW_1.12.0/com.ibm.zos.r12.icea100/ice1ca50204.htm%23wq1209).

Related Posts

- [DFSORT: OUTFIL,OUTREC,INREC, INCLUDE](https://srinimf.com/2010/11/28/outfil_outrec/)DateNovember 28, 2010
- [JCL- Inrec, Overlay and Outrec-DFSORT](https://srinimf.com/2012/03/14/jcl-inrec-overlay-and-outrec-dfsort/)DateMarch 14, 2012
- [10 Top Uses of Mainframe DFSORT Utility](https://srinimf.com/2015/05/01/zos-how-dfsort-works-in-simple-way/)DateMay 1, 2015

### 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%2F2013%2F03%2F19%2Finrec_outrec%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2021%2F09%2Fpexels-photo-7174397.jpeg%3Ffit%3D1200%252C801%26ssl%3D1&description=Best%20DFSORT%20INREC%20and%20OUTREC%20Example)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2013/03/19/inrec_outrec/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2013/03/19/inrec_outrec/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2013/03/19/inrec_outrec/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2013/03/19/inrec_outrec/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Best%20DFSORT%20INREC%20and%20OUTREC%20Example&body=https%3A%2F%2Fsrinimf.com%2F2013%2F03%2F19%2Finrec_outrec%2F&share=email)
-

### Like this:

Like Loading…
