---
title: "Here is Logic to Use Variable-length Records Linkage Section"
description: "Many mainframe programmers asked -Can give VB record in Linkages Section. The answer is yes. Below is the best example for VB Record: https://srinimf.com/2020/09/19/sequential-vs-relative-files-top-di..."
url: https://srinimf.com/2016/02/01/how-to-give-vb-record-in-linkage-section/
date: 2016-02-01
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2016/02/pexels-photo-1639047.jpeg?fit=1880%2C1251&ssl=1
categories: ["COBOL"]
tags: ["COBOL VB Record in LInkage Section Example"]
type: post
lang: en
---

# Here is Logic to Use Variable-length Records Linkage Section

Many [mainframe programmers](https://srinimf.com/2015/07/22/easytrieve-guide-for-mainframe-programmers-6-of-20/) asked -Can give VB record in Linkages Section. The answer is yes. Below is the best example for VB Record:

Related[Sequential and Relative files Here’re Quick Differences](https://srinimf.com/2020/09/19/sequential-vs-relative-files-top-differences/)

## Variable Length Record COBOL

```
LINKAGE SECTION.
01 RECORD-FLAGS PIC 9(8) BINARY.
 88 FIRST-REC VALUE 00.
88 MIDDLE-REC VALUE 04.
88 END-REC VALUE 08.
01 LEAVING-REC.
     05 LREC OCCURS 1 TO 200 TIMES
          DEPENDING ON LEAVING-REC-LEN PIC X.
01 RETURN-REC.
    05 RREC OCCURS 1 TO 200 TIMES
         DEPENDING ON RETURN-REC-LEN PIC X.
 01 OUTPUT-REC.
    05 OREC OCCURS 1 TO 200 TIMES
         DEPENDING ON OUTPUT-REC-LEN PIC X.
01 UNUSED1 PIC 9(8) BINARY.
01 LEAVING-REC-LEN PIC 9(8) BINARY.
01 RETURN-REC-LEN PIC 9(8) BINARY.
01 OUTPUT-REC-LEN PIC 9(8) BINARY.
01 EXITAREA-LEN PIC 9(4) BINARY.
01 EXITAREA.
    05 EAREA OCCURS 1 TO 256 TIMES
        DEPENDING ON EXITAREA-LEN PIC X.
```

Related[COBOL Tough Questions (3 of 3)](https://srinimf.com/2012/01/17/cobol-tough-questions-3-of-3/)

Related

Related[Exclusive CICS EIBCALEN and DFHCOMMAREA](https://srinimf.com/2012/05/31/cics-eibcalen-receivedfhcommarea/)

- [How to Create VB File in COBOL](https://srinimf.com/2012/07/08/cobol-how-to-create-vb-file/)DateJuly 8, 2012
- [How to Create VB file Using Varying Clause in COBOL](https://srinimf.com/2010/09/02/cobol-variable-recordvb-files/)DateSeptember 2, 2010
- [How to Define VB files in COBOL Sample Logic](https://srinimf.com/2012/03/29/cobol-arrays-variable-files/)DateMarch 29, 2012

### 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%2F2016%2F02%2F01%2Fhow-to-give-vb-record-in-linkage-section%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2016%2F02%2Fpexels-photo-1639047.jpeg%3Ffit%3D1200%252C799%26ssl%3D1&description=Here%20is%20Logic%20to%20Use%20Variable-length%20Records%20Linkage%20Section)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2016/02/01/how-to-give-vb-record-in-linkage-section/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2016/02/01/how-to-give-vb-record-in-linkage-section/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2016/02/01/how-to-give-vb-record-in-linkage-section/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2016/02/01/how-to-give-vb-record-in-linkage-section/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Here%20is%20Logic%20to%20Use%20Variable-length%20Records%20Linkage%20Section&body=https%3A%2F%2Fsrinimf.com%2F2016%2F02%2F01%2Fhow-to-give-vb-record-in-linkage-section%2F&share=email)
-

### Like this:

Like Loading…
