In a COBOL program, you need to store data related to multiple sales transactions, each having various attributes. How would you define a suitable data structure for this scenario?
- Defining individual variables for each attribute of a sales transaction
- Employing nested records to capture various attributes within each sales transaction
- Using an array or table structure with OCCURS clause to represent multiple sales transactions
- Utilizing REDEFINES clause to optimize storage for sales transaction data
Using an array or table structure with the OCCURS clause is suitable for handling multiple sales transactions, providing a systematic way to organize and process the data.
Loading...
Related Quiz
- What are the primary considerations when handling duplicate records in VSAM or ISAM files in COBOL?
- Explain the purpose of the PREPARE statement in COBOL when dealing with dynamic SQL.
- In COBOL, what is the purpose of the "ENVIRONMENT DIVISION"?
- Which data types can the OCCURS clause be applied to in COBOL?
- In Object-Oriented COBOL, what is method overloading, and how is it useful?