In article <[log in to unmask]>, [log in to unmask] says... > I am frustrated. How do I link these two subfiles together by PROV#? Any > help/ideas would be appreciated. Thanks! > > > ACC *TOP50Z2.SUBFILE > *W* PowerHouse name for TOP50Z2.SUBFILE is TOP50Z2. > > SHO ITE > > INPUT OUTPUT > TOP50Z2 TYPE SCALE SCALE DEC PICTURE > PROV# CHAR X(12) > RANK CHAR X(3) > > > > ACC *TOP50M.SUBFILE > *W* PowerHouse name for TOP50M.SUBFILE is TOP50M. > > SHO ITE > > INPUT OUTPUT > TOP50M TYPE SCALE SCALE DEC PICTURE > PROV# CHAR X(10) > SERV-CNT NUM 0 0 0 ^^^^^ > AMTPAY NUM 0 0 0 ^,^^^,^^^.^^ > ER-LOC NUM 0 0 0 ^^ > INPAT-LOC NUM 0 0 0 ^^ > OUTPAT-LOC NUM 0 0 0 ^^ > OTHER-LOC NUM 0 0 0 ^^ > XOVR-CNT NUM 0 0 0 ^^ > Here's a tried and true method (which ignores the question of why PROV# is 10 char in one file and 12 char in the other.) ;;Pass 1 ACCESS *TOP50Z2 DEFINE SERV-CNT CHA*10 = "" DEFINE AMTPAY = 0 DEFINE ER-LOC = 0 ... also the other fields in TOP50M SET SUBFILE NAME JUNKFILE REPORT SUMMARY ALL GO ;; Pass 2 ACCESS *TOP50M DEFINE RANK CHA*3 = "" SET SUBFILE NAME JUNKFILE APPEND REPORT SUMMARY PROV# RANK SERV-CNT AMTPAY ER-LOC ... all fields, in the same order as the first pass GO ;; Pass 3 ACCESS *JUNKFILE SORT ON PROV# SET SUBFILE AT PROV# NAME TOP100 REPORT SUMMARY & PROV# & RANK MAXIMUM & SERV-CNT SUBTOTAL & AMTPAY SUBTOTAL & ER-LOC SUBTOTAL ... etc. GO This subfile TOP100 will give you all the items of both files, which I think is why you want to link them. Another method: with version 7.2 & later, you could create an indexed subfile of each, and link the indexes. -- Max Buten Contract Programer in Powerhouse [log in to unmask] 610 664 2301 http://members.home.net/maxbuten/