Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


National groups

National groups, which are specified either explicitly or implicitly with the GROUP-USAGE NATIONAL clause, contain only data items that have USAGE NATIONAL. In most cases, a national group item is processed as though it were redefined as an elementary category national item described as PIC N(m), where m is the number of national (UTF-16) characters in the group.

For some operations on national groups, however (just as for some operations on alphanumeric groups), group semantics apply. Such operations (for example, MOVE CORRESPONDING and INITIALIZE) recognize or process the elementary items within the national group.

Where possible, use national groups instead of alphanumeric groups that contain USAGE NATIONAL items. National groups provide several advantages for the processing of national data compared to the processing of national data within alphanumeric groups:

USAGE NATIONAL groups: A group item can specify the USAGE NATIONAL clause at the group level as a convenient shorthand for the USAGE of each of the elementary data items within the group. Such a group is not a national group, however, but an alphanumeric group, and behaves in many operations, such as moves and compares, like an elementary data item of USAGE DISPLAY (except that no editing or conversion of data occurs).

related tasks  
Assigning values to group data items (MOVE)  
Joining data items (STRING)  
Splitting data items (UNSTRING)  
Tallying and replacing data items (INSPECT)  
Using national groups

related references  
GROUP-USAGE clause (Enterprise COBOL Language Reference)


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)