COBOL Module 2 – Data definitions: PICTURE, levels, MOVE rules and edited output
Condition names (88), REDEFINES and RENAMES
Name the values of a COBOL item with level-88 condition names, set them with SET, lay record layouts over one area with REDEFINES, and read RENAMES.
What you will learn
- Name values, value lists and ranges of an item with level-88 condition names
- Set and test condition names, including SET ... TO FALSE
- Describe variant record layouts with REDEFINES and a record-type byte
- Recognise level-66 RENAMES entries in old copybooks and say which bytes each one names
Before you start
What you’ll learn · Before you start
What you will learn
- Name values, value lists and ranges of an item with level-88 condition names
- Set and test condition names, including SET ... TO FALSE
- Describe variant record layouts with REDEFINES and a record-type byte
- Recognise level-66 RENAMES entries in old copybooks and say which bytes each one names
Before you start
On this page
An account status byte holds A, D, C or W, and the test IF ACCT-STATUS = “A” OR ACCT-STATUS = “D” means “open” in forty places of a program, until a new code arrives and someone has to find all forty. A level-88 condition name gives that test one name, written once, next to the data it tests.
Below you will name single values, lists and ranges with condition names and test them, set them with SET … TO TRUE and TO FALSE, lay three record layouts over one area with REDEFINES and choose among them by a type byte, and read the level-66 RENAMES entries that old copybooks still carry.
A condition name stands for values of the item above it
A condition name: A level-88 entry that names a value, a list of values or a THRU range of the item above it, so that IF ACCT-OPEN tests that item against them. is a level-88 entry under a data item, its conditional variable: The data item a level-88 condition name belongs to: the item whose value the condition tests and SET ... TO TRUE changes.. Its VALUE clause lists the values it stands for: one value, several, or a range written with THRU. IBM’s reference calls a condition name “an abbreviation for the relation condition”, and the condition is true when the variable equals one of its values or “falls within the ranges, including the end values”. This program names the codes of an account status and the buckets of days past due:
IDENTIFICATION DIVISION.
PROGRAM-ID. STATUS88.
* Condition names for an account status code and for days past
* due: single values, lists and THRU ranges.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 ACCT-STATUS PIC X.
88 ACCT-OPEN VALUE "A" "D".
88 ACCT-CLOSED VALUE "C" "W".
88 ACCT-VALID VALUE "A" "C" "D" "W".
01 DAYS-PAST-DUE PIC 9(3).
88 DPD-NONE VALUE 0.
88 DPD-UP-TO-30 VALUE 1 THRU 30.
88 DPD-31-TO-90 VALUE 31 THRU 90.
88 DPD-OVER-90 VALUE 91 THRU 999.
PROCEDURE DIVISION.
MOVE "D" TO ACCT-STATUS
PERFORM SHOW-STATUS
MOVE "W" TO ACCT-STATUS
PERFORM SHOW-STATUS
MOVE "Q" TO ACCT-STATUS
PERFORM SHOW-STATUS
MOVE 0 TO DAYS-PAST-DUE
PERFORM SHOW-BUCKET
MOVE 17 TO DAYS-PAST-DUE
PERFORM SHOW-BUCKET
MOVE 90 TO DAYS-PAST-DUE
PERFORM SHOW-BUCKET
MOVE 120 TO DAYS-PAST-DUE
PERFORM SHOW-BUCKET
STOP RUN.
SHOW-STATUS.
IF NOT ACCT-VALID
DISPLAY "status " ACCT-STATUS ": not a valid code"
ELSE
IF ACCT-OPEN
DISPLAY "status " ACCT-STATUS ": open"
ELSE
DISPLAY "status " ACCT-STATUS ": closed"
END-IF
END-IF.
SHOW-BUCKET.
EVALUATE TRUE
WHEN DPD-NONE
DISPLAY DAYS-PAST-DUE " days: no dues"
WHEN DPD-UP-TO-30
DISPLAY DAYS-PAST-DUE " days: 1 to 30"
WHEN DPD-31-TO-90
DISPLAY DAYS-PAST-DUE " days: 31 to 90"
WHEN DPD-OVER-90
DISPLAY DAYS-PAST-DUE " days: over 90"
END-EVALUATE. from session import files, run
# Condition names in IF and EVALUATE: a status code against its lists, and days past due against THRU ranges.
files("status88.cob")
run("""
cobc -x status88.cob && ./status88
""") Output
$ cobc -x status88.cob && ./status88 status D: open status W: closed status Q: not a valid code 000 days: no dues 017 days: 1 to 30 090 days: 31 to 90 120 days: over 90
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 status88_session.py
Each test reads as what it means. IF NOT ACCT-VALID caught Q, a code that none of A, C, D and W matches, before IF ACCT-OPEN decided between open and closed for D and W. EVALUATE TRUE, a statement of the control-flow lessons, picks the first WHEN whose condition is true, and the four condition names put 0, 17, 90 and 120 days into their buckets; 90 counted as 31 to 90 because a range includes its end values.
| Condition name | Its VALUE clause | It replaces the test |
|---|---|---|
| ACCT-OPEN | "A" "D" |
ACCT-STATUS = "A" OR ACCT-STATUS = "D" |
| ACCT-CLOSED | "C" "W" |
ACCT-STATUS = "C" OR ACCT-STATUS = "W" |
| DPD-UP-TO-30 | 1 THRU 30 |
DAYS-PAST-DUE >= 1 AND DAYS-PAST-DUE <= 30 |
| DPD-OVER-90 | 91 THRU 999 |
DAYS-PAST-DUE >= 91 AND DAYS-PAST-DUE <= 999 |
When a new code arrives, say P for an account waiting to be closed, it goes into the VALUE clause of each condition name it belongs to, and every IF ACCT-CLOSED in the program follows without a change.
Testing the codes themselves
Wrong: IF ACCT-STATUS = “A” OR ACCT-STATUS = “D” wherever the program asks whether an account is open, so a new code means a search through every program. Right: one 88-level name per meaning, ACCT-OPEN, and IF ACCT-OPEN everywhere.
SET stores a value of the condition name, and FALSE needs its own
A condition name can also be set. SET ACCT-CLOSED TO TRUE stores a value of ACCT-CLOSED in ACCT-STATUS; with a list there is a choice, and IBM’s rule is that the variable “is set equal to the first literal”. Setting one false needs a value for false, and IBM requires a WHEN SET TO FALSE phrase on the 88-level entry for it. This program sets an account status and an end-of-file flag, and a second program sets a condition name false that has no such phrase:
IDENTIFICATION DIVISION.
PROGRAM-ID. SETFLAGS.
* SET ... TO TRUE stores a value of the condition name; SET ...
* TO FALSE stores the value of its WHEN SET TO FALSE phrase.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 ACCT-STATUS PIC X VALUE "A".
88 ACCT-OPEN VALUE "A" "D".
88 ACCT-CLOSED VALUE "C" "W".
01 EOF-FLAG PIC X VALUE "N".
88 END-OF-FILE VALUE "Y" WHEN SET TO FALSE "N".
PROCEDURE DIVISION.
DISPLAY "ACCT-STATUS starts as " ACCT-STATUS
SET ACCT-CLOSED TO TRUE
DISPLAY "after SET ACCT-CLOSED TRUE " ACCT-STATUS
SET ACCT-OPEN TO TRUE
DISPLAY "after SET ACCT-OPEN TRUE " ACCT-STATUS
SET END-OF-FILE TO TRUE
DISPLAY "after SET END-OF-FILE TRUE " EOF-FLAG
SET END-OF-FILE TO FALSE
DISPLAY "after SET END-OF-FILE FALSE " EOF-FLAG
STOP RUN. from session import files, run
# What SET ... TO TRUE and SET ... TO FALSE store, and SET ... TO FALSE where no false value is given.
files("setflags.cob", "setfalse.cob")
run("""
cobc -x setflags.cob && ./setflags
!cobc -x setfalse.cob
""") Output
$ cobc -x setflags.cob && ./setflags
ACCT-STATUS starts as A
after SET ACCT-CLOSED TRUE C
after SET ACCT-OPEN TRUE A
after SET END-OF-FILE TRUE Y
after SET END-OF-FILE FALSE N
$ cobc -x setfalse.cob
setfalse.cob:9: error: field does not have a FALSE clause
7 | 88 ACCT-CLOSED VALUE "C" "W".
8 | PROCEDURE DIVISION.
9 > SET ACCT-CLOSED TO FALSE
10 | DISPLAY ACCT-STATUS
11 | STOP RUN.
[exit status 1]
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 setflags_session.py
Each SET left one byte behind. Step through them in order:
The drawing shows the whole scene; its 5 steps are listed below.
Every step as text
- The starting value. ACCT-STATUS starts with its VALUE, A, so ACCT-OPEN is true, because A is one of its values A and D.
- SET to a list. ACCT-CLOSED has two values, C and W. SET ACCT-CLOSED TO TRUE has to store one of them, and IBM's rule is the first literal, so ACCT-STATUS becomes C.
- SET back to open. SET ACCT-OPEN TO TRUE stores A, the first of A and D. The code says what it means, the account is open, and the 88-level entry decides which byte that is.
- A flag set true. END-OF-FILE has one value, Y, so SET END-OF-FILE TO TRUE stores Y in EOF-FLAG.
- A flag set false. SET END-OF-FILE TO FALSE works because the entry says WHEN SET TO FALSE "N", and N is stored. ACCT-CLOSED has no such phrase, so setfalse.cob, which sets it false, did not compile.
SET ACCT-CLOSED TO TRUE stored C, not W, and SET ACCT-OPEN TO TRUE stored A, not D: the first value is always the one stored, so put the most usual code first. END-OF-FILE became Y and then N, the value its WHEN SET TO FALSE phrase names. setfalse.cob did not compile, field does not have a FALSE clause, because nothing tells the compiler which byte false should store: any value but C and W would make ACCT-CLOSED false.
Key idea
Set flags with SET … TO TRUE rather than MOVE, so the code names the meaning and the 88-level entry decides the byte, and give every condition name that is ever set false a WHEN SET TO FALSE value.
Checkpoint
Check: Condition names, lists and ranges · SET ... TO TRUE and TO FALSE
REDEFINES lays several layouts over the same bytes
A file often holds records of several kinds in one layout of bytes: a header, details and a trailer, told apart by a type byte at the front. The REDEFINES: A clause that describes the storage of an earlier item a second way, so the same bytes can be read as different fields. Nothing checks which description fits the data. clause describes the same storage a second and a third time; IBM’s reference says it lets “different data description entries … describe the same computer storage area”. Here a 19-byte body is described as a header, as a detail and as a trailer, and condition names on the type byte choose which description to read:
IDENTIFICATION DIVISION.
PROGRAM-ID. RECORDS1.
* One 20-byte record area, three layouts over the same bytes,
* chosen by the record-type byte.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 TXN-REC.
05 REC-TYPE PIC X.
88 IS-HEADER VALUE "H".
88 IS-DETAIL VALUE "D".
88 IS-TRAILER VALUE "T".
05 REC-BODY PIC X(19).
05 HEADER-BODY REDEFINES REC-BODY.
10 BRANCH-CODE PIC X(4).
10 BATCH-NO PIC 9(6).
10 FILLER PIC X(9).
05 DETAIL-BODY REDEFINES REC-BODY.
10 ACCT-NO PIC X(6).
10 DR-CR PIC X.
10 AMOUNT PIC 9(7)V99.
10 FILLER PIC X(3).
05 TRAILER-BODY REDEFINES REC-BODY.
10 REC-COUNT PIC 9(5).
10 TOTAL-AMT PIC 9(9)V99.
10 FILLER PIC X(3).
PROCEDURE DIVISION.
MOVE "H0042000117" TO TXN-REC
PERFORM SHOW-RECORD
MOVE "DAC0417D000250000" TO TXN-REC
PERFORM SHOW-RECORD
MOVE "DAC0532C000012550" TO TXN-REC
PERFORM SHOW-RECORD
MOVE "T0000200000262550" TO TXN-REC
PERFORM SHOW-RECORD
MOVE "Q1234" TO TXN-REC
PERFORM SHOW-RECORD
MOVE "H0042000117" TO TXN-REC
DISPLAY "the header read through DETAIL-BODY:"
DISPLAY " ACCT-NO [" ACCT-NO "] DR-CR [" DR-CR
"] AMOUNT [" AMOUNT "]"
STOP RUN.
SHOW-RECORD.
EVALUATE TRUE
WHEN IS-HEADER
DISPLAY "header branch " BRANCH-CODE
", batch " BATCH-NO
WHEN IS-DETAIL
DISPLAY "detail " ACCT-NO " " DR-CR " " AMOUNT
WHEN IS-TRAILER
DISPLAY "trailer " REC-COUNT " records, total "
TOTAL-AMT
WHEN OTHER
DISPLAY "rejected record type [" REC-TYPE "]"
END-EVALUATE. from session import files, run
# Three layouts over one record area, picked by the record-type byte, and a header read through the detail layout.
files("records.cob")
run("""
cobc -x records.cob && ./records
""") Output
$ cobc -x records.cob && ./records header branch 0042, batch 000117 detail AC0417 D 0002500.00 detail AC0532 C 0000125.50 trailer 00002 records, total 000002625.50 rejected record type [Q] the header read through DETAIL-BODY: ACCT-NO [004200] DR-CR [0] AMOUNT [117 .00]
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 records_session.py
The program read each record through the layout its type byte named, rejected the type Q, and the trailer’s total, 2625.50, matched its two details. Step through the records and the layout each one chose:
The drawing shows the whole scene; its 7 steps are listed below.
Every step as text
- The record area. TXN-REC is 20 bytes, a type byte and a 19-byte body. HEADER-BODY, DETAIL-BODY and TRAILER-BODY each REDEFINE the body, so all three describe the same 19 bytes.
- A header. The first record starts with H, so IS-HEADER is true and the program reads the body as HEADER-BODY, branch 0042 and batch 000117.
- A debit. The next record starts with D, so the body is read as DETAIL-BODY, account AC0417, D for a debit and 0002500.00.
- A credit. Another D record, read the same way, account AC0532, C for a credit, 0000125.50. The same 19 bytes now hold a different account.
- The trailer. T picks TRAILER-BODY, 00002 records and a total of 000002625.50, which is 2500.00 + 125.50, the two details.
- An unknown type. The fifth record starts with Q, which no condition name of REC-TYPE names, so WHEN OTHER rejects it instead of reading it through any layout.
- The wrong layout. Read through DETAIL-BODY, the header gives ACCT-NO 004200 and an AMOUNT made of 117 and spaces. The bytes are the header's; nothing checks which layout they belong to, and no error comes.
The last lines show what REDEFINES does not do. Read through DETAIL-BODY, the header gave ACCT-NO 004200 and an AMOUNT made of the digits 117 and spaces, and no error came: the bytes do not know which layout wrote them. A REDEFINES is only as safe as the test of the type byte in front of it. IBM also bars VALUE clauses from a redefining entry and everything under it, so a layout over shared bytes never starts with values of its own.
A layout larger than the area it redefines
IBM’s reference lets the redefining item “occupy more storage than the redefined item”. GnuCOBOL 3.2 refuses that below level 01 by default, and accepts it with a warning under -std=ibm, so a copybook that compiles on z/OS can fail here. The session below shows both.
IDENTIFICATION DIVISION.
PROGRAM-ID. LARGER.
* A layout one byte longer than the area it redefines.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 TXN-REC.
05 REC-TYPE PIC X.
05 REC-BODY PIC X(19).
05 DETAIL-BODY REDEFINES REC-BODY.
10 ACCT-NO PIC X(6).
10 DR-CR PIC X.
10 AMOUNT PIC 9(9)V99.
10 FILLER PIC X(2).
PROCEDURE DIVISION.
DISPLAY FUNCTION BYTE-LENGTH(DETAIL-BODY)
STOP RUN. from session import files, run
# A redefining layout larger than the item it redefines: GnuCOBOL's default dialect, then its IBM dialect.
files("larger.cob")
run("""
!cobc -x larger.cob
cobc -x -std=ibm larger.cob 2>&1 | grep 'larger.cob' && ./larger
""") Output
$ cobc -x larger.cob
larger.cob:9: error: larger REDEFINES used
7 | 05 REC-TYPE PIC X.
8 | 05 REC-BODY PIC X(19).
9 > 05 DETAIL-BODY REDEFINES REC-BODY.
10 | 10 ACCT-NO PIC X(6).
11 | 10 DR-CR PIC X.
larger.cob:9: note: size of 'DETAIL-BODY' larger than size of 'REC-BODY' [-Wdialect]
[exit status 1]
$ cobc -x -std=ibm larger.cob 2>&1 | grep 'larger.cob' && ./larger
larger.cob:9: warning: larger REDEFINES used [-Wdialect]
larger.cob:9: note: size of 'DETAIL-BODY' larger than size of 'REC-BODY' [-Wdialect]
20
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 larger_session.py
The default build stopped with larger REDEFINES used; the -std=ibm build warned and ran, and BYTE-LENGTH reported 20 bytes for a layout over 19. GnuCOBOL’s NEWS for 3.2 adds -Wlarger-01-redefines for the one larger REDEFINES the standard itself allows, at level 01.
Key idea
REDEFINES gives the same bytes several layouts, and nothing checks which one fits: test the type byte with a condition name before you read any of them.
RENAMES gives a run of items another name
Old copybooks sometimes end a record with level-66 entries. A RENAMES: A level-66 entry that gives a new name to one elementary item or to a run of consecutive items of a record. It is written after the record's last entry. entry names one elementary item again, or a run of consecutive items with THRU, without changing the record: IBM’s reference calls these “alternative and possibly overlapping groupings of elementary data items”. The entries “must immediately follow the last data description entry” of their record, and they may not rename an 01, 77, 88 or 66 entry. Here an address record gets a name for its first two items together:
IDENTIFICATION DIVISION.
PROGRAM-ID. RENAMES1.
* Level 66: new names for one item and for a run of items.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 ADDR-REC.
05 HOUSE-NO PIC X(6) VALUE "12-B".
05 STREET PIC X(12) VALUE "MG ROAD".
05 CITY PIC X(10) VALUE "PUNE".
05 POST-CODE PIC X(6) VALUE "411001".
66 STREET-LINE RENAMES HOUSE-NO THRU STREET.
66 TOWN RENAMES CITY.
PROCEDURE DIVISION.
DISPLAY "STREET-LINE [" STREET-LINE "] "
FUNCTION BYTE-LENGTH(STREET-LINE) " bytes"
DISPLAY "TOWN [" TOWN "]"
MOVE SPACES TO STREET-LINE
DISPLAY "ADDR-REC [" ADDR-REC "]"
STOP RUN. from session import files, run
# Level-66 names over an address record, and a MOVE through one of them.
files("renames.cob")
run("""
cobc -x renames.cob && ./renames
""") Output
$ cobc -x renames.cob && ./renames STREET-LINE [12-B MG ROAD ] 18 bytes TOWN [PUNE ] ADDR-REC [ PUNE 411001]
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 renames_session.py
| Level-66 name | Renames | Bytes of ADDR-REC |
|---|---|---|
| STREET-LINE | HOUSE-NO THRU STREET | 1-18, 18 bytes |
| TOWN | CITY | 19-28, 10 bytes |
STREET-LINE is 18 bytes, the 6 of HOUSE-NO and the 12 of STREET, and it behaves like a group of the two: MOVE SPACES TO STREET-LINE cleared both and left CITY and POST-CODE alone. New code gets the same effect by making the two items a group with a level number of its own. RENAMES is worth recognising for the day a shared copybook cannot change its layout and a program still needs a name for part of it.
Checkpoint
Check: REDEFINES and the record-type byte · Level-66 RENAMES
Practise: read the conditions and the layouts
Each question below names a condition, a SET or a layout from this lesson’s programs. Answer from the code, then compare with what the run printed; each choice explains where a wrong reading goes astray:
Practice that adapts to you
Practise this lesson
12 questions about 4 ideas of this lesson. Each answer is explained at once, and what you get right is kept in this browser.
Add a record type
Add a layout to records.cob for a type R, a reversal, with an account number and an amount, and a condition name
IS-REVERSAL on REC-TYPE. Add a WHEN for it, move a record such as RAC0417000025000 into TXN-REC, and build it with
cobc -x records.cob && ./records: the Q record must still be rejected.
Interview questions
Warm-up (fresher to 2–5 years): what is a level-88 condition name, and what does SET … TO TRUE store?
A condition name is a level-88 entry that gives a name to one value, a list of values or a THRU range of the data item above it, so IF ACCT-OPEN means that ACCT-STATUS holds one of the values of ACCT-OPEN. It makes a test read as its meaning and keeps the codes in one place, so a new code is added to one VALUE clause instead of every IF. SET ACCT-OPEN TO TRUE stores a value in the variable, and when the condition name lists several values it stores the first one: ACCT-OPEN with VALUE “A” “D” stores A. SET … TO FALSE needs a WHEN SET TO FALSE phrase on the 88-level entry, which names the value to store; without it, GnuCOBOL refused the program with field does not have a FALSE clause.
Two questions apply these ideas to batch work: totals that drift without an error, and a status code that many programs test. Decide your first move before you read each first step:
Model answers open with any pass: ₹79 for 1 week ($2.99), one payment that never renews.
-
Mid to senior
A batch program reads a file of header, detail and trailer records through REDEFINES. Its control totals no longer match the trailer, yet no record is rejected and nothing fails. How do you find the cause, and how do you make the program fail loudly next time?
-
Mid to senior
A new account status, F for frozen, must count as open in most checks but block withdrawals. The status field is tested in 40 programs. How do condition names help, what can still go wrong, and how do you roll the change out?
Organisations named on this page
This page is MySmartCoPilot’s own and has no connection with IBM or the GnuCOBOL project. It quotes IBM’s Language Reference on condition names, REDEFINES and RENAMES, and shows what GnuCOBOL 3.2 printed.
Flashcards · 8 cards
Recall it, then check
Say the answer to yourself before you look: recalling it is what makes it stick.
-
What is a level-88 condition name?
An entry under a data item that names one of its values, a list of them or a THRU range. IF ACCT-OPEN is true when ACCT-STATUS holds any value listed for ACCT-OPEN.
-
Does a THRU range of a condition name include its end values?
Yes. With VALUE 31 THRU 90, a count of exactly 90 makes the condition true.
-
ACCT-OPEN has VALUE "A" "D". What does SET ACCT-OPEN TO TRUE store?
A, the first value listed. Put the most usual code first.
-
Why might SET END-OF-FILE TO FALSE fail to compile?
Setting a condition name false needs a WHEN SET TO FALSE phrase on its 88-level entry to name the value to store. Without one, GnuCOBOL refuses with "field does not have a FALSE clause".
-
What does REDEFINES do?
It describes the same storage again with another layout, such as a header, a detail and a trailer view of one record body. A redefining entry and everything under it may have no VALUE clause.
-
What happens when a record is read through the wrong REDEFINES layout?
Nothing warns you: the bytes do not know which layout wrote them, so the fields simply hold wrong data. Test the type byte, best with a condition name, before reading any layout.
-
Does GnuCOBOL accept a REDEFINES larger than the area it redefines?
Not below level 01 in its default dialect, which stops with "larger REDEFINES used". Under -std=ibm it warns and compiles, as IBM's compiler allows it.
-
What is a level-66 RENAMES entry?
Another name for one elementary item, or for a run of consecutive items with THRU, written after the last entry of its record. STREET-LINE RENAMES HOUSE-NO THRU STREET behaves like a group of the two.
Key takeaways
- A level-88 condition name stands for one value, a list or a THRU range of its variable, ends included, so IF ACCT-OPEN replaces the comparisons with A and D and a new code changes one VALUE clause.
- SET … TO TRUE stores the first value of a condition name, C for ACCT-CLOSED, and SET … TO FALSE stores the value of its WHEN SET TO FALSE phrase, which must be there.
- REDEFINES describes the same bytes several ways, with a type byte to choose the layout; a record read through the wrong layout gives wrong data without an error.
- GnuCOBOL refuses a REDEFINES larger than its area below level 01 by default, while IBM’s compiler allows it.
- A level-66 RENAMES entry names an item, or a run of items with THRU, after the record’s last entry, as STREET-LINE named HOUSE-NO and STREET.
Terms in this lesson
- condition name
- A level-88 entry that names a value, a list of values or a THRU range of the item above it, so that IF ACCT-OPEN tests that item against them.
- conditional variable
- The data item a level-88 condition name belongs to: the item whose value the condition tests and SET ... TO TRUE changes.
- REDEFINES
- A clause that describes the storage of an earlier item a second way, so the same bytes can be read as different fields. Nothing checks which description fits the data.
- RENAMES
- A level-66 entry that gives a new name to one elementary item or to a run of consecutive items of a record. It is written after the record's last entry.
References
- Enterprise COBOL for z/OS 6.5: Condition-name condition (IBM)
- Enterprise COBOL for z/OS 6.5: Condition-name (IBM)
- Enterprise COBOL for z/OS 6.5: SET statement, format 4 (condition-names) (IBM)
- Enterprise COBOL for z/OS 6.5: REDEFINES clause (IBM)
- Enterprise COBOL for z/OS 6.5: RENAMES clause (IBM)
- Enterprise COBOL for z/OS 6.5: INITIALIZE statement rules (IBM)
- GnuCOBOL 3.2 NEWS (GnuCOBOL project (GNU))
Report a problem with this lesson
Kept only in this browser. Your Learn progress