COBOL Usage is Display and How it Works

Yes, why I want to discuss this point is Cobol is procedural language, compared to OO languages like Java, there are some challenges.

scenario_1:

01 Header-1.

   05 Field-1   PIC X(50) Usage is display.

Even though, usage is optional, the space 50 bytes are allocated, even if we get smaller string into Field-1(suppose 20 bytes). However, COBOL has features INSPECT, STRING, UNSTRING to do string manipulations.

scenario_2:

Fixed Files:

The file structure is already defined. The same file is used by multi interfaces.However, if we want add an e-mail address field,we need to change file structure, similarly othere interfaces have to make adjustment,it is laborous.

In my next post I will add some more scenarios.

Related

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.