---
title: "CICS Files, What’s CONSISTENT Option"
description: "A tricky file handling option in CICS is CONSISTENT. CICS handles integrity in two ways. There are two ways -One way is read waits till update completes, and option -2 is first READ completes and then..."
url: https://srinimf.com/2016/02/23/cics-file-read-command-option-consistent/
date: 2016-02-23
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2021/09/pexels-photo-6801651.jpeg?fit=1880%2C1253&ssl=1
categories: ["CICS"]
tags: ["cics commands", "CICS tips and Tricks"]
type: post
lang: en
---

# CICS Files, What’s CONSISTENT Option

A tricky file handling option [in CICS](https://srinimf.com/2016/01/20/5-thoughts-on-cics-ridfld-updating-a-vsam-record/) is CONSISTENT. CICS handles integrity in two ways. There are two ways -One way is read waits till update completes, and option -2 is first READ completes and then UPDATE completes.

Related[CICS: GETMAIN Vs FREEMAIN to Manage Storage](https://srinimf.com/2016/03/16/4-most-popular-technics-for-managing-storage-with-getmain-and-freemain-in-cics/)

## **Details of CICS READ**

The record is read with a level of read integrity provided by a VSAM shared lock that lasts for the duration of the request.

Related: [2016 HOT IT SKILLS -Apply Today](https://srinimf.com/2015/12/13/the-10-best-it-skills-in-2016/)

### If the record is being modified by another task, which therefore holds an exclusive lock, the READ request waits until the update is complete (unless NOSUSPEND is also specified) as follows:

- For a READ request against a non-recoverable file, the READ completes as soon as any VSAM request performing the update completes.
- For a READ request against a recoverable file, the READ request completes when the updating task completes its next sync point or rollback.

CICS READ Syntax from IBM manual:

```
READ--FILE(filename)--+------------------------------+------->
                         +-UNCOMMITTED------------------+   
                         +-CONSISTENT-------------------+   
                         +-REPEATABLE-------------------+   
                         '-UPDATE--+------------------+-'   
                                   '-TOKEN(data-area)-'     

>--+-INTO(data-area)-+--RIDFLD(data-area)----------------------->
   '-SET(ptr-ref)----'                      

>--+------------------------------------+----------------------->
   '-KEYLENGTH(data-value)--+---------+-'   
                            '-GENERIC-'     

>--+--------------------------------------+--+--------+--------->
   +-SYSID(systemname)--LENGTH(data-area)-+  +-DEBKEY-+   
   '-LENGTH(data-area)--------------------'  +-DEBREC-+   
                                             +-RBA----+   
                                             +-RRN----+   
                                             '-XRBA---'   

   .-EQUAL-.                  
>--+-------+--+-----------+------------------------------------><
   '-GTEQ--'  '-NOSUSPEND-'
```

### 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%2F23%2Fcics-file-read-command-option-consistent%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2021%2F09%2Fpexels-photo-6801651.jpeg%3Ffit%3D1200%252C800%26ssl%3D1&description=CICS%20Files%2C%20What%27s%20CONSISTENT%20Option)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2016/02/23/cics-file-read-command-option-consistent/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2016/02/23/cics-file-read-command-option-consistent/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2016/02/23/cics-file-read-command-option-consistent/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2016/02/23/cics-file-read-command-option-consistent/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20CICS%20Files%2C%20What%27s%20CONSISTENT%20Option&body=https%3A%2F%2Fsrinimf.com%2F2016%2F02%2F23%2Fcics-file-read-command-option-consistent%2F&share=email)
-

### Like this:

Like Loading…
