Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Data structures, clauses

The national data format can also be specified explicitly as NATIONAL for the PICTURE clause in the USAGE clause.

National data may also be grouped to form data structures. Here it must be taken into account that group items in COBOL always have the class alphanumeric. As a result a group item is treated like an alphanumeric data item even if it only contains elementary national items, e.g. when filling with blanks. The GROUP-USAGE NATIONAL clause causes a group item to be treated like a national data item.

Example 12-12

01 alfanum-structure.
  02 nat1 PIC N(10).
  02 nat2 PIC N(10).
01 national-structure GROUP-USAGE NATIONAL.
  02 nat1 PIC N(10).
  02 nat2 PIC N(10).

The first data structure is always alphanumeric. If a shorter sending item is moved there, alphanumeric blanks (X'40') are appended, which are not meaningful in national data items. The second data structure, on the other hand, is national because of the additional clause. National blanks (X'0020') would be appended.