bdfp1m0q | Programming Concepts and Reference |
If you specify the KEYn parameters on a macro, you must also specify the organization, if there is any, in one of the following ways:
If you specify an M or D subparameter with a KEYn parameter on the macro, that key and all subsequent keys will have an organization of NOORG.
In addition, you must specify an organization of NOORG for any key that uses the M or D subparameter with the KEYn parameter.
If you do not want to assign any organization to the keys, it is possible to have no organization parameters at all.
If the organization is not specified according to these rules, the TPFDF product issues one or more assembly messages (called MNOTEs). If an MNOTE is issued, the code is generated based on the following rules:
Exceptions:
Migration Note |
---|
Any applications that do not currently follow the rules for specifying the organization for keys do not have to be changed until they are reassembled. In addition, you can control the severity of the MNOTEs that are issued when the rules are not followed. We strongly recommend that you use the default severity of 8; however, if you are confident that your applications are working as designed without following the organization rules, you can choose to ignore the following MNOTEs (where n represents the key number): KEYn ORG NOT ALLOWED IF GENERAL ORG GIVEN KEYn REQUIRES ORG IF NO GENERAL ORG GIVEN KEYn HAS ORG, BUT NO KEY1 ORG OR GENERAL ORG UP/DOWN ON KEYn NOT ALLOWED AFTER PREVIOUS NOORG - NOORG ASSUMED The severity is controlled with the &KMNVAL variable in the DBLCL macro. See TPFDF Installation and Customization for more information about the DBLCL macro and associated variables. |
In addition, the TPFDF product issues an informational MNOTE at the end of the macro expansion that summarizes the defined key organization.
The following are examples of macros that are coded by following these key organization rules. The examples also show the resulting MNOTEs.
+-----------------------------Correct Example 1------------------------------+
DBRED REF=GR95SR,REG=R5,DOWN, KEY1=(PKY=#GR95K80), KEY2=(R=#GR95SEX,S=EBX004), KEY3=(R=#GR95AGE,S=EBX008) Result: *,KEY1 - KEY3 DEFINED: K1-DW K2-DW K3-DW
+--------------------------End of Correct Example 1--------------------------+
+-----------------------------Correct Example 2------------------------------+
DBRED REF=GR95SR,REG=R5, KEY1=(PKY=#GR95K80,UP), KEY2=(R=#GR95SEX,S=EBX004,DOWN), KEY3=(R=#GR95AGE,S=EBX008,NOORG) Result: *,KEY1 - KEY3 DEFINED: K1-UP K2-DW K3-NO
+--------------------------End of Correct Example 2--------------------------+
+-----------------------------Correct Example 3------------------------------+
DBRED REF=GR95SR,REG=R5, KEY1=(PKY=#GR95K80,DOWN), KEY2=(R=#GR95SEX,M=X'80',C=Z,NOORG), KEY3=(R=#GR95AGE,S=EBX008,NOORG) Result: *,KEY2 TM: NOORG ASSUMED FOR THIS AND FOLLOWING KEYS *,KEY1 - KEY3 DEFINED: K1-DW K2-NO K3-NO
+--------------------------End of Correct Example 3--------------------------+
The following are examples of macros that are coded without following the organization rules. The examples also show the resulting MNOTEs.
+----------------------------Incorrect Example 1-----------------------------+
DBRED REF=GR95SR,REG=R5,DOWN, KEY1=(PKY=#GR95K80,UP), KEY2=(R=#GR95SEX,S=EBX004), KEY3=(R=#GR95AGE,S=EBX008,NOORG) Result: 8,KEY1 ORG NOT ALLOWED IF GENERAL ORG GIVEN 8,KEY3 ORG NOT ALLOWED IF GENERAL ORG GIVEN *,KEY1 - KEY3 DEFINED: K1-UP K2-UP K3-NO
+-------------------------End of Incorrect Example 1-------------------------+
+----------------------------Incorrect Example 2-----------------------------+
DBRED REF=GR95SR,REG=R5, KEY1=(PKY=#GR95K80,UP), KEY2=(R=#GR95SEX,S=EBX004), KEY3=(R=#GR95AGE,S=EBX008,DOWN) Result: 8,KEY2 REQUIRES ORG IF NO GENERAL ORG GIVEN *,KEY1 - KEY3 DEFINED: K1-UP K2-UP K3-DW
+-------------------------End of Incorrect Example 2-------------------------+
+----------------------------Incorrect Example 3-----------------------------+
DBRED REF=GR95SR,REG=R5, KEY1=(PKY=#GR95K80,UP), KEY2=(R=#GR95SEX,M=X'80'), KEY3=(R=#GR95AGE,S=EBX008,DOWN) Result: 8,KEY2 REQUIRES ORG IF NO GENERAL ORG GIVEN *,KEY2 TM: NOORG ASSUMED FOR THIS AND FOLLOWING KEYS 8,UP/DOWN ON KEY3 NOT ALLOWED AFTER PREVIOUS NOORG *,KEY1 - KEY3 DEFINED: K1-UP K2-NO K3-NO
+-------------------------End of Incorrect Example 3-------------------------+