Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tables-arrays

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I want a already sorted file to load into a table (of 300 records or so)that I can tell it to display 20 records at a time on the screen and then if there are more than 20 records to continue and display the next 20 records and so on. I do need help, I have never done this before.

select sort-name-file
assign to disk
????
???

I created my fd

FD in the file section

fd sort-name-file
01 name-rec
03 lastname-1 pic x(30).
03 firstname-1 pic x(10).
03 lastname-2 pic x(30).
03 firstname-2 pic x(10).
03 ssn pic 9(09).

in working storage
01 sort-idx pic 9(03).

01 table-name-sort records occurs 300
indexed by sort-index
03 table-lastname-1 pic x(30)
03 lastname-1 pic x(30).
03 firstname-1 pic x(10).
03 lastname-2 pic x(30).
03 firstname-2 pic x(10).
03 ssn pic 9(09).

procedure division

set sort-index to 1.
perform display sort-fields
varying 1 by 1
until sort-idx = 20.

read input-file into table-name-sort
at end
display table-name-sort.

move firstname-1 to table-firstname-1.
lastname-1 to table-lastname-1.
firstname-2 to table-firstname-2.
lastname-2 to table-lastname-2.
ssn to table-ssn.

I am confused with the microfocus books and I am not sure what else needs to be done????
 
Viz,

I'm generally missing structure in your program. Read into the chapter concerning paragraphs in COBOL. A couple of hints:

You'll need to read your input file repetitively (PERFORM ... UNTIL ...) to fill your table.
Check for end-of-file as well as the upper tabel limit (= 300).
The displaying of rows from your table: same story. also, how is a user able to control displaying the next 20 rows ?
A table element needs to be subscripted: if you want to adress a field in a table, do it like:

MOVE ... TO table-firstname-1 (4).

See if you can work this out; if not, let us know.

Good luck,
Ronald.

this moves something to the field table-firstname-1 in the 4th row of the table.
In this case, the index can be used as a subscripter:

table-firstname-1 (sort-index)

You don't need to declare in index in Working Storage ! Check up on the tables an indexes chapter.
 
Whoops !

I messed that one up good ! The last part should have been:

...
MOVE ... TO table-firstname-1 (4).

this moves something to the field table-firstname-1 in the 4th row of the table.
In this case, the index can be used as a subscripter:

table-firstname-1 (sort-index)

You don't need to declare in index in Working Storage ! Check up on the tables an indexes chapter.

See if you can work this out; if not, let us know.

Good luck,
Ronald.
 
I did not send a copy of the program, I just typed the code and told where I put it. I am still confused about tables.
 
Viz,

can you be a little bit more specific ? What about tables confuses you ?

Regards,
Ronald.
 
Do I define a select file in file control? then a FD in file section,data division? define the table in the working storeage, etc.
 
Bead2,

COBOL reserved words in uppercast:

Yes, SELECT a file in FILE-CONTROL in the INPUT-OUTPUT SECTION.
Define the file by an FD in the FILE SECTION of the DATA DIVISION.
Declare your table in the WORKING-STORAGE SECTION.

A table might look something like this (i prefer id names in uppercast as well):

01 TABLE-ROW OCCURS 300.
03 FIRST-FIELD PIC X(04).
03 SECOND-FIELD PIC X(08).

Provided FIRST-FIELD is a unique name (which might not be the case is your FD uses the same name), adressing that field in the, say, 4th row of your table looks like:

MOVE "text" TO FIRST-FIELD (4).

If qualification is needed, the same MOVE would look like:

MOVE "text" TO FIRST-FIELD IN TABLE-ROW (4).

Of course, you can also use an identifier, or an index (which i did not):

MOVE 4 TO WS-COUNTER. (Supposing such a field exists)
MOVE "text" TO FIRST-FIELD IN TABLE-ROW (WS-COUNTER).

Using an index speeds up processing, but with a 300 row table the gain would be marginal.

Regards,
Ronald.
 
Hello! You wrote:

-----------------------
I created my fd

FD in the file section

fd sort-name-file
01 name-rec
03 lastname-1 pic x(30).
03 firstname-1 pic x(10).
03 lastname-2 pic x(30).
03 firstname-2 pic x(10).
03 ssn pic 9(09).

in working storage
01 sort-idx pic 9(03).

01 table-name-sort records occurs 300
indexed by sort-index
03 table-lastname-1 pic x(30)
03 lastname-1 pic x(30).
03 firstname-1 pic x(10).
03 lastname-2 pic x(30).
03 firstname-2 pic x(10).
03 ssn pic 9(09).

procedure division

set sort-index to 1.
perform display sort-fields
varying 1 by 1
until sort-idx = 20.

read input-file into table-name-sort
at end
display table-name-sort.

move firstname-1 to table-firstname-1.
lastname-1 to table-lastname-1.
firstname-2 to table-firstname-2.
lastname-2 to table-lastname-2.
ssn to table-ssn.
-----------------------------------

Is this a fixed table? There are always exactly 300 elements in it?

I will assume that your actual table size is variable i.e. not all of the 300 slots are actually being used each time. However, I won't get into variable-sized tables (the ones using DEPENDING ON clauses. We can keep this as a fixed-size table with a max of 300 occurrences.

What you can do is set up PERFORM UNTIL (or PERFORM VARYING if you prefer) paragraphs.

You want to process all of your records. For this test, I would assume that you are reading a file SORT-NAME-FILE. I'll assume that it is a sequential file.

To make things simple, let's assume that you are using a batch job and wish to display 20 records at a time, then draw a line i.e. '---------------', then display the next 20 and so forth.

Your "MAINLINE", which is your "driver" paragraph will say:

2000-MAINLINE.

MOVE +0 TO REC-CTR.
SET SORT-INDEX TO 1.
PERFORM 3000-READ-INPUT-FILE THRU 3000-EXIT
UNTIL END-OF-FILE-SW = 'Y'.

MOVE REC-CTR TO NUMBER-OF-RECS.

MOVE +0 TO REC-CTR.
SET SORT-INDEX TO 1.
PERFORM 4000-DISPLAY-RECORDS
UNTIL SORT-INDEX > NUMBER-OF-RECS.

The first sentence sets up the entire read process. You initialize your index so that when you load the sequential files to your working storage table, you will start at one. Also initialize your record counter, which will start at 0 rather than 1, because you will read the record, then count it.

You will leave the MAINLINE paragraph and go to the 3000 paragraph. There, you will read until you get to the end of the file. You will process each file, separately right after you read it i.e. you will do something with it.

In this case, you will move each record in sequence into a working storage display table, which I assume would be TABLE-NAME-SORT-RECORDS. I would give a group name to the set of fields (lastname-1, firstname-1, lastname-2, firstname-2, ssn). Call the group TABLE-REC.

So we get to paragraph: 3000-READ-INPUT-FILE.

This will say: READ INPUT-FILE
AT END
MOVE 'Y' TO END-OF-FILE-SW.

MOVE NAME-REC TO TABLE-REC (SORT-INDEX).
SET SORT-INDEX UP BY 1.
ADD +1 TO REC-CTR.
3000-EXIT.
EXIT.

And that's all you'll do with this paragraph. Get the sequential files into your working storage table, increment your index and also increment your record counter until you reach the end of your file. At the end, you will now have the number of records in REC-CTR, which you will need when doing the displays. When that happens, the END-OF-FILE-SW goes up and stops your processing. You go back to 2000-MAINLINE.

Back at 2000-MAINLINE, you will move REC-CTR to NUMBER-OF-RECS. Then you will re-initialize REC-CTR to 0 so you can use it to keep track of when you have gotten to 20 so you can then place the '------------' in between the groups of 20. You will also re-initialize your index (to 1) for the display of your records. Again, you want to start at the beginning of your table. And your MAINLINE sentence will simply state: PERFORM 4000-DISPLAY-RECORDS UNTIL SORT-INDEX > NUMBER-OF-RECS.

In the paragraph 4000-DISPLAY-RECORDS, it should be coded like this:

4000-DISPLAY-RECORDS.

DISPLAY TABLE-REC (SORT-INDEX).
ADD +1 TO REC-CTR.

DIVIDE 20 INTO REC-CTR GIVING REC-RESULT
REMAINDER EVERY-20-FLAG.

What you are doing is looking to see when the REC-CTR has reach either 20 or a multiple of 20. You don't care about the result, but you care about the remainder (a COBOL reserved word). If this remainder = 0, then we are at 20 or a multiple of 20, and you will display a '-------------' at this point. So the remainder is a sort of "flag" telling the program to separate the records into groups of 20.

So the next line of code will be:
IF EVERY-20-FLAG = 0
DISPLAY '--------------------'
END-IF.

If you want, you can do something other than display a line. You can write it to another record, move the set of records off somewhere else or whatever. It's a sort of "control-break."

When you reach NUMBER-OF-RECS, the processing will stop.

Hope this helps.

Nina Too



 
Just for the record, in the ANSI Standard, and in IBM, you CANNOT use an occurs clause on a level 01 or 77 (or 66 or 88, but they are obvious.).
SOME compilers may allow it.
Tables SHOULD be coded
01 TABLE-NAME.
05 TABLE-ENTRY OCCURS ....
09 field-names
-
-

Stephen J Spiro
Member, J4 COBOL Standards Committee
 
Stephen,

you're right; mistake on my side. It is common practice to ue the construction you listed, so with a table as top level, and the row level beneath that.

Regards,
Ronald.
 
I attached a copy of my program, I keep getting weird errors, error 147 -(book says that 147 means Data item must be signed) but it compiles fine, it is just when I run it.

ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT HHMF-FILE
ASSIGN TO DISK
ORGANIZATION IS INDEXED
ACCESS MODE IS SEQUENTIAL
RECORD KEY IS HHMF-KEY.
SELECT HH0932-FILE
ASSIGN TO DISK
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS HH0932-KEY.
SELECT NAMETABLE-FILE
ASSIGN TO DISK.
SELECT SORT-WORK
ASSIGN TO DISK.
SELECT SORT-FILE
ASSIGN TO DISK.
*
*
DATA DIVISION.
FILE SECTION.

FD HHMF-FILE
LABEL RECORDS ARE STANDARD
VALUE OF FILE-ID IS '\FDPSYS\TABLES\DATA\HHMF.DAT'.
01 HHMF-REC.
03 HHMF-KEY PIC X(09).
03 FILLER PIC X(775).
FD HH0932-FILE
LABEL RECORDS ARE STANDARD
VALUE OF FILE-ID IS '\FDPSYS\TABLES\DATA\HH0932.DAT'.
01 HH0932-REC.
03 HH0932-KEY PIC X(09).
03 FILLER PIC X(1224).
SD SORT-WORK.
01 SORT-REC.
03 FILLER PIC X(26).
03 SR-NAME PIC X(34).
03 FILLER PIC X(724).
FD SORT-FILE
LABEL RECORDS ARE STANDARD
VALUE OF FILE-ID IS '\FDPSYS\TABLES\DATA\SORT.WRK'.
01 SF-REC PIC X(784).
FD NAMETABLE-FILE
LABEL RECORDS ARE STANDARD
VALUE OF FILE-ID IS '\FDPSYS\TABLES\DATA\NAME.DAT'.
01 NAMETABLE-REC PIC X(79).

*
*
WORKING-STORAGE SECTION.
*
COPY \SOURCE\HHMF.LIB.
COPY \SOURCE\HH0932.LIB.

*
01 NAME-CNT PIC 9(03).
01 NAME-IDX PIC 9(03).
01 IDX PIC 9(01).
01 SS-IN PIC X(01).
01 SI-LNAME PIC X(20).
01 SNO-IN PIC X(01).
01 SSO-IN PIC X(01).
01 SI-SSN.
03 SI-SS1 PIC 9(03).
03 SI-SS2 PIC 9(02).
03 SI-SS3 PIC 9(04).
01 SHO-SSN.
03 SHO-SS1 PIC 9(03).
03 SHO-SS2 PIC 9(02).
03 SHO-SS3 PIC 9(04).


01 HMF-HOLD.
03 HMFH-LNAME PIC X(20).
03 HMFH-FNAME PIC X(14).
03 HMFH-SSN.
05 HMFH-SS1 PIC 9(03).
05 HMFH-SS2 PIC 9(02).
05 HMFH-SS3 PIC 9(04).
03 HMFH-HHLNAME PIC X(20).
03 HMFH-HHFNAME PIC X(14).
03 HMFH-ID PIC X(09).
01 HH-DEPENDS.
03 HH-2-8.
05 H-2-8 PIC X(51) OCCURS 7 TIMES.
03 HH-9-32.
05 H-9-32 PIC X(51) OCCURS 8 TIMES.
01 HHM-FIELDS.
03 HHM-FNAME PIC X(14).
03 HHM-LNAME PIC X(20).
03 HHM-SSN PIC 9(09).
03 HHM-DOB PIC 9(08).
*
01 HHM-HOLD.
03 HHMH-LNAME PIC X(20).
03 HHMH-FNAME PIC X(14).
03 HHMH-SSN.
05 HHMH-SS1 PIC 9(03).
05 HHMH-SS2 PIC 9(02).
05 HHMH-SS3 PIC 9(04).
03 HHMH-HHLNAME PIC X(20).
03 HHMH-HHFNAME PIC X(14).


01 SCREEN-BOTH-OUTPUT.
03 SBO-MEMBER.
05 SBO-LNAME PIC X(20).
05 SBO-FNAME PIC X(14).
03 SBO-HEAD.
05 SBO-HHLNAME PIC X(20).
05 SBO-HHFNAME PIC X(14).
03 SBO-HHID PIC 9(09).
03 SBO-SSN.
05 SBO-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SBO-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SBO-SSN3 PIC 9(04).

01 NAME-DATA.
03 MEMBER-LNAME PIC X(20).
03 MEMBER-FNAME PIC X(14).
03 HEAD-LNAME PIC X(20).
03 HEAD-FNAME PIC X(14).
03 HEAD-ID PIC 9(09).



01 NAME-TABLE-DATA.
05 NAME-TABLE OCCURS 300 TIMES.
10 NT-LNAME PIC X(20).
10 NT-FNAME PIC X(14).
10 FILLER PIC X(01).
10 NT-HHLNAME PIC X(20).
10 NT-HHFNAME PIC X(14).
10 FILLER PIC X(01).
10 NT-HHID PIC 9(09).



01 SCREEN-SSN-OUTPUT-1.
03 SSO-1-SSN.
05 SSO-1-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-1-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-1-SSN3 PIC 9(04).
03 SSO-1-MEMBER PIC X(34).
03 SSO-1-HEADLNAME PIC X(20).
03 SSO-1-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-2.
03 SSO-2-SSN.
05 SSO-2-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-2-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-2-SSN3 PIC 9(04).
03 SSO-2-MEMBER PIC X(34).
03 SSO-2-HEADLNAME PIC X(34).
03 SSO-2-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-3.
03 SSO-3-SSN.
05 SSO-3-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-3-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-3-SSN3 PIC 9(04).
03 SSO-3-MEMBER PIC X(34).
03 SSO-3-HEADLNAME PIC X(20).
03 SSO-3-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-4.
03 SSO-4-SSN.
05 SSO-4-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-4-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-4-SSN3 PIC 9(04).
03 SSO-4-MEMBER PIC X(34).
03 SSO-4-HEADLNAME PIC X(20).
03 SSO-4-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-5.
03 SSO-5-SSN.
05 SSO-5-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-5-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-5-SSN3 PIC 9(04).
03 SSO-5-MEMBER PIC X(34).
03 SSO-5-HEADLNAME PIC X(20).
03 SSO-5-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-6.
03 SSO-6-SSN.
05 SSO-6-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-6-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-6-SSN3 PIC 9(04).
03 SSO-6-MEMBER PIC X(34).
03 SSO-6-HEADLNAME PIC X(20).
03 SSO-6-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-7.
03 SSO-7-SSN.
05 SSO-7-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-7-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-7-SSN3 PIC 9(04).
03 SSO-7-MEMBER PIC X(34).
03 SSO-7-HEADLNAME PIC X(20).
03 SSO-7-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-8.
03 SSO-8-SSN.
05 SSO-8-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-8-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-8-SSN3 PIC 9(04).
03 SSO-8-MEMBER PIC X(34).
03 SSO-8-HEADLNAME PIC X(20).
03 SSO-8-HHID PIC 9(09).

*
*
SCREEN SECTION.


********************** MAIN SEARCH MENU***********************

*
01 SEARCH-SCREEN AUTO.
02 BACKGROUND-COLOR 5 FOREGROUND-COLOR 3.
03 BLANK SCREEN.
03 LINE 2 COL 10 HIGHLIGHT VALUE
-"ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»".
03 LINE 3 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 4 COL 10 HIGHLIGHT VALUE "º ".
03 COL 34 HIGHLIGHT VALUE "SEARCH ONLINE".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 5 COL 10 HIGHLIGHT VALUE "º ".
03 COL 22 HIGHLIGHT VALUE
-"BY LAST NAME OR SOCIAL SECURITY NUMBER.".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 6 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 7 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 8 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 9 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 10 COL 10 HIGHLIGHT VALUE "º ".
03 COL 23 HIGHLIGHT VALUE
-"ENTER 'N' FOR LAST NAME SEARCH OR".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 11 COL 10 HIGHLIGHT VALUE "º ".
03 COL 23 HIGHLIGHT VALUE
-"ENTER 'S' FOR SOCIAL SECURITY SEARCH OR".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 12 COL 10 HIGHLIGHT VALUE "º ".
03 COL 23 HIGHLIGHT VALUE
-"ENTER 'E' TO RETURN TO MAIN AIS MENU".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 13 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 14 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 15 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 16 COL 10 HIGHLIGHT VALUE
-"ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ".
03 LINE 15 COL 38 PIC X USING SS-IN AUTO.




*

01 SCREEN-NAME-IN AUTO.
02 BACKGROUND-COLOR 5 FOREGROUND-COLOR 3.
03 BLANK SCREEN.
03 LINE 3 COL 30 HIGHLIGHT VALUE "SEARCH BY".
03 COL 40 HIGHLIGHT VALUE "LAST NAME".
03 LINE 5 COL 7 HIGHLIGHT VALUE "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»".
03 LINE 6 COL 7 HIGHLIGHT VALUE "º".
03 COL 22 HIGHLIGHT VALUE "PLEASE".
03 COL 29 HIGHLIGHT VALUE "ENTER".
03 COL 35 HIGHLIGHT VALUE "THE".
03 COL 39 HIGHLIGHT VALUE "LAST NAME".
03 COL 49 HIGHLIGHT VALUE "TO".
03 COL 52 HIGHLIGHT VALUE "SEARCH.".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 7 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 8 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 9 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 10 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 11 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 12 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 13 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 14 COL 7 HIGHLIGHT VALUE "º".
03 N-LNAME.
05 COL 11 HIGHLIGHT VALUE "ENTER".
05 COL 17 HIGHLIGHT VALUE "LAST".
05 COL 22 HIGHLIGHT VALUE "NAME:".
05 COLUMN 33 PIC X(20) USING SI-LNAME.

03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 15 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 16 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 17 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 18 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 19 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 20 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 21 COL 7 HIGHLIGHT VALUE "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ".



01 PROCESSING-NAME-SCREEN.
03 BLANK SCREEN.
03 LINE 12 COLUMN 24 HIGHLIGHT FOREGROUND-COLOR 6
'PLEASE WAIT....SEARCHING LIST BY LAST NAME'.


***********************SSN SEARCH MENU*************************


01 SCREEN-SSN-IN AUTO.
02 BACKGROUND-COLOR 5 FOREGROUND-COLOR 3.
03 BLANK SCREEN.
03 LINE 3 COL 25 HIGHLIGHT VALUE "SEARCH".
03 COL 32 HIGHLIGHT VALUE "BY".
03 COL 35 HIGHLIGHT VALUE "SOCIAL SECURITY NUMBER".
03 LINE 5 COL 7 HIGHLIGHT VALUE "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»".
03 LINE 6 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 7 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 8 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 9 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 12 COL 11 HIGHLIGHT VALUE
"ENTER SOCIAL SECURITY NUMBER:".
03 COL 40 HIGHLIGHT VALUE" - - ".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 10 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 11 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 12 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 13 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 14 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 15 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 16 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 17 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 18 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 19 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 20 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 21 COL 7 HIGHLIGHT VALUE "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ".
03 LINE 12 COL 48 PIC 9(03) USING SI-SS1 AUTO.
03 LINE 12 COL 52 PIC 9(02) USING SI-SS2 AUTO.
03 LINE 12 COL 55 PIC 9(04) USING SI-SS3 AUTO.



01 PROCESSING-SSN-SCREEN.
03 BLANK SCREEN.
03 LINE 12 COLUMN 15 HIGHLIGHT FOREGROUND-COLOR 6
'PLEASE WAIT....SEARCHING BY SOCIAL SECURITY NUMBER'.



*

*********************OUTPUT SCREENS*************************
*
*
*
01 SCREEN-NAME-OUT AUTO.
02 BACKGROUND-COLOR 5 FOREGROUND-COLOR 3.
03 BLANK SCREEN.
03 LINE 2 COL 20 HIGHLIGHT VALUE "SEARCH".
03 COL 27 HIGHLIGHT VALUE "RESULTS FOR LAST NAME:".
03 COL 50 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC X(20) FROM SI-LNAME.
03 LINE 3 COL 1 HIGHLIGHT VALUE "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍ»".
03 LINE 4 COL 1 HIGHLIGHT VALUE "º".
03 COL 15 HIGHLIGHT VALUE "NAME".
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 45 HIGHLIGHT VALUE "HEAD".
03 COL 50 HIGHLIGHT VALUE "OF".
03 COL 53 HIGHLIGHT VALUE "HOUSEHOLD".
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 74 HIGHLIGHT VALUE "HH-ID".
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 5 COL 1 HIGHLIGHT VALUE "ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍ͹".
03 LINE 6 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 7 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 8 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 9 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 10 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 11 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 12 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 13 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 14 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 15 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 16 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 17 COL 1 HIGHLIGHT VALUE "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍͼ".

* 03 LINE 6 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX)
* 03 LINE 6 COL 21 PIC X(14) FROM NT-FNAME(NAME-IDX)
* 03 LINE 6 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX)
* 03 LINE 6 COL 57 PIC X(14) FROM NT-HHFNAME(NAME-IDX)
* 03 LINE 6 COL 57 PIC X(14) FROM NT-HHFNAME(NAME-IDX)
* 03 LINE 6 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX)

03 LINE 18 COL 3 HIGHLIGHT VALUE
"PRESS".
03 COL 9 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
03 COL 16 HIGHLIGHT VALUE
"TO GO BACK TO AIS MAIN MENU".
03 LINE 18 COL 58 PIC X USING SNO-IN AUTO.







01 PROCESSING-MESSAGE-NAME-SCREEN.
03 BLANK SCREEN.
03 LINE 12 COL 34 HIGHLIGHT FOREGROUND-COLOR 6
'LAST NAME ENTERED " '.
03 LINE 13 COL 34 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC X(20) FROM SI-LNAME.
03 LINE 14 COL 30 HIGHLIGHT FOREGROUND-COLOR 6
'" WAS NOT FOUND-PLEASE TRY ANOTHER.'.
03 LINE 15 COL 3 HIGHLIGHT VALUE
"PRESS".
03 COL 9 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
03 COL 16 HIGHLIGHT VALUE
"TO RETURN TO MAIN ONLINE SEARCH MENU".
03 LINE 16 COL 58 PIC X USING SNO-IN AUTO.

01 PROCESSING-CONTINUE-SCREEN.
03 LINE 19 COL 34 HIGHLIGHT FOREGROUND-COLOR 6
'PRESS RETURN TO SEE'.
03 LINE 19 COL 54 HIGHLIGHT FOREGROUND-COLOR 6
'THE NEXT 12 RECORDS!'.



*
*
*
*
01 SCREEN-SSN-OUT AUTO.
02 BLANK SCREEN.
02 LINE 3 COL 32 VALUE "SEARCH RESULTS FOR".
02 LINE 4 COL 30 VALUE "SOCIAL SECURITY NUMBER:".
02 LINE 5 COL 35 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC 9(03) FROM SHO-SS1.
02 LINE 5 COL 38 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
VALUE "-".
02 LINE 5 COL 39 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC 9(02) FROM SHO-SS2.
02 LINE 5 COL 41 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
VALUE "-".
02 LINE 5 COL 42 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC 9(04) FROM SHO-SS3.

02 LINE 6 COL 1 VALUE "ÉÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍ»".
02 LINE 7 COL 1 VALUE "º º
-" º HEAD OF HOUSEHOLD ºHOUSEHOLDº".
02 LINE 8 COL 1 VALUE "º SSN º HOUSEHOLD MEMBER
-" º LAST NAME º ID º".
02 LINE 9 COL 1 VALUE "ÌÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÎ".
02 LINE 10 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-1-SSN1.
02 COL 5 PIC 9(02) FROM SSO-1-SSN2.
02 COL 7 PIC 9(04) FROM SSO-1-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-1-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-1-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 69 PIC X(09) FROM SSO-1-HHID.
02 COL 77 VALUE "º".
02 LINE 11 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-2-SSN1.
02 COL 5 PIC 9(02) FROM SSO-2-SSN2.
02 COL 7 PIC 9(04) FROM SSO-2-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-2-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-2-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 69 PIC X(09) FROM SSO-2-HHID.
02 COL 77 VALUE "º".
02 LINE 12 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-3-SSN1.
02 COL 5 PIC 9(02) FROM SSO-3-SSN2.
02 COL 7 PIC 9(04) FROM SSO-3-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-3-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-3-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 69 PIC X(09) FROM SSO-3-HHID.
02 COL 77 VALUE "º".
02 LINE 13 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-4-SSN1.
02 COL 5 PIC 9(02) FROM SSO-4-SSN2.
02 COL 7 PIC 9(04) FROM SSO-4-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-4-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-4-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-4-HHID.
02 COL 77 VALUE "º".
02 LINE 14 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-5-SSN1.
02 COL 5 PIC 9(02) FROM SSO-5-SSN2.
02 COL 7 PIC 9(04) FROM SSO-5-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-5-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-5-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-5-HHID.
02 COL 77 VALUE "º".
02 LINE 15 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-6-SSN1.
02 COL 5 PIC 9(02) FROM SSO-6-SSN2.
02 COL 7 PIC 9(04) FROM SSO-6-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-6-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-6-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-6-HHID.
02 COL 77 VALUE "º".
02 LINE 16 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-7-SSN1.
02 COL 5 PIC 9(02) FROM SSO-7-SSN2.
02 COL 7 PIC 9(04) FROM SSO-7-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-7-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-7-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-7-HHID.
02 COL 77 VALUE "º".
* 02 LINE 17 COL 1 VALUE "º".
* 02 COL 2 PIC 9(03) FROM SSO-8-SSN1.
* 02 COL 5 PIC 9(02) FROM SSO-8-SSN2.
* 02 COL 7 PIC 9(04) FROM SSO-8-SSN3.
* 02 COL 11 VALUE "º".
* 02 COL 12 PIC X(34) FROM SSO-8-MEMBER.
* 02 COL 46 VALUE "º".
* 02 COL 47 PIC X(20) FROM SSO-8-HEADLNAME.
* 02 COL 67 VALUE "º".
* 02 COL 68 PIC X(09) FROM SSO-8-HHID.
* 02 COL 77 VALUE "º".
02 LINE 17 COL 1 VALUE "ÈÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍͼ".

02 LINE 19 COL 2 HIGHLIGHT VALUE
"PRESS".
02 LINE 19 COL 8 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
02 LINE 19 COL 15 HIGHLIGHT VALUE
"TO RETURN TO AIS MAIN MENU".
02 LINE 19 COL 53 PIC X USING SSO-IN AUTO.


01 PROCESSING-MESSAGE-SSN-SCREEN.
03 BLANK SCREEN.
03 LINE 12 COL 35 HIGHLIGHT FOREGROUND-COLOR 6
'SOCIAL SECURITY NUMBER ENTERED "'.
03 LINE 13 COL 35 HIGHLIGHT FOREGROUND-COLOR 6
PIC X(20) FROM SI-SSN.
03 LINE 14 COL 30 HIGHLIGHT FOREGROUND-COLOR 6
'" WAS NOT FOUND-PLEASE TRY ANOTHER'.
03 LINE 15 COL 3 HIGHLIGHT VALUE
"PRESS".
03 COL 9 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
03 COL 16 HIGHLIGHT VALUE
"TO RETURN TO MAIN ONLINE SEARCH MENU".
03 LINE 16 COL 58 PIC X USING SSO-IN AUTO.


*
*
*
*
*
PROCEDURE DIVISION.
*
*
A000-INITIALIZE.
PERFORM A100-ACCEPT-MAIN-SEARCH-INPUT THRU A100-EXIT.
PERFORM A200-ACCEPT-NS-SEARCH-INPUT THRU A200-EXIT.
PERFORM B600-DISPLAY-RESULTS THRU B600-EXIT.
PERFORM Z000-TERMINATE THRU Z000-EXIT.
STOP RUN.
A000-EXIT.
EXIT.
*
*
A100-ACCEPT-MAIN-SEARCH-INPUT.
MOVE SPACES TO SSO-IN, SNO-IN, SS-IN.
DISPLAY SEARCH-SCREEN.
ACCEPT SEARCH-SCREEN.
A100-EXIT.
EXIT.



A200-ACCEPT-NS-SEARCH-INPUT.
IF SS-IN = "N"
DISPLAY SCREEN-NAME-IN
ACCEPT SCREEN-NAME-IN
PERFORM A300-SORT THRU A300-EXIT
OPEN INPUT SORT-FILE
HH0932-FILE
DISPLAY PROCESSING-NAME-SCREEN
PERFORM B000-READ-NAME THRU B000-EXIT.
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.

IF SS-IN = "S"
DISPLAY SCREEN-SSN-IN
ACCEPT SCREEN-SSN-IN
OPEN INPUT HHMF-FILE
HH0932-FILE

DISPLAY PROCESSING-SSN-SCREEN
PERFORM B001-READ-SSN THRU B001-EXIT.

IF SS-IN = "E"
* CALL "MAIN529A".
* CANCEL "MAIN529A".
* GO TO Z000-TERMINATE.
GO TO A200-EXIT.

A200-EXIT.
EXIT.
*
*
A300-SORT.
SORT SORT-WORK
ON ASCENDING KEY SR-NAME
USING HHMF-FILE
GIVING SORT-FILE.
A300-EXIT.
EXIT.
*
*
*
*
B000-READ-NAME.
READ SORT-FILE INTO HHMF-DATA
AT END
GO TO B000-EXIT.

IF HMF-HHSIZE > 08
MOVE HMF-ID TO HH0932-KEY
READ HH0932-FILE INTO HH0932-DATA
INVALID KEY
MOVE 08 TO HMF-HHSIZE.

IF HMF-LNAME = SPACE
GO TO B000-READ-NAME.

IF SI-LNAME = HMF-LNAME
MOVE HMF-LNAME TO NT-LNAME(NAME-IDX),NT-HHLNAME(NAME-IDX)
MOVE HMF-FNAME TO NT-FNAME(NAME-IDX),NT-HHFNAME(NAME-IDX)
MOVE HMF-ID TO NT-HHID(NAME-IDX).
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.

* PERFORM B500-MOVE-NAME-OUTPUT THRU B500-EXIT.
PERFORM B100-DEPENDENTS THRU B100-EXIT.

GO TO B000-READ-NAME.

B000-EXIT.
EXIT.



B001-READ-SSN.
READ HHMF-FILE INTO HHMF-DATA
AT END
GO TO B001-EXIT.

IF HMF-HHSIZE > 08
MOVE HMF-ID TO HH0932-KEY
READ HH0932-FILE INTO HH0932-DATA
INVALID KEY
MOVE 08 TO HMF-HHSIZE.

* IF HMF-SS = SPACES
* GO TO B001-EXIT.

MOVE HMF-ID TO HMFH-ID.
MOVE HMF-LNAME TO HMFH-LNAME, HMFH-HHLNAME.
MOVE HMF-FNAME TO HMFH-FNAME, HMFH-HHFNAME.
MOVE HMF-SS TO HMFH-SSN.

IF HMFH-SSN = SI-SSN
MOVE SPACES TO SCREEN-BOTH-OUTPUT
MOVE HMFH-LNAME TO SBO-LNAME
MOVE HMFH-FNAME TO SBO-FNAME
MOVE HMFH-HHLNAME TO SBO-HHLNAME
MOVE HMFH-HHFNAME TO SBO-HHFNAME
MOVE HMFH-ID TO SBO-HHID
MOVE HMFH-SS1 TO SBO-SSN1
MOVE HMFH-SS2 TO SBO-SSN2
MOVE HMFH-SS3 TO SBO-SSN3
PERFORM B501-MOVE-SSN-OUTPUT THRU B501-EXIT.

PERFORM B100-DEPENDENTS THRU B100-EXIT.

MOVE SI-SS1 TO SHO-SS1.
MOVE SI-SS2 TO SHO-SS2.
MOVE SI-SS3 TO SHO-SS3.

GO TO B001-READ-SSN.

B001-EXIT.
EXIT.



*
B100-DEPENDENTS.
IF HMF-HHSIZE = 01
GO TO B100-EXIT.
IF HMF-HHSIZE > 01
MOVE HMF-OTHERDATA TO HH-2-8
MOVE ZERO TO IDX
PERFORM B200-2-8 THRU B200-EXIT.
IF HMF-HHSIZE > 08
MOVE HHD-0916 TO HH-9-32
MOVE ZERO TO IDX
PERFORM B300-9-32 THRU B300-EXIT.
IF HMF-HHSIZE > 16
MOVE HHD-1724 TO HH-9-32
MOVE ZERO TO IDX
PERFORM B300-9-32 THRU B300-EXIT.
IF HMF-HHSIZE > 24
MOVE HHD-2532 TO HH-9-32
MOVE ZERO TO IDX
PERFORM B300-9-32 THRU B300-EXIT.
*
B100-EXIT.
EXIT.
*
B200-2-8.
IF SS-IN = 'N'
PERFORM B201-2-8-NAME THRU B201-EXIT.

IF SS-IN = 'S'
PERFORM B202-2-8-SSN THRU B202-EXIT.

B200-EXIT.
EXIT.


B201-2-8-NAME.
COMPUTE IDX = IDX + 1.
IF IDX = 8
GO TO B201-EXIT.
MOVE H-2-8 (IDX) TO HHM-FIELDS.
IF HHM-LNAME = SPACES
GO TO B201-EXIT.
MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.

IF SI-LNAME = HHMH-LNAME
* MOVE SPACES TO SCREEN-NAME-TABLE
MOVE HHMH-LNAME TO NT-LNAME(NAME-IDX)
MOVE HHMH-FNAME TO NT-FNAME(NAME-IDX)
MOVE HHMH-HHLNAME TO NT-HHLNAME(NAME-IDX)
MOVE HHMH-HHFNAME TO NT-HHFNAME(NAME-IDX)
MOVE HMFH-ID TO NT-HHID(NAME-IDX).
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.

* PERFORM B500-MOVE-NAME-OUTPUT THRU B500-EXIT.

GO TO B201-2-8-NAME.

B201-EXIT.
EXIT.

B202-2-8-SSN.
COMPUTE IDX = IDX + 1.
IF IDX = 8
GO TO B202-EXIT.
MOVE H-2-8 (IDX) TO HHM-FIELDS.

MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HHM-SSN TO HHMH-SSN.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.

* IF HHM-SSN = SPACE
* GO TO B202-EXIT.

IF HHMH-SSN = SI-SSN
MOVE SPACES TO SCREEN-BOTH-OUTPUT
MOVE HHMH-FNAME TO SBO-FNAME
MOVE HHMH-LNAME TO SBO-LNAME
MOVE HHMH-HHFNAME TO SBO-HHFNAME
MOVE HHMH-HHLNAME TO SBO-HHLNAME
MOVE HHMH-SS1 TO SBO-SSN1
MOVE HHMH-SS2 TO SBO-SSN2
MOVE HHMH-SS3 TO SBO-SSN3
MOVE HMFH-ID TO SBO-HHID
PERFORM B501-MOVE-SSN-OUTPUT THRU B501-EXIT.

GO TO B202-2-8-SSN.

B202-EXIT.
EXIT.


B300-9-32.
IF SS-IN = 'N'
PERFORM B301-9-32-NAME THRU B301-EXIT.

IF SS-IN = 'S'
PERFORM B302-9-32-SSN THRU B302-EXIT.

B300-EXIT.
EXIT.

B301-9-32-NAME.
COMPUTE IDX = IDX + 1.
IF IDX = 9
GO TO B301-EXIT.
MOVE H-9-32 (IDX) TO HHM-FIELDS.
IF HHM-LNAME = SPACE
GO TO B301-EXIT.
MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.

IF SI-LNAME = HHMH-LNAME
* MOVE SPACES TO SCREEN-NAME-TABLE
MOVE HHMH-LNAME TO NT-LNAME(NAME-IDX)
MOVE HHMH-FNAME TO NT-FNAME(NAME-IDX)
MOVE HHMH-HHLNAME TO NT-HHLNAME(NAME-IDX)
MOVE HHMH-HHFNAME TO NT-HHFNAME(NAME-IDX)
MOVE HMFH-ID TO NT-HHID(NAME-IDX)
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.

* PERFORM B500-MOVE-NAME-OUTPUT THRU B500-EXIT.

GO TO B301-9-32-NAME.

B301-EXIT.
EXIT.


B302-9-32-SSN.
COMPUTE IDX = IDX + 1.
IF IDX = 9
GO TO B302-EXIT.
MOVE H-9-32 (IDX) TO HHM-FIELDS.

* IF HHM-SSN = SPACES
* GO TO B302-EXIT.

MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HHM-SSN TO HHMH-SSN.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.

IF HHMH-SSN = SI-SSN
MOVE SPACES TO SCREEN-BOTH-OUTPUT
MOVE HHMH-FNAME TO SBO-FNAME
MOVE HHMH-LNAME TO SBO-LNAME
MOVE HHMH-HHFNAME TO SBO-HHFNAME
MOVE HHMH-HHLNAME TO SBO-HHLNAME
MOVE HHMH-SSN TO SBO-SSN
MOVE HMFH-ID TO SBO-HHID
PERFORM B501-MOVE-SSN-OUTPUT THRU B501-EXIT.

GO TO B302-9-32-SSN.


B302-EXIT.
EXIT.


B400-SELECTED-NAMES.
* MOVE SPACES TO NT-LNAME,NT-FNAME,NT-HHLNAME,NT-HHFNAME.
* MOVE ZEROS TO NT-HHID.
* PERFORM B401-LOAD-NAME-DATA
* VARYING NAME-CNT FROM 1 BY 1
* UNTIL NAME-CNT = 12


PERFORM B401-LOAD-NAME-DATA
VARYING NAME-CNT FROM 11 BY 1
UNTIL NAME-CNT IS > 11.
* PERFORM B600-DISPLAY-RESULTS THRU B600-EXIT.

B400-EXIT.
EXIT.


B401-LOAD-NAME-DATA.

READ NAMETABLE-FILE
AT END
GO TO B401-EXIT.



PERFORM B600-DISPLAY-RESULTS THRU B600-EXIT.


* MOVE NAME-DATA TO NAMETABLE(NAME-CNT).
* AT END
* MOVE "END" TO END-OF-FILE-INDICATOR.
*

B401-EXIT.
EXIT.


B501-MOVE-SSN-OUTPUT.
IF SCREEN-SSN-OUTPUT-1 NOT = SPACES
IF SCREEN-SSN-OUTPUT-2 NOT = SPACES
IF SCREEN-SSN-OUTPUT-3 NOT = SPACES
IF SCREEN-SSN-OUTPUT-4 NOT = SPACES
IF SCREEN-SSN-OUTPUT-5 NOT = SPACES
IF SCREEN-SSN-OUTPUT-6 NOT = SPACES
IF SCREEN-SSN-OUTPUT-7 NOT = SPACES
IF SCREEN-SSN-OUTPUT-8 NOT = SPACES
DISPLAY "TOO MANY DUPLICATES, CHECK YOUR RECORDS!"
ELSE MOVE SBO-MEMBER TO SSO-8-MEMBER
MOVE SBO-HHLNAME TO SSO-8-HEADLNAME
MOVE SBO-SSN1 TO SSO-8-SSN1
MOVE SBO-SSN2 TO SSO-8-SSN2
MOVE SBO-SSN3 TO SSO-8-SSN3
MOVE SBO-HHID TO SSO-8-HHID
ELSE MOVE SBO-MEMBER TO SSO-7-MEMBER
MOVE SBO-HHLNAME TO SSO-7-HEADLNAME
MOVE SBO-SSN1 TO SSO-7-SSN1
MOVE SBO-SSN2 TO SSO-7-SSN2
MOVE SBO-SSN3 TO SSO-7-SSN3
MOVE SBO-HHID TO SSO-7-HHID
ELSE MOVE SBO-MEMBER TO SSO-6-MEMBER
MOVE SBO-HHLNAME TO SSO-6-HEADLNAME
MOVE SBO-SSN1 TO SSO-6-SSN1
MOVE SBO-SSN2 TO SSO-6-SSN2
MOVE SBO-SSN3 TO SSO-6-SSN3
MOVE SBO-HHID TO SSO-6-HHID
ELSE MOVE SBO-MEMBER TO SSO-5-MEMBER
MOVE SBO-HHLNAME TO SSO-5-HEADLNAME
MOVE SBO-SSN1 TO SSO-5-SSN1
MOVE SBO-SSN2 TO SSO-5-SSN2
MOVE SBO-SSN3 TO SSO-5-SSN3
MOVE SBO-HHID TO SSO-5-HHID
ELSE MOVE SBO-MEMBER TO SSO-4-MEMBER
MOVE SBO-HHLNAME TO SSO-4-HEADLNAME
MOVE SBO-SSN1 TO SSO-4-SSN1
MOVE SBO-SSN2 TO SSO-4-SSN2
MOVE SBO-SSN3 TO SSO-4-SSN3
MOVE SBO-HHID TO SSO-4-HHID
ELSE MOVE SBO-MEMBER TO SSO-3-MEMBER
MOVE SBO-HHLNAME TO SSO-3-HEADLNAME
MOVE SBO-SSN1 TO SSO-3-SSN1
MOVE SBO-SSN2 TO SSO-3-SSN2
MOVE SBO-SSN3 TO SSO-3-SSN3
MOVE SBO-HHID TO SSO-3-HHID
ELSE MOVE SBO-MEMBER TO SSO-2-MEMBER
MOVE SBO-HHLNAME TO SSO-2-HEADLNAME
MOVE SBO-SSN1 TO SSO-2-SSN1
MOVE SBO-SSN2 TO SSO-2-SSN2
MOVE SBO-SSN3 TO SSO-2-SSN3
MOVE SBO-HHID TO SSO-2-HHID
ELSE MOVE SBO-MEMBER TO SSO-1-MEMBER
MOVE SBO-HHLNAME TO SSO-1-HEADLNAME
MOVE SBO-SSN1 TO SSO-1-SSN1
MOVE SBO-SSN2 TO SSO-1-SSN2
MOVE SBO-SSN3 TO SSO-1-SSN3
MOVE SBO-HHID TO SSO-1-HHID
DISPLAY SCREEN-SSN-OUTPUT-1.
B501-EXIT.
EXIT.


B600-DISPLAY-RESULTS.
IF SS-IN = 'N'
PERFORM B601-DISPLAY-NAME THRU B601-EXIT.
IF SS-IN = 'S'
PERFORM B602-DISPLAY-SSN THRU B602-EXIT.
B600-EXIT.
EXIT.


B601-DISPLAY-NAME.

* IF SNO-1-MEMBER = SPACES
* DISPLAY PROCESSING-MESSAGE-NAME-SCREEN
* ACCEPT PROCESSING-MESSAGE-NAME-SCREEN
* ELSE
* IF SNO-1-MEMBER NOT = SPACES

IF NAME-CNT > 11
DISPLAY SCREEN-NAME-OUT
DISPLAY PROCESSING-CONTINUE-SCREEN
* ACCEPT PROCESSING-CONTINUE-SCREEN
ACCEPT SCREEN-NAME-OUT
ELSE
DISPLAY SCREEN-NAME-OUT
ACCEPT SCREEN-NAME-OUT.

IF SNO-IN = "E"
GO TO B601-EXIT.

B601-EXIT.
EXIT.


B602-DISPLAY-SSN.
* IF SSO-1-SSN NOT = SI-SSN
IF SSO-1-SSN = SPACES
DISPLAY PROCESSING-MESSAGE-SSN-SCREEN
ACCEPT PROCESSING-MESSAGE-SSN-SCREEN
ELSE
* IF SSO-1-SSN NOT = SPACES
DISPLAY SCREEN-SSN-OUT
ACCEPT SCREEN-SSN-OUT.


IF SSO-IN = "E"
GO TO B602-EXIT.
* GO TO A100-ACCEPT-MAIN-SEARCH-INPUT.
* CALL "MAIN529A".
* CANCEL "MAIN529A".
* GO TO B602-EXIT.

* IF SSO-1-SSN = SPACES
* DISPLAY PROCESSING-MESSAGE-SSN-SCREEN.


B602-EXIT.
EXIT.



Z000-TERMINATE.
IF SS-IN = 'N'
CLOSE SORT-FILE
HH0932-FILE.
IF SS-IN = 'S'
CLOSE HHMF-FILE
HH0932-FILE.

IF SS-IN = 'E'
GO TO Z000-EXIT.

Z000-EXIT.
EXIT PROGRAM.

 
I attached a copy of my program, I keep getting weird errors, error 147 -(book says that 147 means Data item must be signed) but it compiles fine, it is just when I run it.

ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT HHMF-FILE
ASSIGN TO DISK
ORGANIZATION IS INDEXED
ACCESS MODE IS SEQUENTIAL
RECORD KEY IS HHMF-KEY.
SELECT HH0932-FILE
ASSIGN TO DISK
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS HH0932-KEY.
SELECT NAMETABLE-FILE
ASSIGN TO DISK.
SELECT SORT-WORK
ASSIGN TO DISK.
SELECT SORT-FILE
ASSIGN TO DISK.
*
*
DATA DIVISION.
FILE SECTION.

FD HHMF-FILE
LABEL RECORDS ARE STANDARD
VALUE OF FILE-ID IS '\FDPSYS\TABLES\DATA\HHMF.DAT'.
01 HHMF-REC.
03 HHMF-KEY PIC X(09).
03 FILLER PIC X(775).
FD HH0932-FILE
LABEL RECORDS ARE STANDARD
VALUE OF FILE-ID IS '\FDPSYS\TABLES\DATA\HH0932.DAT'.
01 HH0932-REC.
03 HH0932-KEY PIC X(09).
03 FILLER PIC X(1224).
SD SORT-WORK.
01 SORT-REC.
03 FILLER PIC X(26).
03 SR-NAME PIC X(34).
03 FILLER PIC X(724).
FD SORT-FILE
LABEL RECORDS ARE STANDARD
VALUE OF FILE-ID IS '\FDPSYS\TABLES\DATA\SORT.WRK'.
01 SF-REC PIC X(784).
FD NAMETABLE-FILE
LABEL RECORDS ARE STANDARD
VALUE OF FILE-ID IS '\FDPSYS\TABLES\DATA\NAME.DAT'.
01 NAMETABLE-REC PIC X(79).

*
*
WORKING-STORAGE SECTION.
*
COPY \SOURCE\HHMF.LIB.
COPY \SOURCE\HH0932.LIB.

*
01 NAME-CNT PIC 9(03).
01 NAME-IDX PIC 9(03).
01 IDX PIC 9(01).
01 SS-IN PIC X(01).
01 SI-LNAME PIC X(20).
01 SNO-IN PIC X(01).
01 SSO-IN PIC X(01).
01 SI-SSN.
03 SI-SS1 PIC 9(03).
03 SI-SS2 PIC 9(02).
03 SI-SS3 PIC 9(04).
01 SHO-SSN.
03 SHO-SS1 PIC 9(03).
03 SHO-SS2 PIC 9(02).
03 SHO-SS3 PIC 9(04).


01 HMF-HOLD.
03 HMFH-LNAME PIC X(20).
03 HMFH-FNAME PIC X(14).
03 HMFH-SSN.
05 HMFH-SS1 PIC 9(03).
05 HMFH-SS2 PIC 9(02).
05 HMFH-SS3 PIC 9(04).
03 HMFH-HHLNAME PIC X(20).
03 HMFH-HHFNAME PIC X(14).
03 HMFH-ID PIC X(09).
01 HH-DEPENDS.
03 HH-2-8.
05 H-2-8 PIC X(51) OCCURS 7 TIMES.
03 HH-9-32.
05 H-9-32 PIC X(51) OCCURS 8 TIMES.
01 HHM-FIELDS.
03 HHM-FNAME PIC X(14).
03 HHM-LNAME PIC X(20).
03 HHM-SSN PIC 9(09).
03 HHM-DOB PIC 9(08).
*
01 HHM-HOLD.
03 HHMH-LNAME PIC X(20).
03 HHMH-FNAME PIC X(14).
03 HHMH-SSN.
05 HHMH-SS1 PIC 9(03).
05 HHMH-SS2 PIC 9(02).
05 HHMH-SS3 PIC 9(04).
03 HHMH-HHLNAME PIC X(20).
03 HHMH-HHFNAME PIC X(14).


01 SCREEN-BOTH-OUTPUT.
03 SBO-MEMBER.
05 SBO-LNAME PIC X(20).
05 SBO-FNAME PIC X(14).
03 SBO-HEAD.
05 SBO-HHLNAME PIC X(20).
05 SBO-HHFNAME PIC X(14).
03 SBO-HHID PIC 9(09).
03 SBO-SSN.
05 SBO-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SBO-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SBO-SSN3 PIC 9(04).

01 NAME-DATA.
03 MEMBER-LNAME PIC X(20).
03 MEMBER-FNAME PIC X(14).
03 HEAD-LNAME PIC X(20).
03 HEAD-FNAME PIC X(14).
03 HEAD-ID PIC 9(09).



01 NAME-TABLE-DATA.
05 NAME-TABLE OCCURS 300 TIMES.
10 NT-LNAME PIC X(20).
10 NT-FNAME PIC X(14).
10 FILLER PIC X(01).
10 NT-HHLNAME PIC X(20).
10 NT-HHFNAME PIC X(14).
10 FILLER PIC X(01).
10 NT-HHID PIC 9(09).



01 SCREEN-SSN-OUTPUT-1.
03 SSO-1-SSN.
05 SSO-1-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-1-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-1-SSN3 PIC 9(04).
03 SSO-1-MEMBER PIC X(34).
03 SSO-1-HEADLNAME PIC X(20).
03 SSO-1-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-2.
03 SSO-2-SSN.
05 SSO-2-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-2-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-2-SSN3 PIC 9(04).
03 SSO-2-MEMBER PIC X(34).
03 SSO-2-HEADLNAME PIC X(34).
03 SSO-2-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-3.
03 SSO-3-SSN.
05 SSO-3-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-3-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-3-SSN3 PIC 9(04).
03 SSO-3-MEMBER PIC X(34).
03 SSO-3-HEADLNAME PIC X(20).
03 SSO-3-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-4.
03 SSO-4-SSN.
05 SSO-4-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-4-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-4-SSN3 PIC 9(04).
03 SSO-4-MEMBER PIC X(34).
03 SSO-4-HEADLNAME PIC X(20).
03 SSO-4-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-5.
03 SSO-5-SSN.
05 SSO-5-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-5-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-5-SSN3 PIC 9(04).
03 SSO-5-MEMBER PIC X(34).
03 SSO-5-HEADLNAME PIC X(20).
03 SSO-5-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-6.
03 SSO-6-SSN.
05 SSO-6-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-6-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-6-SSN3 PIC 9(04).
03 SSO-6-MEMBER PIC X(34).
03 SSO-6-HEADLNAME PIC X(20).
03 SSO-6-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-7.
03 SSO-7-SSN.
05 SSO-7-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-7-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-7-SSN3 PIC 9(04).
03 SSO-7-MEMBER PIC X(34).
03 SSO-7-HEADLNAME PIC X(20).
03 SSO-7-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-8.
03 SSO-8-SSN.
05 SSO-8-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-8-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-8-SSN3 PIC 9(04).
03 SSO-8-MEMBER PIC X(34).
03 SSO-8-HEADLNAME PIC X(20).
03 SSO-8-HHID PIC 9(09).

*
*
SCREEN SECTION.


********************** MAIN SEARCH MENU***********************

*
01 SEARCH-SCREEN AUTO.
02 BACKGROUND-COLOR 5 FOREGROUND-COLOR 3.
03 BLANK SCREEN.
03 LINE 2 COL 10 HIGHLIGHT VALUE
-"ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»".
03 LINE 3 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 4 COL 10 HIGHLIGHT VALUE "º ".
03 COL 34 HIGHLIGHT VALUE "SEARCH ONLINE".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 5 COL 10 HIGHLIGHT VALUE "º ".
03 COL 22 HIGHLIGHT VALUE
-"BY LAST NAME OR SOCIAL SECURITY NUMBER.".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 6 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 7 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 8 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 9 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 10 COL 10 HIGHLIGHT VALUE "º ".
03 COL 23 HIGHLIGHT VALUE
-"ENTER 'N' FOR LAST NAME SEARCH OR".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 11 COL 10 HIGHLIGHT VALUE "º ".
03 COL 23 HIGHLIGHT VALUE
-"ENTER 'S' FOR SOCIAL SECURITY SEARCH OR".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 12 COL 10 HIGHLIGHT VALUE "º ".
03 COL 23 HIGHLIGHT VALUE
-"ENTER 'E' TO RETURN TO MAIN AIS MENU".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 13 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 14 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 15 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 16 COL 10 HIGHLIGHT VALUE
-"ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ".
03 LINE 15 COL 38 PIC X USING SS-IN AUTO.




*

01 SCREEN-NAME-IN AUTO.
02 BACKGROUND-COLOR 5 FOREGROUND-COLOR 3.
03 BLANK SCREEN.
03 LINE 3 COL 30 HIGHLIGHT VALUE "SEARCH BY".
03 COL 40 HIGHLIGHT VALUE "LAST NAME".
03 LINE 5 COL 7 HIGHLIGHT VALUE "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»".
03 LINE 6 COL 7 HIGHLIGHT VALUE "º".
03 COL 22 HIGHLIGHT VALUE "PLEASE".
03 COL 29 HIGHLIGHT VALUE "ENTER".
03 COL 35 HIGHLIGHT VALUE "THE".
03 COL 39 HIGHLIGHT VALUE "LAST NAME".
03 COL 49 HIGHLIGHT VALUE "TO".
03 COL 52 HIGHLIGHT VALUE "SEARCH.".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 7 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 8 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 9 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 10 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 11 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 12 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 13 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 14 COL 7 HIGHLIGHT VALUE "º".
03 N-LNAME.
05 COL 11 HIGHLIGHT VALUE "ENTER".
05 COL 17 HIGHLIGHT VALUE "LAST".
05 COL 22 HIGHLIGHT VALUE "NAME:".
05 COLUMN 33 PIC X(20) USING SI-LNAME.

03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 15 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 16 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 17 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 18 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 19 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 20 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 21 COL 7 HIGHLIGHT VALUE "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ".



01 PROCESSING-NAME-SCREEN.
03 BLANK SCREEN.
03 LINE 12 COLUMN 24 HIGHLIGHT FOREGROUND-COLOR 6
'PLEASE WAIT....SEARCHING LIST BY LAST NAME'.


***********************SSN SEARCH MENU*************************


01 SCREEN-SSN-IN AUTO.
02 BACKGROUND-COLOR 5 FOREGROUND-COLOR 3.
03 BLANK SCREEN.
03 LINE 3 COL 25 HIGHLIGHT VALUE "SEARCH".
03 COL 32 HIGHLIGHT VALUE "BY".
03 COL 35 HIGHLIGHT VALUE "SOCIAL SECURITY NUMBER".
03 LINE 5 COL 7 HIGHLIGHT VALUE "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»".
03 LINE 6 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 7 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 8 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 9 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 12 COL 11 HIGHLIGHT VALUE
"ENTER SOCIAL SECURITY NUMBER:".
03 COL 40 HIGHLIGHT VALUE" - - ".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 10 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 11 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 12 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 13 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 14 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 15 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 16 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 17 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 18 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 19 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 20 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 21 COL 7 HIGHLIGHT VALUE "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ".
03 LINE 12 COL 48 PIC 9(03) USING SI-SS1 AUTO.
03 LINE 12 COL 52 PIC 9(02) USING SI-SS2 AUTO.
03 LINE 12 COL 55 PIC 9(04) USING SI-SS3 AUTO.



01 PROCESSING-SSN-SCREEN.
03 BLANK SCREEN.
03 LINE 12 COLUMN 15 HIGHLIGHT FOREGROUND-COLOR 6
'PLEASE WAIT....SEARCHING BY SOCIAL SECURITY NUMBER'.



*

*********************OUTPUT SCREENS*************************
*
*
*
01 SCREEN-NAME-OUT AUTO.
02 BACKGROUND-COLOR 5 FOREGROUND-COLOR 3.
03 BLANK SCREEN.
03 LINE 2 COL 20 HIGHLIGHT VALUE "SEARCH".
03 COL 27 HIGHLIGHT VALUE "RESULTS FOR LAST NAME:".
03 COL 50 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC X(20) FROM SI-LNAME.
03 LINE 3 COL 1 HIGHLIGHT VALUE "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍ»".
03 LINE 4 COL 1 HIGHLIGHT VALUE "º".
03 COL 15 HIGHLIGHT VALUE "NAME".
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 45 HIGHLIGHT VALUE "HEAD".
03 COL 50 HIGHLIGHT VALUE "OF".
03 COL 53 HIGHLIGHT VALUE "HOUSEHOLD".
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 74 HIGHLIGHT VALUE "HH-ID".
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 5 COL 1 HIGHLIGHT VALUE "ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍ͹".
03 LINE 6 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 7 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 8 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 9 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 10 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 11 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 12 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 13 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 14 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 15 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 16 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 17 COL 1 HIGHLIGHT VALUE "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍͼ".

* 03 LINE 6 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX)
* 03 LINE 6 COL 21 PIC X(14) FROM NT-FNAME(NAME-IDX)
* 03 LINE 6 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX)
* 03 LINE 6 COL 57 PIC X(14) FROM NT-HHFNAME(NAME-IDX)
* 03 LINE 6 COL 57 PIC X(14) FROM NT-HHFNAME(NAME-IDX)
* 03 LINE 6 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX)

03 LINE 18 COL 3 HIGHLIGHT VALUE
"PRESS".
03 COL 9 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
03 COL 16 HIGHLIGHT VALUE
"TO GO BACK TO AIS MAIN MENU".
03 LINE 18 COL 58 PIC X USING SNO-IN AUTO.







01 PROCESSING-MESSAGE-NAME-SCREEN.
03 BLANK SCREEN.
03 LINE 12 COL 34 HIGHLIGHT FOREGROUND-COLOR 6
'LAST NAME ENTERED " '.
03 LINE 13 COL 34 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC X(20) FROM SI-LNAME.
03 LINE 14 COL 30 HIGHLIGHT FOREGROUND-COLOR 6
'" WAS NOT FOUND-PLEASE TRY ANOTHER.'.
03 LINE 15 COL 3 HIGHLIGHT VALUE
"PRESS".
03 COL 9 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
03 COL 16 HIGHLIGHT VALUE
"TO RETURN TO MAIN ONLINE SEARCH MENU".
03 LINE 16 COL 58 PIC X USING SNO-IN AUTO.

01 PROCESSING-CONTINUE-SCREEN.
03 LINE 19 COL 34 HIGHLIGHT FOREGROUND-COLOR 6
'PRESS RETURN TO SEE'.
03 LINE 19 COL 54 HIGHLIGHT FOREGROUND-COLOR 6
'THE NEXT 12 RECORDS!'.



*
*
*
*
01 SCREEN-SSN-OUT AUTO.
02 BLANK SCREEN.
02 LINE 3 COL 32 VALUE "SEARCH RESULTS FOR".
02 LINE 4 COL 30 VALUE "SOCIAL SECURITY NUMBER:".
02 LINE 5 COL 35 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC 9(03) FROM SHO-SS1.
02 LINE 5 COL 38 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
VALUE "-".
02 LINE 5 COL 39 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC 9(02) FROM SHO-SS2.
02 LINE 5 COL 41 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
VALUE "-".
02 LINE 5 COL 42 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC 9(04) FROM SHO-SS3.

02 LINE 6 COL 1 VALUE "ÉÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍ»".
02 LINE 7 COL 1 VALUE "º º
-" º HEAD OF HOUSEHOLD ºHOUSEHOLDº".
02 LINE 8 COL 1 VALUE "º SSN º HOUSEHOLD MEMBER
-" º LAST NAME º ID º".
02 LINE 9 COL 1 VALUE "ÌÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÎ".
02 LINE 10 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-1-SSN1.
02 COL 5 PIC 9(02) FROM SSO-1-SSN2.
02 COL 7 PIC 9(04) FROM SSO-1-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-1-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-1-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 69 PIC X(09) FROM SSO-1-HHID.
02 COL 77 VALUE "º".
02 LINE 11 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-2-SSN1.
02 COL 5 PIC 9(02) FROM SSO-2-SSN2.
02 COL 7 PIC 9(04) FROM SSO-2-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-2-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-2-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 69 PIC X(09) FROM SSO-2-HHID.
02 COL 77 VALUE "º".
02 LINE 12 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-3-SSN1.
02 COL 5 PIC 9(02) FROM SSO-3-SSN2.
02 COL 7 PIC 9(04) FROM SSO-3-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-3-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-3-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 69 PIC X(09) FROM SSO-3-HHID.
02 COL 77 VALUE "º".
02 LINE 13 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-4-SSN1.
02 COL 5 PIC 9(02) FROM SSO-4-SSN2.
02 COL 7 PIC 9(04) FROM SSO-4-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-4-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-4-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-4-HHID.
02 COL 77 VALUE "º".
02 LINE 14 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-5-SSN1.
02 COL 5 PIC 9(02) FROM SSO-5-SSN2.
02 COL 7 PIC 9(04) FROM SSO-5-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-5-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-5-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-5-HHID.
02 COL 77 VALUE "º".
02 LINE 15 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-6-SSN1.
02 COL 5 PIC 9(02) FROM SSO-6-SSN2.
02 COL 7 PIC 9(04) FROM SSO-6-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-6-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-6-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-6-HHID.
02 COL 77 VALUE "º".
02 LINE 16 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-7-SSN1.
02 COL 5 PIC 9(02) FROM SSO-7-SSN2.
02 COL 7 PIC 9(04) FROM SSO-7-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-7-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-7-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-7-HHID.
02 COL 77 VALUE "º".
* 02 LINE 17 COL 1 VALUE "º".
* 02 COL 2 PIC 9(03) FROM SSO-8-SSN1.
* 02 COL 5 PIC 9(02) FROM SSO-8-SSN2.
* 02 COL 7 PIC 9(04) FROM SSO-8-SSN3.
* 02 COL 11 VALUE "º".
* 02 COL 12 PIC X(34) FROM SSO-8-MEMBER.
* 02 COL 46 VALUE "º".
* 02 COL 47 PIC X(20) FROM SSO-8-HEADLNAME.
* 02 COL 67 VALUE "º".
* 02 COL 68 PIC X(09) FROM SSO-8-HHID.
* 02 COL 77 VALUE "º".
02 LINE 17 COL 1 VALUE "ÈÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍͼ".

02 LINE 19 COL 2 HIGHLIGHT VALUE
"PRESS".
02 LINE 19 COL 8 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
02 LINE 19 COL 15 HIGHLIGHT VALUE
"TO RETURN TO AIS MAIN MENU".
02 LINE 19 COL 53 PIC X USING SSO-IN AUTO.


01 PROCESSING-MESSAGE-SSN-SCREEN.
03 BLANK SCREEN.
03 LINE 12 COL 35 HIGHLIGHT FOREGROUND-COLOR 6
'SOCIAL SECURITY NUMBER ENTERED "'.
03 LINE 13 COL 35 HIGHLIGHT FOREGROUND-COLOR 6
PIC X(20) FROM SI-SSN.
03 LINE 14 COL 30 HIGHLIGHT FOREGROUND-COLOR 6
'" WAS NOT FOUND-PLEASE TRY ANOTHER'.
03 LINE 15 COL 3 HIGHLIGHT VALUE
"PRESS".
03 COL 9 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
03 COL 16 HIGHLIGHT VALUE
"TO RETURN TO MAIN ONLINE SEARCH MENU".
03 LINE 16 COL 58 PIC X USING SSO-IN AUTO.


*
*
*
*
*
PROCEDURE DIVISION.
*
*
A000-INITIALIZE.
PERFORM A100-ACCEPT-MAIN-SEARCH-INPUT THRU A100-EXIT.
PERFORM A200-ACCEPT-NS-SEARCH-INPUT THRU A200-EXIT.
PERFORM B600-DISPLAY-RESULTS THRU B600-EXIT.
PERFORM Z000-TERMINATE THRU Z000-EXIT.
STOP RUN.
A000-EXIT.
EXIT.
*
*
A100-ACCEPT-MAIN-SEARCH-INPUT.
MOVE SPACES TO SSO-IN, SNO-IN, SS-IN.
DISPLAY SEARCH-SCREEN.
ACCEPT SEARCH-SCREEN.
A100-EXIT.
EXIT.



A200-ACCEPT-NS-SEARCH-INPUT.
IF SS-IN = "N"
DISPLAY SCREEN-NAME-IN
ACCEPT SCREEN-NAME-IN
PERFORM A300-SORT THRU A300-EXIT
OPEN INPUT SORT-FILE
HH0932-FILE
DISPLAY PROCESSING-NAME-SCREEN
PERFORM B000-READ-NAME THRU B000-EXIT.
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.

IF SS-IN = "S"
DISPLAY SCREEN-SSN-IN
ACCEPT SCREEN-SSN-IN
OPEN INPUT HHMF-FILE
HH0932-FILE

DISPLAY PROCESSING-SSN-SCREEN
PERFORM B001-READ-SSN THRU B001-EXIT.

IF SS-IN = "E"
* CALL "MAIN529A".
* CANCEL "MAIN529A".
* GO TO Z000-TERMINATE.
GO TO A200-EXIT.

A200-EXIT.
EXIT.
*
*
A300-SORT.
SORT SORT-WORK
ON ASCENDING KEY SR-NAME
USING HHMF-FILE
GIVING SORT-FILE.
A300-EXIT.
EXIT.
*
*
*
*
B000-READ-NAME.
READ SORT-FILE INTO HHMF-DATA
AT END
GO TO B000-EXIT.

IF HMF-HHSIZE > 08
MOVE HMF-ID TO HH0932-KEY
READ HH0932-FILE INTO HH0932-DATA
INVALID KEY
MOVE 08 TO HMF-HHSIZE.

IF HMF-LNAME = SPACE
GO TO B000-READ-NAME.

IF SI-LNAME = HMF-LNAME
MOVE HMF-LNAME TO NT-LNAME(NAME-IDX),NT-HHLNAME(NAME-IDX)
MOVE HMF-FNAME TO NT-FNAME(NAME-IDX),NT-HHFNAME(NAME-IDX)
MOVE HMF-ID TO NT-HHID(NAME-IDX).
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.

* PERFORM B500-MOVE-NAME-OUTPUT THRU B500-EXIT.
PERFORM B100-DEPENDENTS THRU B100-EXIT.

GO TO B000-READ-NAME.

B000-EXIT.
EXIT.



B001-READ-SSN.
READ HHMF-FILE INTO HHMF-DATA
AT END
GO TO B001-EXIT.

IF HMF-HHSIZE > 08
MOVE HMF-ID TO HH0932-KEY
READ HH0932-FILE INTO HH0932-DATA
INVALID KEY
MOVE 08 TO HMF-HHSIZE.

* IF HMF-SS = SPACES
* GO TO B001-EXIT.

MOVE HMF-ID TO HMFH-ID.
MOVE HMF-LNAME TO HMFH-LNAME, HMFH-HHLNAME.
MOVE HMF-FNAME TO HMFH-FNAME, HMFH-HHFNAME.
MOVE HMF-SS TO HMFH-SSN.

IF HMFH-SSN = SI-SSN
MOVE SPACES TO SCREEN-BOTH-OUTPUT
MOVE HMFH-LNAME TO SBO-LNAME
MOVE HMFH-FNAME TO SBO-FNAME
MOVE HMFH-HHLNAME TO SBO-HHLNAME
MOVE HMFH-HHFNAME TO SBO-HHFNAME
MOVE HMFH-ID TO SBO-HHID
MOVE HMFH-SS1 TO SBO-SSN1
MOVE HMFH-SS2 TO SBO-SSN2
MOVE HMFH-SS3 TO SBO-SSN3
PERFORM B501-MOVE-SSN-OUTPUT THRU B501-EXIT.

PERFORM B100-DEPENDENTS THRU B100-EXIT.

MOVE SI-SS1 TO SHO-SS1.
MOVE SI-SS2 TO SHO-SS2.
MOVE SI-SS3 TO SHO-SS3.

GO TO B001-READ-SSN.

B001-EXIT.
EXIT.



*
B100-DEPENDENTS.
IF HMF-HHSIZE = 01
GO TO B100-EXIT.
IF HMF-HHSIZE > 01
MOVE HMF-OTHERDATA TO HH-2-8
MOVE ZERO TO IDX
PERFORM B200-2-8 THRU B200-EXIT.
IF HMF-HHSIZE > 08
MOVE HHD-0916 TO HH-9-32
MOVE ZERO TO IDX
PERFORM B300-9-32 THRU B300-EXIT.
IF HMF-HHSIZE > 16
MOVE HHD-1724 TO HH-9-32
MOVE ZERO TO IDX
PERFORM B300-9-32 THRU B300-EXIT.
IF HMF-HHSIZE > 24
MOVE HHD-2532 TO HH-9-32
MOVE ZERO TO IDX
PERFORM B300-9-32 THRU B300-EXIT.
*
B100-EXIT.
EXIT.
*
B200-2-8.
IF SS-IN = 'N'
PERFORM B201-2-8-NAME THRU B201-EXIT.

IF SS-IN = 'S'
PERFORM B202-2-8-SSN THRU B202-EXIT.

B200-EXIT.
EXIT.


B201-2-8-NAME.
COMPUTE IDX = IDX + 1.
IF IDX = 8
GO TO B201-EXIT.
MOVE H-2-8 (IDX) TO HHM-FIELDS.
IF HHM-LNAME = SPACES
GO TO B201-EXIT.
MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.

IF SI-LNAME = HHMH-LNAME
* MOVE SPACES TO SCREEN-NAME-TABLE
MOVE HHMH-LNAME TO NT-LNAME(NAME-IDX)
MOVE HHMH-FNAME TO NT-FNAME(NAME-IDX)
MOVE HHMH-HHLNAME TO NT-HHLNAME(NAME-IDX)
MOVE HHMH-HHFNAME TO NT-HHFNAME(NAME-IDX)
MOVE HMFH-ID TO NT-HHID(NAME-IDX).
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.

* PERFORM B500-MOVE-NAME-OUTPUT THRU B500-EXIT.

GO TO B201-2-8-NAME.

B201-EXIT.
EXIT.

B202-2-8-SSN.
COMPUTE IDX = IDX + 1.
IF IDX = 8
GO TO B202-EXIT.
MOVE H-2-8 (IDX) TO HHM-FIELDS.

MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HHM-SSN TO HHMH-SSN.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.

* IF HHM-SSN = SPACE
* GO TO B202-EXIT.

IF HHMH-SSN = SI-SSN
MOVE SPACES TO SCREEN-BOTH-OUTPUT
MOVE HHMH-FNAME TO SBO-FNAME
MOVE HHMH-LNAME TO SBO-LNAME
MOVE HHMH-HHFNAME TO SBO-HHFNAME
MOVE HHMH-HHLNAME TO SBO-HHLNAME
MOVE HHMH-SS1 TO SBO-SSN1
MOVE HHMH-SS2 TO SBO-SSN2
MOVE HHMH-SS3 TO SBO-SSN3
MOVE HMFH-ID TO SBO-HHID
PERFORM B501-MOVE-SSN-OUTPUT THRU B501-EXIT.

GO TO B202-2-8-SSN.

B202-EXIT.
EXIT.


B300-9-32.
IF SS-IN = 'N'
PERFORM B301-9-32-NAME THRU B301-EXIT.

IF SS-IN = 'S'
PERFORM B302-9-32-SSN THRU B302-EXIT.

B300-EXIT.
EXIT.

B301-9-32-NAME.
COMPUTE IDX = IDX + 1.
IF IDX = 9
GO TO B301-EXIT.
MOVE H-9-32 (IDX) TO HHM-FIELDS.
IF HHM-LNAME = SPACE
GO TO B301-EXIT.
MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.

IF SI-LNAME = HHMH-LNAME
* MOVE SPACES TO SCREEN-NAME-TABLE
MOVE HHMH-LNAME TO NT-LNAME(NAME-IDX)
MOVE HHMH-FNAME TO NT-FNAME(NAME-IDX)
MOVE HHMH-HHLNAME TO NT-HHLNAME(NAME-IDX)
MOVE HHMH-HHFNAME TO NT-HHFNAME(NAME-IDX)
MOVE HMFH-ID TO NT-HHID(NAME-IDX)
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.

* PERFORM B500-MOVE-NAME-OUTPUT THRU B500-EXIT.

GO TO B301-9-32-NAME.

B301-EXIT.
EXIT.


B302-9-32-SSN.
COMPUTE IDX = IDX + 1.
IF IDX = 9
GO TO B302-EXIT.
MOVE H-9-32 (IDX) TO HHM-FIELDS.

* IF HHM-SSN = SPACES
* GO TO B302-EXIT.

MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HHM-SSN TO HHMH-SSN.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.

IF HHMH-SSN = SI-SSN
MOVE SPACES TO SCREEN-BOTH-OUTPUT
MOVE HHMH-FNAME TO SBO-FNAME
MOVE HHMH-LNAME TO SBO-LNAME
MOVE HHMH-HHFNAME TO SBO-HHFNAME
MOVE HHMH-HHLNAME TO SBO-HHLNAME
MOVE HHMH-SSN TO SBO-SSN
MOVE HMFH-ID TO SBO-HHID
PERFORM B501-MOVE-SSN-OUTPUT THRU B501-EXIT.

GO TO B302-9-32-SSN.


B302-EXIT.
EXIT.


B400-SELECTED-NAMES.
* MOVE SPACES TO NT-LNAME,NT-FNAME,NT-HHLNAME,NT-HHFNAME.
* MOVE ZEROS TO NT-HHID.
* PERFORM B401-LOAD-NAME-DATA
* VARYING NAME-CNT FROM 1 BY 1
* UNTIL NAME-CNT = 12


PERFORM B401-LOAD-NAME-DATA
VARYING NAME-CNT FROM 11 BY 1
UNTIL NAME-CNT IS > 11.
* PERFORM B600-DISPLAY-RESULTS THRU B600-EXIT.

B400-EXIT.
EXIT.


B401-LOAD-NAME-DATA.

READ NAMETABLE-FILE
AT END
GO TO B401-EXIT.



PERFORM B600-DISPLAY-RESULTS THRU B600-EXIT.


* MOVE NAME-DATA TO NAMETABLE(NAME-CNT).
* AT END
* MOVE "END" TO END-OF-FILE-INDICATOR.
*

B401-EXIT.
EXIT.


B501-MOVE-SSN-OUTPUT.
IF SCREEN-SSN-OUTPUT-1 NOT = SPACES
IF SCREEN-SSN-OUTPUT-2 NOT = SPACES
IF SCREEN-SSN-OUTPUT-3 NOT = SPACES
IF SCREEN-SSN-OUTPUT-4 NOT = SPACES
IF SCREEN-SSN-OUTPUT-5 NOT = SPACES
IF SCREEN-SSN-OUTPUT-6 NOT = SPACES
IF SCREEN-SSN-OUTPUT-7 NOT = SPACES
IF SCREEN-SSN-OUTPUT-8 NOT = SPACES
DISPLAY "TOO MANY DUPLICATES, CHECK YOUR RECORDS!"
ELSE MOVE SBO-MEMBER TO SSO-8-MEMBER
MOVE SBO-HHLNAME TO SSO-8-HEADLNAME
MOVE SBO-SSN1 TO SSO-8-SSN1
MOVE SBO-SSN2 TO SSO-8-SSN2
MOVE SBO-SSN3 TO SSO-8-SSN3
MOVE SBO-HHID TO SSO-8-HHID
ELSE MOVE SBO-MEMBER TO SSO-7-MEMBER
MOVE SBO-HHLNAME TO SSO-7-HEADLNAME
MOVE SBO-SSN1 TO SSO-7-SSN1
MOVE SBO-SSN2 TO SSO-7-SSN2
MOVE SBO-SSN3 TO SSO-7-SSN3
MOVE SBO-HHID TO SSO-7-HHID
ELSE MOVE SBO-MEMBER TO SSO-6-MEMBER
MOVE SBO-HHLNAME TO SSO-6-HEADLNAME
MOVE SBO-SSN1 TO SSO-6-SSN1
MOVE SBO-SSN2 TO SSO-6-SSN2
MOVE SBO-SSN3 TO SSO-6-SSN3
MOVE SBO-HHID TO SSO-6-HHID
ELSE MOVE SBO-MEMBER TO SSO-5-MEMBER
MOVE SBO-HHLNAME TO SSO-5-HEADLNAME
MOVE SBO-SSN1 TO SSO-5-SSN1
MOVE SBO-SSN2 TO SSO-5-SSN2
MOVE SBO-SSN3 TO SSO-5-SSN3
MOVE SBO-HHID TO SSO-5-HHID
ELSE MOVE SBO-MEMBER TO SSO-4-MEMBER
MOVE SBO-HHLNAME TO SSO-4-HEADLNAME
MOVE SBO-SSN1 TO SSO-4-SSN1
MOVE SBO-SSN2 TO SSO-4-SSN2
MOVE SBO-SSN3 TO SSO-4-SSN3
MOVE SBO-HHID TO SSO-4-HHID
ELSE MOVE SBO-MEMBER TO SSO-3-MEMBER
MOVE SBO-HHLNAME TO SSO-3-HEADLNAME
MOVE SBO-SSN1 TO SSO-3-SSN1
MOVE SBO-SSN2 TO SSO-3-SSN2
MOVE SBO-SSN3 TO SSO-3-SSN3
MOVE SBO-HHID TO SSO-3-HHID
ELSE MOVE SBO-MEMBER TO SSO-2-MEMBER
MOVE SBO-HHLNAME TO SSO-2-HEADLNAME
MOVE SBO-SSN1 TO SSO-2-SSN1
MOVE SBO-SSN2 TO SSO-2-SSN2
MOVE SBO-SSN3 TO SSO-2-SSN3
MOVE SBO-HHID TO SSO-2-HHID
ELSE MOVE SBO-MEMBER TO SSO-1-MEMBER
MOVE SBO-HHLNAME TO SSO-1-HEADLNAME
MOVE SBO-SSN1 TO SSO-1-SSN1
MOVE SBO-SSN2 TO SSO-1-SSN2
MOVE SBO-SSN3 TO SSO-1-SSN3
MOVE SBO-HHID TO SSO-1-HHID
DISPLAY SCREEN-SSN-OUTPUT-1.
B501-EXIT.
EXIT.


B600-DISPLAY-RESULTS.
IF SS-IN = 'N'
PERFORM B601-DISPLAY-NAME THRU B601-EXIT.
IF SS-IN = 'S'
PERFORM B602-DISPLAY-SSN THRU B602-EXIT.
B600-EXIT.
EXIT.


B601-DISPLAY-NAME.

* IF SNO-1-MEMBER = SPACES
* DISPLAY PROCESSING-MESSAGE-NAME-SCREEN
* ACCEPT PROCESSING-MESSAGE-NAME-SCREEN
* ELSE
* IF SNO-1-MEMBER NOT = SPACES

IF NAME-CNT > 11
DISPLAY SCREEN-NAME-OUT
DISPLAY PROCESSING-CONTINUE-SCREEN
* ACCEPT PROCESSING-CONTINUE-SCREEN
ACCEPT SCREEN-NAME-OUT
ELSE
DISPLAY SCREEN-NAME-OUT
ACCEPT SCREEN-NAME-OUT.

IF SNO-IN = "E"
GO TO B601-EXIT.

B601-EXIT.
EXIT.


B602-DISPLAY-SSN.
* IF SSO-1-SSN NOT = SI-SSN
IF SSO-1-SSN = SPACES
DISPLAY PROCESSING-MESSAGE-SSN-SCREEN
ACCEPT PROCESSING-MESSAGE-SSN-SCREEN
ELSE
* IF SSO-1-SSN NOT = SPACES
DISPLAY SCREEN-SSN-OUT
ACCEPT SCREEN-SSN-OUT.


IF SSO-IN = "E"
GO TO B602-EXIT.
* GO TO A100-ACCEPT-MAIN-SEARCH-INPUT.
* CALL "MAIN529A".
* CANCEL "MAIN529A".
* GO TO B602-EXIT.

* IF SSO-1-SSN = SPACES
* DISPLAY PROCESSING-MESSAGE-SSN-SCREEN.


B602-EXIT.
EXIT.



Z000-TERMINATE.
IF SS-IN = 'N'
CLOSE SORT-FILE
HH0932-FILE.
IF SS-IN = 'S'
CLOSE HHMF-FILE
HH0932-FILE.

IF SS-IN = 'E'
GO TO Z000-EXIT.

Z000-EXIT.
EXIT PROGRAM.

 
Let me try again with the whole program-in text I hope it all shows

ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT HHMF-FILE
ASSIGN TO DISK
ORGANIZATION IS INDEXED
ACCESS MODE IS SEQUENTIAL
RECORD KEY IS HHMF-KEY.
SELECT HH0932-FILE
ASSIGN TO DISK
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS HH0932-KEY.
SELECT NAMETABLE-FILE
ASSIGN TO DISK.
SELECT SORT-WORK
ASSIGN TO DISK.
SELECT SORT-FILE
ASSIGN TO DISK.
*
DATA DIVISION.
FILE SECTION.
FD HHMF-FILE
LABEL RECORDS ARE STANDARD
VALUE OF FILE-ID IS '\FDPSYS\TABLES\DATA\HHMF.DAT'.
01 HHMF-REC.
03 HHMF-KEY PIC X(09).
03 FILLER PIC X(775).
FD HH0932-FILE
LABEL RECORDS ARE STANDARD
VALUE OF FILE-ID IS '\FDPSYS\TABLES\DATA\HH0932.DAT'.
01 HH0932-REC.
03 HH0932-KEY PIC X(09).
03 FILLER PIC X(1224).
SD SORT-WORK.
01 SORT-REC.
03 FILLER PIC X(26).
03 SR-NAME PIC X(34).
03 FILLER PIC X(724).
FD SORT-FILE
LABEL RECORDS ARE STANDARD
VALUE OF FILE-ID IS '\FDPSYS\TABLES\DATA\SORT.WRK'.
01 SF-REC PIC X(784).
FD NAMETABLE-FILE
LABEL RECORDS ARE STANDARD
VALUE OF FILE-ID IS '\FDPSYS\TABLES\DATA\NAME.DAT'.
01 NAMETABLE-REC PIC X(79).
*
WORKING-STORAGE SECTION.
COPY \SOURCE\HHMF.LIB.
COPY \SOURCE\HH0932.LIB.
*
01 NAME-CNT PIC 9(03).
01 NAME-IDX PIC 9(03).
01 IDX PIC 9(01).
01 SS-IN PIC X(01).
01 SI-LNAME PIC X(20).
01 SNO-IN PIC X(01).
01 SSO-IN PIC X(01).
01 SI-SSN.
03 SI-SS1 PIC 9(03).
03 SI-SS2 PIC 9(02).
03 SI-SS3 PIC 9(04).
01 SHO-SSN.
03 SHO-SS1 PIC 9(03).
03 SHO-SS2 PIC 9(02).
03 SHO-SS3 PIC 9(04).
01 HMF-HOLD.
03 HMFH-LNAME PIC X(20).
03 HMFH-FNAME PIC X(14).
03 HMFH-SSN.
05 HMFH-SS1 PIC 9(03).
05 HMFH-SS2 PIC 9(02).
05 HMFH-SS3 PIC 9(04).
03 HMFH-HHLNAME PIC X(20).
03 HMFH-HHFNAME PIC X(14).
03 HMFH-ID PIC X(09).
01 HH-DEPENDS.
03 HH-2-8.
05 H-2-8 PIC X(51) OCCURS 7 TIMES.
03 HH-9-32.
05 H-9-32 PIC X(51) OCCURS 8 TIMES.
01 HHM-FIELDS.
03 HHM-FNAME PIC X(14).
03 HHM-LNAME PIC X(20).
03 HHM-SSN PIC 9(09).
03 HHM-DOB PIC 9(08).
*
01 HHM-HOLD.
03 HHMH-LNAME PIC X(20).
03 HHMH-FNAME PIC X(14).
03 HHMH-SSN.
05 HHMH-SS1 PIC 9(03).
05 HHMH-SS2 PIC 9(02).
05 HHMH-SS3 PIC 9(04).
03 HHMH-HHLNAME PIC X(20).
03 HHMH-HHFNAME PIC X(14).
01 SCREEN-BOTH-OUTPUT.
03 SBO-MEMBER.
05 SBO-LNAME PIC X(20).
05 SBO-FNAME PIC X(14).
03 SBO-HEAD.
05 SBO-HHLNAME PIC X(20).
05 SBO-HHFNAME PIC X(14).
03 SBO-HHID PIC 9(09).
03 SBO-SSN.
05 SBO-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SBO-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SBO-SSN3 PIC 9(04).
01 NAME-TABLE-DATA.
05 NAME-TABLE OCCURS 300 TIMES.
10 NT-LNAME PIC X(20).
10 NT-FNAME PIC X(14).
10 FILLER PIC X(01).
10 NT-HHLNAME PIC X(20).
10 NT-HHFNAME PIC X(14).
10 FILLER PIC X(01).
10 NT-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-1.
03 SSO-1-SSN.
05 SSO-1-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-1-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-1-SSN3 PIC 9(04).
03 SSO-1-MEMBER PIC X(34).
03 SSO-1-HEADLNAME PIC X(20).
03 SSO-1-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-2.
03 SSO-2-SSN.
05 SSO-2-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-2-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-2-SSN3 PIC 9(04).
03 SSO-2-MEMBER PIC X(34).
03 SSO-2-HEADLNAME PIC X(34).
03 SSO-2-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-3.
03 SSO-3-SSN.
05 SSO-3-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-3-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-3-SSN3 PIC 9(04).
03 SSO-3-MEMBER PIC X(34).
03 SSO-3-HEADLNAME PIC X(20).
03 SSO-3-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-4.
03 SSO-4-SSN.
05 SSO-4-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-4-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-4-SSN3 PIC 9(04).
03 SSO-4-MEMBER PIC X(34).
03 SSO-4-HEADLNAME PIC X(20).
03 SSO-4-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-5.
03 SSO-5-SSN.
05 SSO-5-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-5-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-5-SSN3 PIC 9(04).
03 SSO-5-MEMBER PIC X(34).
03 SSO-5-HEADLNAME PIC X(20).
03 SSO-5-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-6.
03 SSO-6-SSN.
05 SSO-6-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-6-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-6-SSN3 PIC 9(04).
03 SSO-6-MEMBER PIC X(34).
03 SSO-6-HEADLNAME PIC X(20).
03 SSO-6-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-7.
03 SSO-7-SSN.
05 SSO-7-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-7-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-7-SSN3 PIC 9(04).
03 SSO-7-MEMBER PIC X(34).
03 SSO-7-HEADLNAME PIC X(20).
03 SSO-7-HHID PIC 9(09).
01 SCREEN-SSN-OUTPUT-8.
03 SSO-8-SSN.
05 SSO-8-SSN1 PIC 9(03).
05 FILLER PIC X(01).
05 SSO-8-SSN2 PIC 9(02).
05 FILLER PIC X(01).
05 SSO-8-SSN3 PIC 9(04).
03 SSO-8-MEMBER PIC X(34).
03 SSO-8-HEADLNAME PIC X(20).
03 SSO-8-HHID PIC 9(09).
*
SCREEN SECTION.
********************** MAIN SEARCH MENU***********************
*
01 SEARCH-SCREEN AUTO.
02 BACKGROUND-COLOR 5 FOREGROUND-COLOR 3.
03 BLANK SCREEN.
03 LINE 2 COL 10 HIGHLIGHT VALUE
-"ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»".
03 LINE 3 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 4 COL 10 HIGHLIGHT VALUE "º ".
03 COL 34 HIGHLIGHT VALUE "SEARCH ONLINE".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 5 COL 10 HIGHLIGHT VALUE "º ".
03 COL 22 HIGHLIGHT VALUE
-"BY LAST NAME OR SOCIAL SECURITY NUMBER.".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 6 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 7 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 8 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 9 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 10 COL 10 HIGHLIGHT VALUE "º ".
03 COL 23 HIGHLIGHT VALUE
-"ENTER 'N' FOR LAST NAME SEARCH OR".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 11 COL 10 HIGHLIGHT VALUE "º ".
03 COL 23 HIGHLIGHT VALUE
-"ENTER 'S' FOR SOCIAL SECURITY SEARCH OR".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 12 COL 10 HIGHLIGHT VALUE "º ".
03 COL 23 HIGHLIGHT VALUE
-"ENTER 'E' TO RETURN TO MAIN AIS MENU".
03 COL 68 HIGHLIGHT VALUE "º".
03 LINE 13 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 14 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 15 COL 10 HIGHLIGHT VALUE "º
-" º".
03 LINE 16 COL 10 HIGHLIGHT VALUE
-"ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ".
03 LINE 15 COL 38 PIC X USING SS-IN AUTO.
*
01 SCREEN-NAME-IN AUTO.
02 BACKGROUND-COLOR 5 FOREGROUND-COLOR 3.
03 BLANK SCREEN.
03 LINE 3 COL 30 HIGHLIGHT VALUE "SEARCH BY".
03 COL 40 HIGHLIGHT VALUE "LAST NAME".
03 LINE 5 COL 7 HIGHLIGHT VALUE "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»".
03 LINE 6 COL 7 HIGHLIGHT VALUE "º".
03 COL 22 HIGHLIGHT VALUE "PLEASE".
03 COL 29 HIGHLIGHT VALUE "ENTER".
03 COL 35 HIGHLIGHT VALUE "THE".
03 COL 39 HIGHLIGHT VALUE "LAST NAME".
03 COL 49 HIGHLIGHT VALUE "TO".
03 COL 52 HIGHLIGHT VALUE "SEARCH.".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 7 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 8 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 9 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 10 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 11 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 12 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 13 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 14 COL 7 HIGHLIGHT VALUE "º".
03 N-LNAME.
05 COL 11 HIGHLIGHT VALUE "ENTER".
05 COL 17 HIGHLIGHT VALUE "LAST".
05 COL 22 HIGHLIGHT VALUE "NAME:".
05 COLUMN 33 PIC X(20) USING SI-LNAME.
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 15 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 16 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 17 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 18 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 19 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 20 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 21 COL 7 HIGHLIGHT VALUE "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ".
01 PROCESSING-NAME-SCREEN.
03 BLANK SCREEN.
03 LINE 12 COLUMN 24 HIGHLIGHT FOREGROUND-COLOR 6
'PLEASE WAIT....SEARCHING LIST BY LAST NAME'.


***********************SSN SEARCH MENU*************************
01 SCREEN-SSN-IN AUTO.
02 BACKGROUND-COLOR 5 FOREGROUND-COLOR 3.
03 BLANK SCREEN.
03 LINE 3 COL 25 HIGHLIGHT VALUE "SEARCH".
03 COL 32 HIGHLIGHT VALUE "BY".
03 COL 35 HIGHLIGHT VALUE "SOCIAL SECURITY NUMBER".
03 LINE 5 COL 7 HIGHLIGHT VALUE "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»".
03 LINE 6 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 7 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 8 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 9 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 12 COL 11 HIGHLIGHT VALUE
"ENTER SOCIAL SECURITY NUMBER:".
03 COL 40 HIGHLIGHT VALUE" - - ".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 10 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 11 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 12 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 13 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 14 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 15 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 16 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 17 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 18 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 19 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 20 COL 7 HIGHLIGHT VALUE "º".
03 COL 69 HIGHLIGHT VALUE "º".
03 LINE 21 COL 7 HIGHLIGHT VALUE "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ".
03 LINE 12 COL 48 PIC 9(03) USING SI-SS1 AUTO.
03 LINE 12 COL 52 PIC 9(02) USING SI-SS2 AUTO.
03 LINE 12 COL 55 PIC 9(04) USING SI-SS3 AUTO.

01 PROCESSING-SSN-SCREEN.
03 BLANK SCREEN.
03 LINE 12 COLUMN 15 HIGHLIGHT FOREGROUND-COLOR 6
'PLEASE WAIT....SEARCHING BY SOCIAL SECURITY NUMBER'.
*********************OUTPUT SCREENS*************************
01 SCREEN-NAME-OUT AUTO.
02 BACKGROUND-COLOR 5 FOREGROUND-COLOR 3.
03 BLANK SCREEN.
03 LINE 2 COL 20 HIGHLIGHT VALUE "SEARCH".
03 COL 27 HIGHLIGHT VALUE "RESULTS FOR LAST NAME:".
03 COL 50 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC X(20) FROM SI-LNAME.
03 LINE 3 COL 1 HIGHLIGHT VALUE "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍ»".
03 LINE 4 COL 1 HIGHLIGHT VALUE "º".
03 COL 15 HIGHLIGHT VALUE "NAME".
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 45 HIGHLIGHT VALUE "HEAD".
03 COL 50 HIGHLIGHT VALUE "OF".
03 COL 53 HIGHLIGHT VALUE "HOUSEHOLD".
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 74 HIGHLIGHT VALUE "HH-ID".
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 5 COL 1 HIGHLIGHT VALUE "ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍ͹".
03 LINE 6 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 7 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 8 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 9 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 10 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 11 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 12 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 13 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 14 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 15 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 16 COL 1 HIGHLIGHT VALUE "º".
03 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX).
03 COL 23 PIC X(14) FROM NT-FNAME(NAME-IDX).
03 COL 35 HIGHLIGHT VALUE "º".
03 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX).
03 COL 70 HIGHLIGHT VALUE "º".
03 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX).
03 COL 80 HIGHLIGHT VALUE "º".
03 LINE 17 COL 1 HIGHLIGHT VALUE "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍͼ".

* 03 LINE 6 COL 2 PIC X(20) FROM NT-LNAME(NAME-IDX)
* 03 LINE 6 COL 21 PIC X(14) FROM NT-FNAME(NAME-IDX)
* 03 LINE 6 COL 36 PIC X(20) FROM NT-HHLNAME(NAME-IDX)
* 03 LINE 6 COL 57 PIC X(14) FROM NT-HHFNAME(NAME-IDX)
* 03 LINE 6 COL 57 PIC X(14) FROM NT-HHFNAME(NAME-IDX)
* 03 LINE 6 COL 71 PIC 9(09) FROM NT-HHID(NAME-IDX)

03 LINE 18 COL 3 HIGHLIGHT VALUE
"PRESS".
03 COL 9 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
03 COL 16 HIGHLIGHT VALUE
"TO GO BACK TO AIS MAIN MENU".
03 LINE 18 COL 58 PIC X USING SNO-IN AUTO.
01 PROCESSING-MESSAGE-NAME-SCREEN.
03 BLANK SCREEN.
03 LINE 12 COL 34 HIGHLIGHT FOREGROUND-COLOR 6
'LAST NAME ENTERED " '.
03 LINE 13 COL 34 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC X(20) FROM SI-LNAME.
03 LINE 14 COL 30 HIGHLIGHT FOREGROUND-COLOR 6
'" WAS NOT FOUND-PLEASE TRY ANOTHER.'.
03 LINE 15 COL 3 HIGHLIGHT VALUE
"PRESS".
03 COL 9 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
03 COL 16 HIGHLIGHT VALUE
"TO RETURN TO MAIN ONLINE SEARCH MENU".
03 LINE 16 COL 58 PIC X USING SNO-IN AUTO.

01 PROCESSING-CONTINUE-SCREEN.
03 LINE 19 COL 34 HIGHLIGHT FOREGROUND-COLOR 6
'PRESS RETURN TO SEE'.
03 LINE 19 COL 54 HIGHLIGHT FOREGROUND-COLOR 6
'THE NEXT 12 RECORDS!'.
01 SCREEN-SSN-OUT AUTO.
02 BLANK SCREEN.
02 LINE 3 COL 32 VALUE "SEARCH RESULTS FOR".
02 LINE 4 COL 30 VALUE "SOCIAL SECURITY NUMBER:".
02 LINE 5 COL 35 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC 9(03) FROM SHO-SS1.
02 LINE 5 COL 38 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
VALUE "-".
02 LINE 5 COL 39 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC 9(02) FROM SHO-SS2.
02 LINE 5 COL 41 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
VALUE "-".
02 LINE 5 COL 42 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC 9(04) FROM SHO-SS3.

02 LINE 6 COL 1 VALUE "ÉÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍ»".
02 LINE 7 COL 1 VALUE "º º
-" º HEAD OF HOUSEHOLD ºHOUSEHOLDº".
02 LINE 8 COL 1 VALUE "º SSN º HOUSEHOLD MEMBER
-" º LAST NAME º ID º".
02 LINE 9 COL 1 VALUE "ÌÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÎ".
02 LINE 10 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-1-SSN1.
02 COL 5 PIC 9(02) FROM SSO-1-SSN2.
02 COL 7 PIC 9(04) FROM SSO-1-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-1-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-1-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 69 PIC X(09) FROM SSO-1-HHID.
02 COL 77 VALUE "º".
02 LINE 11 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-2-SSN1.
02 COL 5 PIC 9(02) FROM SSO-2-SSN2.
02 COL 7 PIC 9(04) FROM SSO-2-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-2-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-2-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 69 PIC X(09) FROM SSO-2-HHID.
02 COL 77 VALUE "º".
02 LINE 12 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-3-SSN1.
02 COL 5 PIC 9(02) FROM SSO-3-SSN2.
02 COL 7 PIC 9(04) FROM SSO-3-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-3-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-3-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 69 PIC X(09) FROM SSO-3-HHID.
02 COL 77 VALUE "º".
02 LINE 13 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-4-SSN1.
02 COL 5 PIC 9(02) FROM SSO-4-SSN2.
02 COL 7 PIC 9(04) FROM SSO-4-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-4-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-4-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-4-HHID.
02 COL 77 VALUE "º".
02 LINE 14 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-5-SSN1.
02 COL 5 PIC 9(02) FROM SSO-5-SSN2.
02 COL 7 PIC 9(04) FROM SSO-5-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-5-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-5-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-5-HHID.
02 COL 77 VALUE "º".
02 LINE 15 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-6-SSN1.
02 COL 5 PIC 9(02) FROM SSO-6-SSN2.
02 COL 7 PIC 9(04) FROM SSO-6-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-6-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-6-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-6-HHID.
02 COL 77 VALUE "º".
02 LINE 16 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-7-SSN1.
02 COL 5 PIC 9(02) FROM SSO-7-SSN2.
02 COL 7 PIC 9(04) FROM SSO-7-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-7-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-7-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-7-HHID.
02 COL 77 VALUE "º".
02 LINE 17 COL 1 VALUE "ÈÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍͼ".

02 LINE 19 COL 2 HIGHLIGHT VALUE
"PRESS".
02 LINE 19 COL 8 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
02 LINE 19 COL 15 HIGHLIGHT VALUE
"TO RETURN TO AIS MAIN MENU".
02 LINE 19 COL 53 PIC X USING SSO-IN AUTO.
01 PROCESSING-MESSAGE-SSN-SCREEN.
03 BLANK SCREEN.
03 LINE 12 COL 35 HIGHLIGHT FOREGROUND-COLOR 6
'SOCIAL SECURITY NUMBER ENTERED "'.
03 LINE 13 COL 35 HIGHLIGHT FOREGROUND-COLOR 6
PIC X(20) FROM SI-SSN.
03 LINE 14 COL 30 HIGHLIGHT FOREGROUND-COLOR 6
'" WAS NOT FOUND-PLEASE TRY ANOTHER'.
03 LINE 15 COL 3 HIGHLIGHT VALUE
"PRESS".
03 COL 9 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
03 COL 16 HIGHLIGHT VALUE
"TO RETURN TO MAIN ONLINE SEARCH MENU".
03 LINE 16 COL 58 PIC X USING SSO-IN AUTO.
*
PROCEDURE DIVISION.
*
A000-INITIALIZE.
PERFORM A100-ACCEPT-MAIN-SEARCH-INPUT THRU A100-EXIT.
PERFORM A200-ACCEPT-NS-SEARCH-INPUT THRU A200-EXIT.
PERFORM B600-DISPLAY-RESULTS THRU B600-EXIT.
PERFORM Z000-TERMINATE THRU Z000-EXIT.
STOP RUN.
A000-EXIT.
EXIT.
*
A100-ACCEPT-MAIN-SEARCH-INPUT.
MOVE SPACES TO SSO-IN, SNO-IN, SS-IN.
DISPLAY SEARCH-SCREEN.
ACCEPT SEARCH-SCREEN.
A100-EXIT.
EXIT.
A200-ACCEPT-NS-SEARCH-INPUT.
IF SS-IN = "N"
DISPLAY SCREEN-NAME-IN
ACCEPT SCREEN-NAME-IN
PERFORM A300-SORT THRU A300-EXIT
OPEN INPUT SORT-FILE
HH0932-FILE
DISPLAY PROCESSING-NAME-SCREEN
PERFORM B000-READ-NAME THRU B000-EXIT.
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.
IF SS-IN = "S"
DISPLAY SCREEN-SSN-IN
ACCEPT SCREEN-SSN-IN
OPEN INPUT HHMF-FILE
HH0932-FILE
DISPLAY PROCESSING-SSN-SCREEN
PERFORM B001-READ-SSN THRU B001-EXIT.
IF SS-IN = "E"
GO TO A200-EXIT.
A200-EXIT.
EXIT.
*
A300-SORT.
SORT SORT-WORK
ON ASCENDING KEY SR-NAME
USING HHMF-FILE
GIVING SORT-FILE.
A300-EXIT.
EXIT.
*
B000-READ-NAME.
READ SORT-FILE INTO HHMF-DATA
AT END
GO TO B000-EXIT.
IF HMF-HHSIZE > 08
MOVE HMF-ID TO HH0932-KEY
READ HH0932-FILE INTO HH0932-DATA
INVALID KEY
MOVE 08 TO HMF-HHSIZE.
IF HMF-LNAME = SPACE
GO TO B000-READ-NAME.
IF SI-LNAME = HMF-LNAME
MOVE HMF-LNAME TO NT-LNAME(NAME-IDX),NT-HHLNAME(NAME-IDX)
MOVE HMF-FNAME TO NT-FNAME(NAME-IDX),NT-HHFNAME(NAME-IDX)
MOVE HMF-ID TO NT-HHID(NAME-IDX).
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.
PERFORM B100-DEPENDENTS THRU B100-EXIT.
GO TO B000-READ-NAME.
B000-EXIT.
EXIT.

B001-READ-SSN.
READ HHMF-FILE INTO HHMF-DATA
AT END
GO TO B001-EXIT.
IF HMF-HHSIZE > 08
MOVE HMF-ID TO HH0932-KEY
READ HH0932-FILE INTO HH0932-DATA
INVALID KEY
MOVE 08 TO HMF-HHSIZE.
MOVE HMF-ID TO HMFH-ID.
MOVE HMF-LNAME TO HMFH-LNAME, HMFH-HHLNAME.
MOVE HMF-FNAME TO HMFH-FNAME, HMFH-HHFNAME.
MOVE HMF-SS TO HMFH-SSN.
IF HMFH-SSN = SI-SSN
MOVE SPACES TO SCREEN-BOTH-OUTPUT
MOVE HMFH-LNAME TO SBO-LNAME
MOVE HMFH-FNAME TO SBO-FNAME
MOVE HMFH-HHLNAME TO SBO-HHLNAME
MOVE HMFH-HHFNAME TO SBO-HHFNAME
MOVE HMFH-ID TO SBO-HHID
MOVE HMFH-SS1 TO SBO-SSN1
MOVE HMFH-SS2 TO SBO-SSN2
MOVE HMFH-SS3 TO SBO-SSN3
PERFORM B501-MOVE-SSN-OUTPUT THRU B501-EXIT.
PERFORM B100-DEPENDENTS THRU B100-EXIT.
MOVE SI-SS1 TO SHO-SS1.
MOVE SI-SS2 TO SHO-SS2.
MOVE SI-SS3 TO SHO-SS3.
GO TO B001-READ-SSN.
B001-EXIT.
EXIT.
*
B100-DEPENDENTS.
IF HMF-HHSIZE = 01
GO TO B100-EXIT.
IF HMF-HHSIZE > 01
MOVE HMF-OTHERDATA TO HH-2-8
MOVE ZERO TO IDX
PERFORM B200-2-8 THRU B200-EXIT.
IF HMF-HHSIZE > 08
MOVE HHD-0916 TO HH-9-32
MOVE ZERO TO IDX
PERFORM B300-9-32 THRU B300-EXIT.
IF HMF-HHSIZE > 16
MOVE HHD-1724 TO HH-9-32
MOVE ZERO TO IDX
PERFORM B300-9-32 THRU B300-EXIT.
IF HMF-HHSIZE > 24
MOVE HHD-2532 TO HH-9-32
MOVE ZERO TO IDX
PERFORM B300-9-32 THRU B300-EXIT.
*
B100-EXIT.
EXIT.
*
B200-2-8.
IF SS-IN = 'N'
PERFORM B201-2-8-NAME THRU B201-EXIT.
IF SS-IN = 'S'
PERFORM B202-2-8-SSN THRU B202-EXIT.
B200-EXIT.
EXIT.
B201-2-8-NAME.
COMPUTE IDX = IDX + 1.
IF IDX = 8
GO TO B201-EXIT.
MOVE H-2-8 (IDX) TO HHM-FIELDS.
IF HHM-LNAME = SPACES
GO TO B201-EXIT.
MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.
IF SI-LNAME = HHMH-LNAME
* MOVE SPACES TO SCREEN-NAME-TABLE
MOVE HHMH-LNAME TO NT-LNAME(NAME-IDX)
MOVE HHMH-FNAME TO NT-FNAME(NAME-IDX)
MOVE HHMH-HHLNAME TO NT-HHLNAME(NAME-IDX)
MOVE HHMH-HHFNAME TO NT-HHFNAME(NAME-IDX)
MOVE HMFH-ID TO NT-HHID(NAME-IDX).
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.
* PERFORM B500-MOVE-NAME-OUTPUT THRU B500-EXIT.
GO TO B201-2-8-NAME.
B201-EXIT.
EXIT.

B202-2-8-SSN.
COMPUTE IDX = IDX + 1.
IF IDX = 8
GO TO B202-EXIT.
MOVE H-2-8 (IDX) TO HHM-FIELDS.
MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HHM-SSN TO HHMH-SSN.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.
* IF HHM-SSN = SPACE
* GO TO B202-EXIT.
IF HHMH-SSN = SI-SSN
MOVE SPACES TO SCREEN-BOTH-OUTPUT
MOVE HHMH-FNAME TO SBO-FNAME
MOVE HHMH-LNAME TO SBO-LNAME
MOVE HHMH-HHFNAME TO SBO-HHFNAME
MOVE HHMH-HHLNAME TO SBO-HHLNAME
MOVE HHMH-SS1 TO SBO-SSN1
MOVE HHMH-SS2 TO SBO-SSN2
MOVE HHMH-SS3 TO SBO-SSN3
MOVE HMFH-ID TO SBO-HHID
PERFORM B501-MOVE-SSN-OUTPUT THRU B501-EXIT.
GO TO B202-2-8-SSN.
B202-EXIT.
EXIT.
B300-9-32.
IF SS-IN = 'N'
PERFORM B301-9-32-NAME THRU B301-EXIT.
IF SS-IN = 'S'
PERFORM B302-9-32-SSN THRU B302-EXIT.
B300-EXIT.
EXIT.

B301-9-32-NAME.
COMPUTE IDX = IDX + 1.
IF IDX = 9
GO TO B301-EXIT.
MOVE H-9-32 (IDX) TO HHM-FIELDS.
IF HHM-LNAME = SPACE
GO TO B301-EXIT.
MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.
IF SI-LNAME = HHMH-LNAME
* MOVE SPACES TO SCREEN-NAME-TABLE
MOVE HHMH-LNAME TO NT-LNAME(NAME-IDX)
MOVE HHMH-FNAME TO NT-FNAME(NAME-IDX)
MOVE HHMH-HHLNAME TO NT-HHLNAME(NAME-IDX)
MOVE HHMH-HHFNAME TO NT-HHFNAME(NAME-IDX)
MOVE HMFH-ID TO NT-HHID(NAME-IDX)
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.
* PERFORM B500-MOVE-NAME-OUTPUT THRU B500-EXIT.
GO TO B301-9-32-NAME.
B301-EXIT.
EXIT.

B302-9-32-SSN.
COMPUTE IDX = IDX + 1.
IF IDX = 9
GO TO B302-EXIT.
MOVE H-9-32 (IDX) TO HHM-FIELDS.
* IF HHM-SSN = SPACES
* GO TO B302-EXIT.
MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HHM-SSN TO HHMH-SSN.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.
IF HHMH-SSN = SI-SSN
MOVE SPACES TO SCREEN-BOTH-OUTPUT
MOVE HHMH-FNAME TO SBO-FNAME
MOVE HHMH-LNAME TO SBO-LNAME
MOVE HHMH-HHFNAME TO SBO-HHFNAME
MOVE HHMH-HHLNAME TO SBO-HHLNAME
MOVE HHMH-SSN TO SBO-SSN
MOVE HMFH-ID TO SBO-HHID
PERFORM B501-MOVE-SSN-OUTPUT THRU B501-EXIT.
GO TO B302-9-32-SSN.
B302-EXIT.
EXIT.

B400-SELECTED-NAMES.
PERFORM B401-LOAD-NAME-DATA
VARYING NAME-CNT FROM 11 BY 1
UNTIL NAME-CNT IS > 11.
B400-EXIT.
EXIT.
B401-LOAD-NAME-DATA.
READ NAMETABLE-FILE
AT END
GO TO B401-EXIT.
PERFORM B600-DISPLAY-RESULTS THRU B600-EXIT.
B401-EXIT.
EXIT.
B501-MOVE-SSN-OUTPUT.
IF SCREEN-SSN-OUTPUT-1 NOT = SPACES
IF SCREEN-SSN-OUTPUT-2 NOT = SPACES
IF SCREEN-SSN-OUTPUT-3 NOT = SPACES
IF SCREEN-SSN-OUTPUT-4 NOT = SPACES
IF SCREEN-SSN-OUTPUT-5 NOT = SPACES
IF SCREEN-SSN-OUTPUT-6 NOT = SPACES
IF SCREEN-SSN-OUTPUT-7 NOT = SPACES
IF SCREEN-SSN-OUTPUT-8 NOT = SPACES
DISPLAY "TOO MANY DUPLICATES, CHECK YOUR RECORDS!"
ELSE MOVE SBO-MEMBER TO SSO-8-MEMBER
MOVE SBO-HHLNAME TO SSO-8-HEADLNAME
MOVE SBO-SSN1 TO SSO-8-SSN1
MOVE SBO-SSN2 TO SSO-8-SSN2
MOVE SBO-SSN3 TO SSO-8-SSN3
MOVE SBO-HHID TO SSO-8-HHID
ELSE MOVE SBO-MEMBER TO SSO-7-MEMBER
MOVE SBO-HHLNAME TO SSO-7-HEADLNAME
MOVE SBO-SSN1 TO SSO-7-SSN1
MOVE SBO-SSN2 TO SSO-7-SSN2
MOVE SBO-SSN3 TO SSO-7-SSN3
MOVE SBO-HHID TO SSO-7-HHID
ELSE MOVE SBO-MEMBER TO SSO-6-MEMBER
MOVE SBO-HHLNAME TO SSO-6-HEADLNAME
MOVE SBO-SSN1 TO SSO-6-SSN1
MOVE SBO-SSN2 TO SSO-6-SSN2
MOVE SBO-SSN3 TO SSO-6-SSN3
MOVE SBO-HHID TO SSO-6-HHID
ELSE MOVE SBO-MEMBER TO SSO-5-MEMBER
MOVE SBO-HHLNAME TO SSO-5-HEADLNAME
MOVE SBO-SSN1 TO SSO-5-SSN1
MOVE SBO-SSN2 TO SSO-5-SSN2
MOVE SBO-SSN3 TO SSO-5-SSN3
MOVE SBO-HHID TO SSO-5-HHID
ELSE MOVE SBO-MEMBER TO SSO-4-MEMBER
MOVE SBO-HHLNAME TO SSO-4-HEADLNAME
MOVE SBO-SSN1 TO SSO-4-SSN1
MOVE SBO-SSN2 TO SSO-4-SSN2
MOVE SBO-SSN3 TO SSO-4-SSN3
MOVE SBO-HHID TO SSO-4-HHID
ELSE MOVE SBO-MEMBER TO SSO-3-MEMBER
MOVE SBO-HHLNAME TO SSO-3-HEADLNAME
MOVE SBO-SSN1 TO SSO-3-SSN1
MOVE SBO-SSN2 TO SSO-3-SSN2
MOVE SBO-SSN3 TO SSO-3-SSN3
MOVE SBO-HHID TO SSO-3-HHID
ELSE MOVE SBO-MEMBER TO SSO-2-MEMBER
MOVE SBO-HHLNAME TO SSO-2-HEADLNAME
MOVE SBO-SSN1 TO SSO-2-SSN1
MOVE SBO-SSN2 TO SSO-2-SSN2
MOVE SBO-SSN3 TO SSO-2-SSN3
MOVE SBO-HHID TO SSO-2-HHID
ELSE MOVE SBO-MEMBER TO SSO-1-MEMBER
MOVE SBO-HHLNAME TO SSO-1-HEADLNAME
MOVE SBO-SSN1 TO SSO-1-SSN1
MOVE SBO-SSN2 TO SSO-1-SSN2
MOVE SBO-SSN3 TO SSO-1-SSN3
MOVE SBO-HHID TO SSO-1-HHID
DISPLAY SCREEN-SSN-OUTPUT-1.
B501-EXIT.
EXIT.
B600-DISPLAY-RESULTS.
IF SS-IN = 'N'
PERFORM B601-DISPLAY-NAME THRU B601-EXIT.
IF SS-IN = 'S'
PERFORM B602-DISPLAY-SSN THRU B602-EXIT.
B600-EXIT.
EXIT.
B601-DISPLAY-NAME.
IF NAME-CNT > 11
DISPLAY SCREEN-NAME-OUT
DISPLAY PROCESSING-CONTINUE-SCREEN
* ACCEPT PROCESSING-CONTINUE-SCREEN
ACCEPT SCREEN-NAME-OUT
ELSE
DISPLAY SCREEN-NAME-OUT
ACCEPT SCREEN-NAME-OUT.

IF SNO-IN = "E"
GO TO B601-EXIT.

B601-EXIT.
EXIT.
B602-DISPLAY-SSN.
IF SSO-1-SSN = SPACES
DISPLAY PROCESSING-MESSAGE-SSN-SCREEN
ACCEPT PROCESSING-MESSAGE-SSN-SCREEN
ELSE
DISPLAY SCREEN-SSN-OUT
ACCEPT SCREEN-SSN-OUT.
IF SSO-IN = "E"
GO TO B602-EXIT.
B602-EXIT.
EXIT.
Z000-TERMINATE.
IF SS-IN = 'N'
CLOSE SORT-FILE
HH0932-FILE.
IF SS-IN = 'S'
CLOSE HHMF-FILE
HH0932-FILE.
IF SS-IN = 'E'
GO TO Z000-EXIT.
Z000-EXIT.
EXIT PROGRAM.
 
Other half of program attached-not all would go in.

01 SCREEN-SSN-OUT AUTO.
02 BLANK SCREEN.
02 LINE 3 COL 32 VALUE "SEARCH RESULTS FOR".
02 LINE 4 COL 30 VALUE "SOCIAL SECURITY NUMBER:".
02 LINE 5 COL 35 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC 9(03) FROM SHO-SS1.
02 LINE 5 COL 38 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
VALUE "-".
02 LINE 5 COL 39 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC 9(02) FROM SHO-SS2.
02 LINE 5 COL 41 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
VALUE "-".
02 LINE 5 COL 42 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
PIC 9(04) FROM SHO-SS3.

02 LINE 6 COL 1 VALUE "ÉÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍ»".
02 LINE 7 COL 1 VALUE "º º
-" º HEAD OF HOUSEHOLD ºHOUSEHOLDº".
02 LINE 8 COL 1 VALUE "º SSN º HOUSEHOLD MEMBER
-" º LAST NAME º ID º".
02 LINE 9 COL 1 VALUE "ÌÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÎ".
02 LINE 10 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-1-SSN1.
02 COL 5 PIC 9(02) FROM SSO-1-SSN2.
02 COL 7 PIC 9(04) FROM SSO-1-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-1-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-1-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 69 PIC X(09) FROM SSO-1-HHID.
02 COL 77 VALUE "º".
02 LINE 11 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-2-SSN1.
02 COL 5 PIC 9(02) FROM SSO-2-SSN2.
02 COL 7 PIC 9(04) FROM SSO-2-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-2-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-2-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 69 PIC X(09) FROM SSO-2-HHID.
02 COL 77 VALUE "º".
02 LINE 12 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-3-SSN1.
02 COL 5 PIC 9(02) FROM SSO-3-SSN2.
02 COL 7 PIC 9(04) FROM SSO-3-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-3-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-3-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 69 PIC X(09) FROM SSO-3-HHID.
02 COL 77 VALUE "º".
02 LINE 13 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-4-SSN1.
02 COL 5 PIC 9(02) FROM SSO-4-SSN2.
02 COL 7 PIC 9(04) FROM SSO-4-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-4-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-4-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-4-HHID.
02 COL 77 VALUE "º".
02 LINE 14 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-5-SSN1.
02 COL 5 PIC 9(02) FROM SSO-5-SSN2.
02 COL 7 PIC 9(04) FROM SSO-5-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-5-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-5-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-5-HHID.
02 COL 77 VALUE "º".
02 LINE 15 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-6-SSN1.
02 COL 5 PIC 9(02) FROM SSO-6-SSN2.
02 COL 7 PIC 9(04) FROM SSO-6-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-6-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-6-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-6-HHID.
02 COL 77 VALUE "º".
02 LINE 16 COL 1 VALUE "º".
02 COL 2 PIC 9(03) FROM SSO-7-SSN1.
02 COL 5 PIC 9(02) FROM SSO-7-SSN2.
02 COL 7 PIC 9(04) FROM SSO-7-SSN3.
02 COL 11 VALUE "º".
02 COL 12 PIC X(34) FROM SSO-7-MEMBER.
02 COL 46 VALUE "º".
02 COL 47 PIC X(20) FROM SSO-7-HEADLNAME.
02 COL 67 VALUE "º".
02 COL 68 PIC X(09) FROM SSO-7-HHID.
02 COL 77 VALUE "º".
* 02 LINE 17 COL 1 VALUE "º".
* 02 COL 2 PIC 9(03) FROM SSO-8-SSN1.
* 02 COL 5 PIC 9(02) FROM SSO-8-SSN2.
* 02 COL 7 PIC 9(04) FROM SSO-8-SSN3.
* 02 COL 11 VALUE "º".
* 02 COL 12 PIC X(34) FROM SSO-8-MEMBER.
* 02 COL 46 VALUE "º".
* 02 COL 47 PIC X(20) FROM SSO-8-HEADLNAME.
* 02 COL 67 VALUE "º".
* 02 COL 68 PIC X(09) FROM SSO-8-HHID.
* 02 COL 77 VALUE "º".
02 LINE 17 COL 1 VALUE "ÈÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
-"ÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍͼ".

02 LINE 19 COL 2 HIGHLIGHT VALUE
"PRESS".
02 LINE 19 COL 8 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
02 LINE 19 COL 15 HIGHLIGHT VALUE
"TO RETURN TO AIS MAIN MENU".
02 LINE 19 COL 53 PIC X USING SSO-IN AUTO.


01 PROCESSING-MESSAGE-SSN-SCREEN.
03 BLANK SCREEN.
03 LINE 12 COL 35 HIGHLIGHT FOREGROUND-COLOR 6
'SOCIAL SECURITY NUMBER ENTERED "'.
03 LINE 13 COL 35 HIGHLIGHT FOREGROUND-COLOR 6
PIC X(20) FROM SI-SSN.
03 LINE 14 COL 30 HIGHLIGHT FOREGROUND-COLOR 6
'" WAS NOT FOUND-PLEASE TRY ANOTHER'.
03 LINE 15 COL 3 HIGHLIGHT VALUE
"PRESS".
03 COL 9 BACKGROUND-COLOR 2 FOREGROUND-COLOR 4
"RETURN".
03 COL 16 HIGHLIGHT VALUE
"TO RETURN TO MAIN ONLINE SEARCH MENU".
03 LINE 16 COL 58 PIC X USING SSO-IN AUTO.


*
*
*
*
*
PROCEDURE DIVISION.
*
*
A000-INITIALIZE.
PERFORM A100-ACCEPT-MAIN-SEARCH-INPUT THRU A100-EXIT.
PERFORM A200-ACCEPT-NS-SEARCH-INPUT THRU A200-EXIT.
PERFORM B600-DISPLAY-RESULTS THRU B600-EXIT.
PERFORM Z000-TERMINATE THRU Z000-EXIT.
STOP RUN.
A000-EXIT.
EXIT.
*
*
A100-ACCEPT-MAIN-SEARCH-INPUT.
MOVE SPACES TO SSO-IN, SNO-IN, SS-IN.
DISPLAY SEARCH-SCREEN.
ACCEPT SEARCH-SCREEN.
A100-EXIT.
EXIT.



A200-ACCEPT-NS-SEARCH-INPUT.
IF SS-IN = "N"
DISPLAY SCREEN-NAME-IN
ACCEPT SCREEN-NAME-IN
PERFORM A300-SORT THRU A300-EXIT
OPEN INPUT SORT-FILE
HH0932-FILE
DISPLAY PROCESSING-NAME-SCREEN
PERFORM B000-READ-NAME THRU B000-EXIT.
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.

IF SS-IN = "S"
DISPLAY SCREEN-SSN-IN
ACCEPT SCREEN-SSN-IN
OPEN INPUT HHMF-FILE
HH0932-FILE

DISPLAY PROCESSING-SSN-SCREEN
PERFORM B001-READ-SSN THRU B001-EXIT.

IF SS-IN = "E"
* CALL "MAIN529A".
* CANCEL "MAIN529A".
* GO TO Z000-TERMINATE.
GO TO A200-EXIT.

A200-EXIT.
EXIT.
*
*
A300-SORT.
SORT SORT-WORK
ON ASCENDING KEY SR-NAME
USING HHMF-FILE
GIVING SORT-FILE.
A300-EXIT.
EXIT.
*
*
*
*
B000-READ-NAME.
READ SORT-FILE INTO HHMF-DATA
AT END
GO TO B000-EXIT.

IF HMF-HHSIZE > 08
MOVE HMF-ID TO HH0932-KEY
READ HH0932-FILE INTO HH0932-DATA
INVALID KEY
MOVE 08 TO HMF-HHSIZE.

IF HMF-LNAME = SPACE
GO TO B000-READ-NAME.

IF SI-LNAME = HMF-LNAME
MOVE HMF-LNAME TO NT-LNAME(NAME-IDX),NT-HHLNAME(NAME-IDX)
MOVE HMF-FNAME TO NT-FNAME(NAME-IDX),NT-HHFNAME(NAME-IDX)
MOVE HMF-ID TO NT-HHID(NAME-IDX).
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.

* PERFORM B500-MOVE-NAME-OUTPUT THRU B500-EXIT.
PERFORM B100-DEPENDENTS THRU B100-EXIT.

GO TO B000-READ-NAME.

B000-EXIT.
EXIT.



B001-READ-SSN.
READ HHMF-FILE INTO HHMF-DATA
AT END
GO TO B001-EXIT.

IF HMF-HHSIZE > 08
MOVE HMF-ID TO HH0932-KEY
READ HH0932-FILE INTO HH0932-DATA
INVALID KEY
MOVE 08 TO HMF-HHSIZE.

* IF HMF-SS = SPACES
* GO TO B001-EXIT.

MOVE HMF-ID TO HMFH-ID.
MOVE HMF-LNAME TO HMFH-LNAME, HMFH-HHLNAME.
MOVE HMF-FNAME TO HMFH-FNAME, HMFH-HHFNAME.
MOVE HMF-SS TO HMFH-SSN.

IF HMFH-SSN = SI-SSN
MOVE SPACES TO SCREEN-BOTH-OUTPUT
MOVE HMFH-LNAME TO SBO-LNAME
MOVE HMFH-FNAME TO SBO-FNAME
MOVE HMFH-HHLNAME TO SBO-HHLNAME
MOVE HMFH-HHFNAME TO SBO-HHFNAME
MOVE HMFH-ID TO SBO-HHID
MOVE HMFH-SS1 TO SBO-SSN1
MOVE HMFH-SS2 TO SBO-SSN2
MOVE HMFH-SS3 TO SBO-SSN3
PERFORM B501-MOVE-SSN-OUTPUT THRU B501-EXIT.

PERFORM B100-DEPENDENTS THRU B100-EXIT.

MOVE SI-SS1 TO SHO-SS1.
MOVE SI-SS2 TO SHO-SS2.
MOVE SI-SS3 TO SHO-SS3.

GO TO B001-READ-SSN.

B001-EXIT.
EXIT.



*
B100-DEPENDENTS.
IF HMF-HHSIZE = 01
GO TO B100-EXIT.
IF HMF-HHSIZE > 01
MOVE HMF-OTHERDATA TO HH-2-8
MOVE ZERO TO IDX
PERFORM B200-2-8 THRU B200-EXIT.
IF HMF-HHSIZE > 08
MOVE HHD-0916 TO HH-9-32
MOVE ZERO TO IDX
PERFORM B300-9-32 THRU B300-EXIT.
IF HMF-HHSIZE > 16
MOVE HHD-1724 TO HH-9-32
MOVE ZERO TO IDX
PERFORM B300-9-32 THRU B300-EXIT.
IF HMF-HHSIZE > 24
MOVE HHD-2532 TO HH-9-32
MOVE ZERO TO IDX
PERFORM B300-9-32 THRU B300-EXIT.
*
B100-EXIT.
EXIT.
*
B200-2-8.
IF SS-IN = 'N'
PERFORM B201-2-8-NAME THRU B201-EXIT.

IF SS-IN = 'S'
PERFORM B202-2-8-SSN THRU B202-EXIT.

B200-EXIT.
EXIT.


B201-2-8-NAME.
COMPUTE IDX = IDX + 1.
IF IDX = 8
GO TO B201-EXIT.
MOVE H-2-8 (IDX) TO HHM-FIELDS.
IF HHM-LNAME = SPACES
GO TO B201-EXIT.
MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.

IF SI-LNAME = HHMH-LNAME
* MOVE SPACES TO SCREEN-NAME-TABLE
MOVE HHMH-LNAME TO NT-LNAME(NAME-IDX)
MOVE HHMH-FNAME TO NT-FNAME(NAME-IDX)
MOVE HHMH-HHLNAME TO NT-HHLNAME(NAME-IDX)
MOVE HHMH-HHFNAME TO NT-HHFNAME(NAME-IDX)
MOVE HMFH-ID TO NT-HHID(NAME-IDX).
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.

* PERFORM B500-MOVE-NAME-OUTPUT THRU B500-EXIT.

GO TO B201-2-8-NAME.

B201-EXIT.
EXIT.

B202-2-8-SSN.
COMPUTE IDX = IDX + 1.
IF IDX = 8
GO TO B202-EXIT.
MOVE H-2-8 (IDX) TO HHM-FIELDS.

MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HHM-SSN TO HHMH-SSN.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.

* IF HHM-SSN = SPACE
* GO TO B202-EXIT.

IF HHMH-SSN = SI-SSN
MOVE SPACES TO SCREEN-BOTH-OUTPUT
MOVE HHMH-FNAME TO SBO-FNAME
MOVE HHMH-LNAME TO SBO-LNAME
MOVE HHMH-HHFNAME TO SBO-HHFNAME
MOVE HHMH-HHLNAME TO SBO-HHLNAME
MOVE HHMH-SS1 TO SBO-SSN1
MOVE HHMH-SS2 TO SBO-SSN2
MOVE HHMH-SS3 TO SBO-SSN3
MOVE HMFH-ID TO SBO-HHID
PERFORM B501-MOVE-SSN-OUTPUT THRU B501-EXIT.

GO TO B202-2-8-SSN.

B202-EXIT.
EXIT.


B300-9-32.
IF SS-IN = 'N'
PERFORM B301-9-32-NAME THRU B301-EXIT.

IF SS-IN = 'S'
PERFORM B302-9-32-SSN THRU B302-EXIT.

B300-EXIT.
EXIT.

B301-9-32-NAME.
COMPUTE IDX = IDX + 1.
IF IDX = 9
GO TO B301-EXIT.
MOVE H-9-32 (IDX) TO HHM-FIELDS.
IF HHM-LNAME = SPACE
GO TO B301-EXIT.
MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.

IF SI-LNAME = HHMH-LNAME
* MOVE SPACES TO SCREEN-NAME-TABLE
MOVE HHMH-LNAME TO NT-LNAME(NAME-IDX)
MOVE HHMH-FNAME TO NT-FNAME(NAME-IDX)
MOVE HHMH-HHLNAME TO NT-HHLNAME(NAME-IDX)
MOVE HHMH-HHFNAME TO NT-HHFNAME(NAME-IDX)
MOVE HMFH-ID TO NT-HHID(NAME-IDX)
PERFORM B400-SELECTED-NAMES THRU B400-EXIT.

* PERFORM B500-MOVE-NAME-OUTPUT THRU B500-EXIT.

GO TO B301-9-32-NAME.

B301-EXIT.
EXIT.


B302-9-32-SSN.
COMPUTE IDX = IDX + 1.
IF IDX = 9
GO TO B302-EXIT.
MOVE H-9-32 (IDX) TO HHM-FIELDS.

* IF HHM-SSN = SPACES
* GO TO B302-EXIT.

MOVE HHM-FNAME TO HHMH-FNAME.
MOVE HHM-LNAME TO HHMH-LNAME.
MOVE HHM-SSN TO HHMH-SSN.
MOVE HMF-LNAME TO HHMH-HHLNAME.
MOVE HMF-FNAME TO HHMH-HHFNAME.

IF HHMH-SSN = SI-SSN
MOVE SPACES TO SCREEN-BOTH-OUTPUT
MOVE HHMH-FNAME TO SBO-FNAME
MOVE HHMH-LNAME TO SBO-LNAME
MOVE HHMH-HHFNAME TO SBO-HHFNAME
MOVE HHMH-HHLNAME TO SBO-HHLNAME
MOVE HHMH-SSN TO SBO-SSN
MOVE HMFH-ID TO SBO-HHID
PERFORM B501-MOVE-SSN-OUTPUT THRU B501-EXIT.

GO TO B302-9-32-SSN.


B302-EXIT.
EXIT.


B400-SELECTED-NAMES.
* MOVE SPACES TO NT-LNAME,NT-FNAME,NT-HHLNAME,NT-HHFNAME.
* MOVE ZEROS TO NT-HHID.
* PERFORM B401-LOAD-NAME-DATA
* VARYING NAME-CNT FROM 1 BY 1
* UNTIL NAME-CNT = 12


PERFORM B401-LOAD-NAME-DATA
VARYING NAME-CNT FROM 11 BY 1
UNTIL NAME-CNT IS > 11.
* PERFORM B600-DISPLAY-RESULTS THRU B600-EXIT.

B400-EXIT.
EXIT.


B401-LOAD-NAME-DATA.

READ NAMETABLE-FILE
AT END
GO TO B401-EXIT.



PERFORM B600-DISPLAY-RESULTS THRU B600-EXIT.


* MOVE NAME-DATA TO NAMETABLE(NAME-CNT).
* AT END
* MOVE "END" TO END-OF-FILE-INDICATOR.
*

B401-EXIT.
EXIT.


B501-MOVE-SSN-OUTPUT.
IF SCREEN-SSN-OUTPUT-1 NOT = SPACES
IF SCREEN-SSN-OUTPUT-2 NOT = SPACES
IF SCREEN-SSN-OUTPUT-3 NOT = SPACES
IF SCREEN-SSN-OUTPUT-4 NOT = SPACES
IF SCREEN-SSN-OUTPUT-5 NOT = SPACES
IF SCREEN-SSN-OUTPUT-6 NOT = SPACES
IF SCREEN-SSN-OUTPUT-7 NOT = SPACES
IF SCREEN-SSN-OUTPUT-8 NOT = SPACES
DISPLAY "TOO MANY DUPLICATES, CHECK YOUR RECORDS!"
ELSE MOVE SBO-MEMBER TO SSO-8-MEMBER
MOVE SBO-HHLNAME TO SSO-8-HEADLNAME
MOVE SBO-SSN1 TO SSO-8-SSN1
MOVE SBO-SSN2 TO SSO-8-SSN2
MOVE SBO-SSN3 TO SSO-8-SSN3
MOVE SBO-HHID TO SSO-8-HHID
ELSE MOVE SBO-MEMBER TO SSO-7-MEMBER
MOVE SBO-HHLNAME TO SSO-7-HEADLNAME
MOVE SBO-SSN1 TO SSO-7-SSN1
MOVE SBO-SSN2 TO SSO-7-SSN2
MOVE SBO-SSN3 TO SSO-7-SSN3
MOVE SBO-HHID TO SSO-7-HHID
ELSE MOVE SBO-MEMBER TO SSO-6-MEMBER
MOVE SBO-HHLNAME TO SSO-6-HEADLNAME
MOVE SBO-SSN1 TO SSO-6-SSN1
MOVE SBO-SSN2 TO SSO-6-SSN2
MOVE SBO-SSN3 TO SSO-6-SSN3
MOVE SBO-HHID TO SSO-6-HHID
ELSE MOVE SBO-MEMBER TO SSO-5-MEMBER
MOVE SBO-HHLNAME TO SSO-5-HEADLNAME
MOVE SBO-SSN1 TO SSO-5-SSN1
MOVE SBO-SSN2 TO SSO-5-SSN2
MOVE SBO-SSN3 TO SSO-5-SSN3
MOVE SBO-HHID TO SSO-5-HHID
ELSE MOVE SBO-MEMBER TO SSO-4-MEMBER
MOVE SBO-HHLNAME TO SSO-4-HEADLNAME
MOVE SBO-SSN1 TO SSO-4-SSN1
MOVE SBO-SSN2 TO SSO-4-SSN2
MOVE SBO-SSN3 TO SSO-4-SSN3
MOVE SBO-HHID TO SSO-4-HHID
ELSE MOVE SBO-MEMBER TO SSO-3-MEMBER
MOVE SBO-HHLNAME TO SSO-3-HEADLNAME
MOVE SBO-SSN1 TO SSO-3-SSN1
MOVE SBO-SSN2 TO SSO-3-SSN2
MOVE SBO-SSN3 TO SSO-3-SSN3
MOVE SBO-HHID TO SSO-3-HHID
ELSE MOVE SBO-MEMBER TO SSO-2-MEMBER
MOVE SBO-HHLNAME TO SSO-2-HEADLNAME
MOVE SBO-SSN1 TO SSO-2-SSN1
MOVE SBO-SSN2 TO SSO-2-SSN2
MOVE SBO-SSN3 TO SSO-2-SSN3
MOVE SBO-HHID TO SSO-2-HHID
ELSE MOVE SBO-MEMBER TO SSO-1-MEMBER
MOVE SBO-HHLNAME TO SSO-1-HEADLNAME
MOVE SBO-SSN1 TO SSO-1-SSN1
MOVE SBO-SSN2 TO SSO-1-SSN2
MOVE SBO-SSN3 TO SSO-1-SSN3
MOVE SBO-HHID TO SSO-1-HHID
DISPLAY SCREEN-SSN-OUTPUT-1.
B501-EXIT.
EXIT.


B600-DISPLAY-RESULTS.
IF SS-IN = 'N'
PERFORM B601-DISPLAY-NAME THRU B601-EXIT.
IF SS-IN = 'S'
PERFORM B602-DISPLAY-SSN THRU B602-EXIT.
B600-EXIT.
EXIT.


B601-DISPLAY-NAME.

* IF SNO-1-MEMBER = SPACES
* DISPLAY PROCESSING-MESSAGE-NAME-SCREEN
* ACCEPT PROCESSING-MESSAGE-NAME-SCREEN
* ELSE
* IF SNO-1-MEMBER NOT = SPACES

IF NAME-CNT > 11
DISPLAY SCREEN-NAME-OUT
DISPLAY PROCESSING-CONTINUE-SCREEN
* ACCEPT PROCESSING-CONTINUE-SCREEN
ACCEPT SCREEN-NAME-OUT
ELSE
DISPLAY SCREEN-NAME-OUT
ACCEPT SCREEN-NAME-OUT.

IF SNO-IN = "E"
GO TO B601-EXIT.

B601-EXIT.
EXIT.


B602-DISPLAY-SSN.
* IF SSO-1-SSN NOT = SI-SSN
IF SSO-1-SSN = SPACES
DISPLAY PROCESSING-MESSAGE-SSN-SCREEN
ACCEPT PROCESSING-MESSAGE-SSN-SCREEN
ELSE
* IF SSO-1-SSN NOT = SPACES
DISPLAY SCREEN-SSN-OUT
ACCEPT SCREEN-SSN-OUT.


IF SSO-IN = "E"
GO TO B602-EXIT.
* GO TO A100-ACCEPT-MAIN-SEARCH-INPUT.
* CALL "MAIN529A".
* CANCEL "MAIN529A".
* GO TO B602-EXIT.

* IF SSO-1-SSN = SPACES
* DISPLAY PROCESSING-MESSAGE-SSN-SCREEN.


B602-EXIT.
EXIT.



Z000-TERMINATE.
IF SS-IN = 'N'
CLOSE SORT-FILE
HH0932-FILE.
IF SS-IN = 'S'
CLOSE HHMF-FILE
HH0932-FILE.

IF SS-IN = 'E'
GO TO Z000-EXIT.

Z000-EXIT.
EXIT PROGRAM.

 
Bead2,

if possible, don't dump complete sources in here; it makes for very cumbersome reading. If you have a site, post the listing there so people can take a look if they wish.
Besides that, if you don't get compile errors, it's not very likely someone can tell from the source what the problem is. Rather, try and isolate where the problem might occur.

Regards,
Ronald.
 
Where exactly did your error occur? Try and isolate it. What sorts of debugging tools do you have? If necessary, go back to using "test displays" (which is what I used to have to do on my old job for batch jobs because they didn't have any debugging tools for batch).

I'm confused as to why you don't specify an indexed table i.e.
01 NAME-TABLE-DATA.
05 NAME-TABLE OCCURS 300 TIMES
INDEXED BY NAME-IDX.
10 NT-LNAME PIC X(20).
10 NT-FNAME PIC X(14).
10 FILLER PIC X(01).
10 NT-HHLNAME PIC X(20).
10 NT-HHFNAME PIC X(14).
10 FILLER PIC X(01).
10 NT-HHID PIC 9(09).


Then you shouldn't get the sign error message because the "INDEXED BY" should take care of that.

Keep me posted. Nina Too
 
I put the indexed by name-idx like you said, but now I am getting an error
"error accessing file:\fdpsys\tables\data\nametbl.dat
Segment RT: error 013 at cobol pc 1313
Description: file not found (error 13)"
 
Bead2,

so, your original error is taken care of (good one, Nina!), and now you've got a new one. It says "file not found", so either you specifiy the wrong file name, or it's simply not there. Check this, and you're on to the next one ...

Regards,
Ronald.
 
Bead2, I had a huge problem in my last application getting EIBRESP = 12 (File Not Found) in CICS READ FILE commands. And I knew that the file existed (a KSDS VSAM file which I personally had allocated), because we have FILE-AID and I was able to actually see the file and its contents using the BROWSE feature in FILE-AID.

After some debugging, questioning, and research done by me and my project leader, we discovered that in my CICS command, I was giving the wrong name to the file. The file existed, but not with the name I was using in my CICS READ FILE command.

So check the name of your file on both your program and in your file path. Make sure that it's the correct name.

Hope this help, Nina Too
 
I have the correct name and now it is giving an error " Wrong open modeor access mode for read/start" ??? I am now really confused.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top