TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

COBOL - Data Division


Data names must be defined in the Data Division before using them in the Procedure Division. They must have a user-defined name. reserved words cannot be used. Data names give reference to the memory locations where actual data is stored. They can be elementary or group type.

Example:

The following example shows valid and invalid data names −
  1. Valid Name
    • WS-FIRST-NAME

    • COUNT

    • B1000

    • 1000B


  2. Invalid Name
    • MOVE (Reserved Word)

    • ADD (Reserved Word)

    • 100 (No Alphabet)

    • 100+B (+ is not allowed)


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal