Use to identify synonyms and nonunique file or record names
Use the grouping statement to identify synonymous and nonunique file or record names to the DDDL Generator:
The statement shown below illustrates grouping for two file names that refer to the same file: FILE-A names the file in PROG-1 and PROG-2, and FILE-B names the file in PROG-3.
FILE-GROUPING FILE-A IN PROG-1 IN PROG-2 FILE-B IN PROG-3
Assuming the the data usage files are input in the order PROG-1, PROG-2, and PROG-3, the DDDL Generator generates the following statements:
(Under PROG-1) ADD FILE FILE-A FILE NAME SYNONYM IS FILE-B (Under PROG-2) (No statements) (Under PROG-3) ADD FILE FILE-B FILE NAME SYNONYM IS FILE-A
Because a single name cannot be both the primary entity-occurrence name and a synonym, these statements must be edited to designate one name as the primary name and the other name for the file as a synonym For a complete discussion of synonym usage, see IDD User Guide.
The statements shown below illustrate file grouping for the name FILE-A, where FILE-A refers to one file in PROG-1 and PROG-2, and to another file in PROG-3 and PROG-4:
FILE-GROUPING FILE-A IN PROG-1 IN PROG-2 FILE-GROUPING FILE-A IN PROG-3 IN PROG4
Assuming that the data usage files are input in the order PROG-1 though PROG4, the DDDL Generator generates the statements shown below:
(Under PROG-1) ADD FILE FILE-A (Under PROG-2) (No statements) (Under PROG-3) ADD FILE FILE-A (Under PROG-4) (No statements)
The two generated ADD FILE FILE-A statements can then be edited to establish different version numbers or to assign a different name to one of the files.
Note that multiple IN clauses cause the DDDL Generator to generate an ADD statement for the first occurrence of the entity description for each group. For a given name, one use of the name can be processed without grouping statement; to obtain an ADD statement for each distinct IDD entity description, each additional use must be defined by a separate grouping statement.
If grouping statements are omitted, an ADD statement is generated for the first occurrence of a file name or record name. If the file name or record name appears again, no statement is generated; subsequent occurrences of the name are considered to be duplicates.
Example 1
Five programs (PROG-1, PROG-2, PROG-3, PROG-4, PROG-5) are being processed. All five programs access files named MASTER. The name MASTER refers to one file for PROG-1 and PROG-2, to a second files for PROG-3 and PROG-4, and to a third file for PROG-5. The following grouping statements ensure that ADD statements will be generated for each of the three unique files:
FILE-GROUPING MASTER IN PROG-1 IN PROG-2 FILE-GROUPING MASTER IN PROG-3 IN PROG-4
Note that PROG-5 in not mentioned in these statements; when the DDDL Generator encounters the file name MASTER in PROG-5, it will treat the file as one of the group of all unqualified (that is, not explicitly mentioned in a grouping statement) files named MASTER and automatically generate an ADD statement.
Assuming that the data usage files are input in the order PROG-1 through PROG-5, the DDDL Generator generates the statements shown below. Note that SYNONYM clauses are not generated because all files have the same name.
(Under PROG-1) ADD FILE MASTER...
(Under PROG-2) (No statements) (Under PROG-3) ADD FILE MASTER... (Under PROG-4) (No statements) (Under PROG-5) ADD FILE MASTER...
The three ADD statements that use the file name MASTER can be edited to assure that the three distinct entities are entered into the dictionary. The statement can be distinguished from one another by using different version numbers or by changing the name MASTER for two of the three files.
Example 2
The file name SUM-FILE is used in five programs, PROG-1 through PROG-5. The name SUM-FILE refers to the same file in all five programs but the record description for the file is different in PROG-5. The following grouping statement makes the distinction:
FILE-GROUPING SUM-FILE IN PROG-5
Assuming that the data usage files are input in the order PROG-1 through PROG-5, the DDDL Generator generates the statements shown below:
(Under PROG-1) ADD FILE SUM-FILE... (Under PROG-2) (No statements) (Under PROG-3) (No statements) (Under PROG-4) (No statements) (Under PROG-5) ADD FILE SUM-FILE...
These statements can then be edited (that is, versions added or file names changed) to assure that both entities will be added to the dictionary.
Example 3
The file names SUM-FILE in PROG-1 and SUMMARY-IN in PROG-2 both refer to the same file. Each file name has its own record descriptions. The following statement expresses the proper grouping:
FILE-GROUPING SUM FILE IN PROG-1 SUMMARY-IN IN PROG-2
Assuming that the data usage files are input in the order PROG-1, PROG-2, the DDDL Generator generates the statements shown below:
(Under PROG-1) ADD FILE SUM-FILE... FILE NAME SYNONYM IS SUMMARY-IN (Under PROG-2) ADD FILE SUMMARY-IN... FILE NAME SYNONYM IS SUM-FILE
Because a single name cannot be both the primary entity-occurrence name and a synonym, these statements must be edited to designate one name as the primary name and all other names for the file as synonyms. For a complete discussion of synonym usage, see IDD User Guide.
Example 4
One file is named differently in four different programs. The file is named ABC in PROG-1, DEF in PROG-2, GHI in PROG-3, and JKL in PROG-4. The following grouping statement describes this situation:
FILE-GROUPING ABC IN PROG-1 DEF IN PROG-2 GHI IN PROG-3 JKL IN PROG-4
Assuming that the data usage files are input in the order PROG-1 through PROG-4, the DDDL Generator generates the following statements:
(Under PROG-1) ADD FILE ABC... FILE NAME SYNONYM IS DEF FILE NAME SYNONYM IS GHI FILE NAME SYNONYM IS JKL. (Under PROG-2) ADD FILE DEF... FILE NAME SYNONYM IS ABC FILE NAME SYNONYM IS GHI FILE NAME SYNONYM IS JKL. (Under PROG-3) ADD FILE GHI... FILE NAME SYNONYM IS ABC FILE NAME SYNONYM IS DEF FILE NAME SYNONYM IS JKL. (Under PROG-4) ADD FILE JKL... FILE NAME SYNONYM IS ABC FILE NAME SYNONYM IS DEF FILE NAME SYNONYM IS GHI.
These statements must be edited to establish one primary name for the file and to designate all other names for the file as synonyms.
Copyright © 2013 CA.
All rights reserved.
|
|