Sometimes, you have to set on a group of indicators in a range depending on a group of related conditions. For example, suppose you're doing some calculations with an array and you have to validate each element and set on a specific error indicator depending on the element checked. 6 shows how this can be accomplished. In this example, I've coded a loop where I do the validations and set on an indicator corresponding to the element in error. In this case, I'm using indicators 80-91, but you can select any range of indicators you want.
Sometimes, you have to set on a group of indicators in a range depending on a group of related conditions. For example, suppose you're doing some calculations with an array and you have to validate each element and set on a specific error indicator depending on the element checked. Figure 6 shows how this can be accomplished. In this example, I've coded a loop where I do the validations and set on an indicator corresponding to the element in error. In this case, I'm using indicators 80-91, but you can select any range of indicators you want.
The trick to making this work is to add some number to the variable that is used as the array index. This new value is then used as an index to the indicator array (*IN). Moving a 1 to an element of the indicator array sets on the indicator associated with that array element.
? Gustavo Cepeda
TechTalk: Dynamically Setting On Indicators
Figure 6: Setting On a Group of Indicators
*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 C 1 DO 12 X 30 C ARR,X IFEQ *ZEROS C X ADD 79 Y C MOVE '1' *IN,Y C ENDIF C ENDDO
LATEST COMMENTS
MC Press Online