From the course: COBOL Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

How to define types of data

How to define types of data - COBOL Tutorial

From the course: COBOL Essential Training

Start my 1-month free trial

How to define types of data

- [Instructor] In COBOL, variables are defined with a level number, such as 01, 05, 10, et cetera. a data name, such as WS item one, a picture clause, such as PIC 999, and an optional value clause, such as value spaces. To start a new data name, you must specify the level number, which represents the hierarchy of data within a record, and identifies any special purpose data entries. This is usually 01 for the field description entry, and group level items. 02-49 represent elementary items. Level 66 is reserved for the rename clause, which identifies an alternative grouping of data items. 77 is for items that cannot be subdivided. And we'll see a lot of level 88, which is used for condition name entries. We'll see additional examples of all of these throughout the course. Let's take a look at some data fields in our program. To talk about data types in COBOL, I've decided to use another program I created called…

Contents