* UP3SEL.CMD
USE APEXMAIL INDEX MAILZIP
STORE " " TO PASS1
STORE " " TO PASS2
STORE " " TO PASS3
STORE " " TO PASS4
STORE " " TO PASS5
STORE " " TO PASS6
STORE " " TO HOLDER
STORE 1 TO COUNTER
SET FORMAT TO SELECTMN
READ
SET CONSOLE OFF
SET TALK OFF
SET RAW ON
DO PRINTLBL
SET PRINT ON
IF PASS1 = " " .AND. PASS2 = " " .AND. PASS3 = " " .AND. PASS4 = " ";
.AND. PASS5 = " " .AND. PASS6 = " "
SET TALK ON
SET CONSOLE ON
DO PRINTOFF
SET PRINT OFF
SET RAW OFF
RETURN
ENDIF
DO WHILE COUNTER < 7
DO CASE
CASE COUNTER =  1
STORE PASS1 TO HOLDER
CASE COUNTER =  2
STORE PASS2 TO HOLDER
CASE COUNTER =  3
STORE PASS3 TO HOLDER
CASE COUNTER =  4
STORE PASS4 TO HOLDER
CASE COUNTER =  5
STORE PASS5 TO HOLDER
CASE COUNTER =  6
STORE PASS6 TO HOLDER
ENDCASE
IF HOLDER <> " "
STORE T TO GO
DO WHILE GO
STORE "                                " TO AT1
STORE "                                " TO AT2
STORE "                                " TO AT3
STORE "                                " TO NAME1
STORE "                                " TO NAME2
STORE "                                " TO NAME3
STORE "                                " TO ADR1A
STORE "                                " TO ADR1B
STORE "                                " TO ADR2A
STORE "                                " TO ADR2B
STORE "                                " TO ADR3A
STORE "                                " TO ADR3B
STORE "                                " TO LAST1
STORE "                                " TO LAST2
STORE "                                " TO LAST3
IF .NOT. EOF
DO WHILE GROUP <> HOLDER .AND. .NOT. EOF
SKIP
ENDDO
IF GROUP = HOLDER
STORE ATTENTION TO AT1
STORE COMPANY TO NAME1
STORE ADDRESS1 TO ADR1A
STORE ADDRESS2 TO ADR1B
STORE CITY + STATE + "  " + ZIP TO LAST1
        ENDIF
        SKIP
ENDIF
IF .NOT. EOF
DO WHILE GROUP <> HOLDER .AND. .NOT. EOF
SKIP
ENDDO
IF GROUP = HOLDER
STORE ATTENTION TO AT2
STORE COMPANY TO NAME2
STORE ADDRESS1 TO ADR2A
STORE ADDRESS2 TO ADR2B
STORE CITY + STATE + "  " + ZIP TO LAST2
ENDIF
SKIP
ENDIF
IF .NOT. EOF
DO WHILE GROUP <> HOLDER .AND. .NOT. EOF
SKIP
ENDDO
IF GROUP = HOLDER
STORE ATTENTION TO AT3
STORE COMPANY TO NAME3
STORE ADDRESS1 TO ADR3A
STORE ADDRESS2 TO ADR3B
STORE CITY + STATE + "  " + ZIP TO LAST3
ENDIF
SKIP
ENDIF
? AT1,AT2,AT3
? NAME1,NAME2,NAME3
? ADR1A,ADR2A,ADR3A
? ADR1B,ADR2B,ADR3B
? LAST1,LAST2,LAST3
?
IF EOF
STORE F TO GO
GOTO TOP
ENDIF
ENDDO
ENDIF
STORE COUNTER + 1 TO COUNTER
ENDDO
SET PRINT OFF
DO PRINTOFF
SET RAW OFF
SET TALK ON
SET CONSOLE ON
RETURN
