Multi-Stage Distrib by JEID - GLJERJDX
GLJERJDX is a two-stage RJE process iterating by primary reference. This mask allows users to gather a number of primary references (TRNS.REF) and run an RJE once for each primary reference. It asks for 2 RJE's. The first RJE gathers the primary references and other detail. The second RJE is to be run separately for each reference.
When you run this mask, you are also asked for a threshold amount. The actual wording of the question is, "Enter amount REF total must be greater than to automate entries:" The total for a primary reference must be greater than the threshold amount or the program will not run the second RJE on this primary reference.
There are several key words which are typically used in the second RJE to facilitate running it separately for each primary reference. At run time, the program substitutes the appropriate values for these key words. The key words are as follows:
- PRIMARYREFERENCE The primary reference. (This is usually used in both the selection criteria and in the JEID field.)
- <<*TOTALREFERENCE>> An asterisk ( * ) (indicating multiplication) followed by the total for the primary reference minus the threshold amount. The total for the primary reference is the total of the transactions for the primary reference which were gathered by the first RJE.
- <</CURRMONTHTOTAL>> A division sign ( / ) followed by the total for the primary reference for the current month. In order for the program to determine which transactions are from the current month, the first RJE should have at least 1 screen which gathers transactions from the current month and which has the value "CURR" in the Misc field. If the transactions gathered for a screen with "CURR" in the Misc field include transactions outside of the current month, they will be included in this total.
- <<KEYLIST>> A list of all keys for the primary reference for the current month. In order for the program to determine which transactions are from the current month, the first RJE should have at least 1 screen which gathers transactions from the current month and which has the value "CURR" in the Misc field. If the transactions gathered for a screen with "CURR" in the Misc field include transactions outside of the current month, they will be included in this list.
You can change any of these key words (including CURR) by modifying (or creating) a common code named GLRJ/RJESUBST. It is generally best, for simplicity, to leave this common code alone. If you do change the name of a key word, you MUST make sure the key word stays the same length. Also, do not put any spaces in the names, as this may confuse the program.
All of the key words except PRIMARYREFERENCE are surrounded by double angled brackets so that they can be entered in the RJE screen without it giving an error. If you change these key words, you should leave the double angled brackets as they are. The only change of a key word that may be useful is to change the mathematical sign in <<*TOTALREFERENCE>> or <</CURRMONTHTOTAL>>, which will change the mathematical operation that is performed with these totals. The mathematical sign for these totals may be: * (for multiplication), / (for division), + (for addition), and - (for subtraction).