Control Data Corporation 3300 Reference Manual page 139

Computer systems usasi cobol/ master
Table of Contents

Advertisement

60229400
2.
The following example and flow chart illustrate a linear search with
two WHEN conditional phrases:
DA TA DIVISION.
01
TABLE-I.
03
ill-I PIC
x(#.Q
OCCURS 150 TThlES INDEXED BY INDX-l.
01
TABLE-2.
03
ill-2 PIC X(12) OCCURS 200 TThlES INDEXED BY INDX-2.
PROCEDURE DIVISION.
SEARCH ill-I VARYING INDX-2 AT END GO TO NOT-FOUND
WHEN ill-I (INDx-1).= "A 1234567890" GO TO A-FILE
WHEN ID-2 (LNDX-2)
=
"A X_XX_XX_XXX_XX" GO TO B-FILE.
INDX-l and INDX-2 are each incremented until one or the other of the
two conditions is satisfied or until the character address bias of
INDX-l exceeds the table limit of TABLE-I. If neither condition is
satisfied, control passes to the procedure NOT-FOUND.
4-59

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 3300 and is the answer not in the manual?

This manual is also suitable for:

3500

Table of Contents