651 lines
17 KiB
Plaintext
Executable File
651 lines
17 KiB
Plaintext
Executable File
* CONVERT.PM.RSM
|
|
*
|
|
* 08/20/99 - CONVERT RSM PM FILE
|
|
*
|
|
$INCLUDE BP.MASTER GEN.COMMON
|
|
$INCLUDE BP.MASTER PM
|
|
*
|
|
OPEN 'PM' TO PM ELSE ABORT
|
|
*OPEN 'PM.TRANS' TO PM.TRANS ELSE ABORT
|
|
*OPEN 'PM.TRANS.RSM' TO PM.TRANS.RSM ELSE ABORT
|
|
OPEN 'PM.AUX' TO PM.AUX ELSE ABORT
|
|
OPEN 'PM.RSM' TO PM.RSM ELSE ABORT
|
|
OPEN 'PM.PLEDGES' TO PM.PLEDGES ELSE ABORT
|
|
OPEN 'PM.PLEDGES.RSM' TO PM.PLEDGES.RSM ELSE ABORT
|
|
OPEN 'GEN.KEYS' TO GEN.KEYS ELSE ABORT
|
|
OPEN 'GEN.KEYS.RSM' TO GEN.KEYS.RSM ELSE ABORT
|
|
OPEN 'NOTES.FILE' TO NOTES.FILE ELSE ABORT
|
|
OPEN 'NOTES.FILE.RSM' TO NOTES.FILE.RSM ELSE ABORT
|
|
OPEN 'PM.COMBINED' TO PM.COMBINED ELSE ABORT
|
|
OPEN 'EVENT.FILE' TO EVENT.FILE ELSE ABORT
|
|
OPEN 'EVENT.FILE.RSM' TO EVENT.FILE.RSM ELSE ABORT
|
|
OPEN 'FUND.FILE' TO FUND.FILE ELSE ABORT
|
|
OPEN 'FUND.FILE.RSM' TO FUND.FILE.RSM ELSE ABORT
|
|
OPEN 'TITLE' TO TITLE ELSE ABORT
|
|
OPEN 'TITLE.RSM' TO TITLE.RSM ELSE ABORT
|
|
OPEN 'STATUS.CODES' TO STATUS.CODES ELSE ABORT
|
|
OPEN 'STATUS.CODES.RSM' TO STATUS.CODES.RSM ELSE ABORT
|
|
OPEN 'CONVERT.PM.RSM.MESSAGE' TO MESSAGE.FILE ELSE ABORT
|
|
OPEN 'EMPLOYER.MASTER' TO EMPLOYER.MASTER ELSE ABORT
|
|
OPEN 'EMPLOYER.MASTER.RSM' TO EMPLOYER.MASTER.RSM ELSE ABORT
|
|
OPEN 'PM.JOURNAL' TO PM.JOURNAL ELSE ABORT
|
|
OPEN 'PM.JOURNAL.RSM' TO PM.JOURNAL.RSM ELSE ABORT
|
|
OPEN 'SG' TO SG ELSE ABORT
|
|
OPEN 'SG.RSM' TO SG.RSM ELSE ABORT
|
|
OPEN 'SG.MOVEMENT' TO SG.MOVEMENT ELSE ABORT
|
|
OPEN 'SG.MOVEMENT.RSM' TO SG.MOVEMENT.RSM ELSE ABORT
|
|
*
|
|
*
|
|
MSG.COUNT=0
|
|
HIGHNUM=0
|
|
KEY=''
|
|
STIME=TIME()
|
|
TOTAL.ARRAY=''
|
|
TOTAL.ARRAY<01,01>=0 ; TOTAL.ARRAY<02,01>='PM Records Read'
|
|
TOTAL.ARRAY<01,02>=0 ; TOTAL.ARRAY<02,02>='Combined Records'
|
|
TOTAL.ARRAY<01,03>=0 ; TOTAL.ARRAY<02,03>='PM Records Written'
|
|
TOTAL.ARRAY<01,04>=0 ; TOTAL.ARRAY<02,04>='Notes Records Converted'
|
|
TOTAL.ARRAY<01,05>=0 ; TOTAL.ARRAY<02,05>='New Notes Created Comments'
|
|
TOTAL.ARRAY<01,06>=0 ; TOTAL.ARRAY<02,06>='Note Records Not Converted'
|
|
TOTAL.ARRAY<01,07>=0 ; TOTAL.ARRAY<02,07>='Event Records Converted'
|
|
TOTAL.ARRAY<01,08>=0 ; TOTAL.ARRAY<02,08>='Fund Record Converted'
|
|
TOTAL.ARRAY<01,09>=0 ; TOTAL.ARRAY<02,09>='Pledge Records Converted'
|
|
TOTAL.ARRAY<01,10>=0 ; TOTAL.ARRAY<02,10>='Pledge Records Skipped'
|
|
TOTAL.ARRAY<01,11>=0 ; TOTAL.ARRAY<02,11>='Title Codes Converted'
|
|
TOTAL.ARRAY<01,12>=0 ; TOTAL.ARRAY<02,12>='Status Codes Converted'
|
|
TOTAL.ARRAY<01,13>=0 ; TOTAL.ARRAY<02,13>='Employer Master Records Converted'
|
|
TOTAL.ARRAY<01,14>=0 ; TOTAL.ARRAY<02,14>='Journal Records Converted'
|
|
TOTAL.ARRAY<01,15>=0 ; TOTAL.ARRAY<02,15>='Journal Records Skipped'
|
|
*
|
|
TOTAL.ARRAY<01,19>=0 ; TOTAL.ARRAY<02,19>='Message Log Entries'
|
|
TOTAL.ARRAY<01,20>=0 ; TOTAL.ARRAY<02,20>='Highest PM Number'
|
|
TTRANSIN=0
|
|
CDATE=DATE()
|
|
*
|
|
CRT CS
|
|
CRT @(0,4):"Enter 'Y' to clear PM file and convert RSM: ":
|
|
ANS=''
|
|
INPUT ANS
|
|
IF ANS # 'Y' THEN STOP
|
|
*
|
|
CRT @(0,22):CL:BEEP:"NOW CLEARING FILES - PLEASE WAIT!!!"
|
|
*
|
|
CLEARFILE NOTES.FILE ;* TEMP
|
|
CLEARFILE PM
|
|
CLEARFILE PM.AUX
|
|
CLEARFILE NOTES.FILE
|
|
CLEARFILE PM.COMBINED
|
|
*CLEARFILE EVENT.FILE ;* DO NOT CLEAR-SAVE 3 INITIAL EVENT DEF CODES
|
|
CLEARFILE FUND.FILE
|
|
CLEARFILE PM.PLEDGES
|
|
CLEARFILE MESSAGE.FILE
|
|
CLEARFILE STATUS.CODES
|
|
CLEARFILE TITLE
|
|
CLEARFILE EMPLOYER.MASTER
|
|
CLEARFILE SG
|
|
CLEARFILE SG.MOVEMENT
|
|
*
|
|
*CLEARFILE PM.TRANS
|
|
WRITE 'NEW' ON GEN.KEYS,"CONVERT.PM.RSM"
|
|
*
|
|
CRT @(0,22):CL
|
|
*
|
|
SELECT FUND.FILE.RSM
|
|
50 READNEXT FUNDKEY THEN
|
|
READ FUNDREC FROM FUND.FILE.RSM,FUNDKEY THEN
|
|
WRITE FUNDREC ON FUND.FILE,FUNDKEY
|
|
TOTAL.ARRAY<1,8>=TOTAL.ARRAY<1,8>+1
|
|
END
|
|
GO 50
|
|
END
|
|
GOSUB 1000
|
|
*
|
|
SELECT EVENT.FILE.RSM
|
|
75 READNEXT EVENTKEY THEN
|
|
READ EVENTREC FROM EVENT.FILE.RSM,EVENTKEY THEN
|
|
IF REM(TOTAL.ARRAY<1,7>,500)=0 THEN GOSUB 1000
|
|
*
|
|
* ABS 04-13-98 three fields that need to be changed.
|
|
*
|
|
* EVENTREC<24>=EVENTREC<20> ; EVENTREC<20>=""
|
|
* EVENTREC<25>=EVENTREC<21> ; EVENTREC<21>=""
|
|
* EVENTREC<26>=EVENTREC<22> ; EVENTREC<22>=""
|
|
*
|
|
WRITE EVENTREC ON EVENT.FILE,EVENTKEY
|
|
TOTAL.ARRAY<1,7>=TOTAL.ARRAY<1,7>+1
|
|
END
|
|
GO 75
|
|
END
|
|
GOSUB 1000
|
|
*
|
|
SELECT TITLE.RSM
|
|
85 READNEXT TITLEKEY THEN
|
|
READ TITLEREC FROM TITLE.RSM,TITLEKEY THEN
|
|
WRITE TITLEREC ON TITLE,TITLEKEY
|
|
TOTAL.ARRAY<1,11>=TOTAL.ARRAY<1,11>+1
|
|
END
|
|
GO 85
|
|
END
|
|
READ TITLEREC FROM GEN.KEYS.RSM,"TITLE" THEN
|
|
WRITE TITLEREC ON GEN.KEYS,"TITLE"
|
|
END ELSE
|
|
MSG='GEN.KEYS TITLE RECORD MISSING'
|
|
END
|
|
GOSUB 1000
|
|
*
|
|
SELECT STATUS.CODES.RSM
|
|
90 READNEXT STAKEY THEN
|
|
READ STAREC FROM STATUS.CODES.RSM,STAKEY THEN
|
|
WRITE STAREC ON STATUS.CODES,STAKEY
|
|
TOTAL.ARRAY<1,12>=TOTAL.ARRAY<1,12>+1
|
|
END
|
|
GO 90
|
|
END
|
|
GOSUB 1000
|
|
*
|
|
*
|
|
SELECT SG.RSM
|
|
92 READNEXT SGKEY THEN
|
|
READ SGREC FROM SG.RSM,SGKEY THEN
|
|
WRITE SGREC ON SG,SGKEY
|
|
END
|
|
GO 92
|
|
END
|
|
GOSUB 1000
|
|
*
|
|
SELECT SG.MOVEMENT.RSM
|
|
94 READNEXT SGKEY THEN
|
|
READ SGREC FROM SG.MOVEMENT.RSM,SGKEY THEN
|
|
WRITE SGREC ON SG.MOVEMENT,SGKEY
|
|
END
|
|
GO 94
|
|
END
|
|
GOSUB 1000
|
|
*
|
|
*
|
|
999 *
|
|
*EXECUTE 'SELECT PM "6781792.1"' ;* TEMP
|
|
SELECT PM.RSM ;* TEMP
|
|
100 READNEXT KEY ELSE GO 200
|
|
READ OREC FROM PM.RSM,KEY ELSE GO 100
|
|
IF REM(TOTAL.ARRAY<1,1>,2000)=0 THEN GOSUB 1000
|
|
*IF TOTAL.ARRAY<1,1> > 2000 THEN GO 199
|
|
TOTAL.ARRAY<1,1>=TOTAL.ARRAY<1,1>+1
|
|
LOCATE("95",OREC,PM$STATUS;FND) THEN
|
|
TOTAL.ARRAY<1,2>=TOTAL.ARRAY<1,2>+1
|
|
WRITE OREC ON PM.COMBINED,KEY
|
|
GO 100
|
|
END
|
|
PMREC=''
|
|
PMAUX=''
|
|
PMKEY=KEY
|
|
WK=OCONV(PMKEY,"G0.1")
|
|
IF WK > HIGHNUM THEN
|
|
TOTAL.ARRAY<1,20>=WK ; HIGHNUM=WK
|
|
END
|
|
PMREC<PM$TITLE>=OREC<PM$TITLE>
|
|
PMREC<PM$FNAME>=OREC<PM$FNAME>
|
|
PMREC<PM$SALUTATION>=OREC<PM$SALUTATION>
|
|
PMREC<PM$MNAME>=OREC<PM$MNAME>
|
|
PMREC<PM$LNAME>=OREC<PM$LNAME>
|
|
PMREC<PM$ADDR1>=OREC<PM$ADDR1>
|
|
PMREC<PM$CITY>=OREC<PM$CITY>
|
|
PMREC<PM$STATE>=OREC<PM$STATE>
|
|
PMREC<PM$ZIP>=OREC<PM$ZIP>
|
|
IF OREC<PM$PHONE> # '' THEN
|
|
PMREC<PM$PHONE>=OREC<PM$PHONE>:'|H'
|
|
END
|
|
PMREC<PM$STATUS>=OREC<PM$STATUS>
|
|
PMREC<PM$SEGMENT>=OREC<PM$SEGMENT>
|
|
PMREC<PM$SEG.DATE>=OREC<PM$SEG.DATE>
|
|
PMREC<PM$ORIGIN>=OREC<PM$ORIGIN>
|
|
PMREC<PM$ORI.DATE>=OREC<PM$ORI.DATE>
|
|
IF OREC<16> # '' THEN
|
|
LAST.NOTE=OREC<PM$LAST.NOTE>
|
|
IF LAST.NOTE='' THEN LAST.NOTE=0
|
|
LAST.NOTE=LAST.NOTE+1
|
|
PMREC<PM$LAST.NOTE>=1
|
|
OREC<PM$LAST.NOTE>=LAST.NOTE ;* ADD ONE TO LAST.NOTE FIELD
|
|
NOTEREC=''
|
|
NOTEREC<1>=CDATE
|
|
NOTEREC<3>=OREC<16>
|
|
NOTEREC<6>='99999 - ROOT SYSADMIN'
|
|
NOTEREC<7>='CNV'
|
|
NOTEREC<8>='GEN'
|
|
WRITE NOTEREC ON NOTES.FILE,PMKEY:"*":LAST.NOTE
|
|
TOTAL.ARRAY<1,5>=TOTAL.ARRAY<1,5>+1
|
|
END
|
|
PMREC<PM$ENTRY.OPERATOR>=OREC<PM$ENTRY.OPERATOR>
|
|
PMREC<PM$ADDR2>=OREC<PM$ADDR2>
|
|
PMREC<PM$ADDR3>=OREC<PM$ADDR3>
|
|
PMREC<PM$ADI>=OREC<PM$ADI>
|
|
PMREC<PM$SUFFIX>=OREC<PM$SUFFIX>
|
|
PMREC<PM$FAMILY.TITLE>=OREC<PM$FAMILY.TITLE>
|
|
PMREC<PM$FAMILY.SALUTATION>=OREC<PM$FAMILY.SALUTATION>
|
|
PMREC<PM$LAST.CHANGE>=OREC<PM$LAST.CHANGE>
|
|
PMREC<PM$SUBSCRIPTION>=OREC<PM$SUBSCRIPTION>
|
|
IF PMREC<PM$ZIP>='00000' THEN
|
|
PMREC<PM$ZIP>=''
|
|
PMREC<PM$GEO.CODE>='FOR'
|
|
END
|
|
IF PMREC<PM$ZIP>[1,3] MATCHES "1A0N1A" THEN
|
|
PMREC<PM$GEO.CODE>='CAN' ;*SPA* set Canadian GEO Code
|
|
PMREC<PM$COUNTRY>='CANADA'
|
|
END ELSE
|
|
IF PMREC<PM$ZIP>[1,5] MATCHES "5N" THEN
|
|
PMREC<PM$GEO.CODE>='USA'
|
|
END
|
|
END
|
|
*
|
|
PMREC<PM$HIGHEST.GIFT.DATE>=OREC<PM$HIGHEST.GIFT.DATE>
|
|
PMREC<PM$HIGHEST.GIFT.AMOUNT>=OREC<PM$HIGHEST.GIFT.AMOUNT>
|
|
PMREC<PM$AVG.GIFT>=OREC<PM$AVG.GIFT>
|
|
*
|
|
CT5=DCOUNT(OREC<PM$YEAR>,VM)
|
|
FOR XXX = 1 TO CT5
|
|
NEWYEAR='19':OREC<PM$YEAR,XXX>
|
|
PMREC<PM$YEAR,XXX>=NEWYEAR
|
|
PMREC<PM$SUM.DED,XXX>=OREC<PM$SUM.DED,XXX>
|
|
PMREC<PM$SUM.NON,XXX>=OREC<PM$SUM.NON,XXX>
|
|
NEXT XXX
|
|
*
|
|
PMREC<PM$SPOUSE>=OREC<PM$SPOUSE>
|
|
PMREC<PM$CANADA.RECEIPTS>=OREC<PM$CANADA.RECEIPTS>
|
|
PMREC<PM$SOC.SEC.NUM>=OREC<PM$SOC.SEC.NUM>
|
|
*
|
|
PMREC<PM$PLEDGE.COUNT>=OREC<PM$PLEDGE.COUNT>
|
|
PMREC<PM$AUDIT.RECORD>=OREC<PM$AUDIT.RECORD>
|
|
PMREC<PM$COMBINED.PARTNERS>=OREC<PM$COMBINED.PARTNERS>
|
|
*
|
|
*
|
|
* *PMREC<PM$ORDER.NUMBERS>=OREC<PM$ORDER.NUMBERS>
|
|
* *
|
|
* PMREC<PM$SHIP.ADDR>=OREC<PM$SHIP.ADDR> ;* NEED POST CONV CLEANUP
|
|
*
|
|
IF OREC<43> # '' THEN ;* CCC.RSV.FLAG
|
|
PMAUX<2>=OREC<43>
|
|
END
|
|
*
|
|
IF OREC<44> # '' THEN ;* CDIVISION.CODE
|
|
PMAUX<3>=OREC<44>
|
|
END
|
|
*
|
|
IF OREC<45> # '' THEN ;* AREA.CODE
|
|
PMAUX<4>=OREC<45>
|
|
END
|
|
*
|
|
IF OREC<46> # '' THEN ;* VOL FLAG
|
|
PMAUX<5>=OREC<46>
|
|
END
|
|
*
|
|
IF OREC<47> # '' THEN ;* VOL CODE
|
|
PMAUX<6>=OREC<47>
|
|
END
|
|
*
|
|
IF OREC<48> # '' THEN ;* LOCAL EAGLES CLUB
|
|
PMAUX<7>=OREC<48>
|
|
END
|
|
*
|
|
IF OREC<49> # '' THEN ;* INS FLAG
|
|
PMAUX<8>=OREC<49>
|
|
END
|
|
*
|
|
IF OREC<50> # '' THEN ;* ATT AREA EVENT
|
|
PMAUX<9>=OREC<50>
|
|
END
|
|
*
|
|
IF OREC<51> # '' THEN ;* ACT VOL
|
|
PMAUX<10>=OREC<51>
|
|
END
|
|
*
|
|
IF OREC<52> # '' THEN ;* PLEDGE TERMS
|
|
PMAUX<11>=OREC<52>
|
|
END
|
|
*
|
|
IF OREC<53> # '' THEN ;* AFFL RANK
|
|
PMAUX<12>=OREC<53>
|
|
END
|
|
*
|
|
IF OREC<54> # '' THEN ;* BIG DONOE RANK
|
|
PMAUX<13>=OREC<54>
|
|
END
|
|
*
|
|
IF OREC<55> # '' THEN ;* BIG DONOR SCORE
|
|
PMAUX<14>=OREC<55>
|
|
END
|
|
*
|
|
IF OREC<56> # '' THEN ;* CLSTR CODE
|
|
PMAUX<15>=OREC<56>
|
|
END
|
|
*
|
|
IF OREC<57> # '' THEN ;* SESI
|
|
PMAUX<16>=OREC<57>
|
|
END
|
|
*
|
|
* IF OREC<43> # '' THEN ;* BIRTHDATE
|
|
* PMREC<PM$RSM.BIRTHDATE>=OREC<43>
|
|
* END
|
|
*
|
|
* IF OREC<44> # '' THEN ;* MAR STATUS
|
|
* PMREC<PM$RSM.MARITAL.STATUS>=OREC<44>
|
|
* END
|
|
* *
|
|
* IF OREC<45> # '' THEN ;* HUSBAND OCC
|
|
* PMREC<PM$RSM.HUSBAND.OCC>= OREC<45>
|
|
* END
|
|
* *
|
|
* IF OREC<46> # '' THEN ;* WIFE OCC
|
|
* PMREC<PM$RSM.WIFE.OCC>=OREC<46>
|
|
* END
|
|
* *
|
|
* IF OREC<47> # '' THEN ;* LIFT CANDIDATE
|
|
* PMREC<PM$RSM.LIFT.CANDIDATE>=OREC<47>
|
|
* END
|
|
* IF OREC<48> # '' THEN ;* LINKED ACCOUNT
|
|
* PMREC<PM$RSM.LINKED.ACCOUNT>=OREC<48>
|
|
* END
|
|
* IF OREC<49> # '' THEN ;* VISIT 1
|
|
* PMREC<PM$RSM.VISIT1>=OREC<49>
|
|
* END
|
|
* IF OREC<50> # '' THEN ;* PLANNED PROSPECT
|
|
* PMREC<PM$RSM.PLANNED.PROSPECT>=OREC<50>
|
|
* END
|
|
* IF OREC<51> # '' THEN ;* AMMIVERSARY DATE
|
|
* PMREC<PM$RSM.ANN.DATE>=OREC<51>
|
|
* END
|
|
* IF OREC<52> # '' THEN ;* VISIT 2
|
|
* PMREC<PM$RSM.VISIT2>=OREC<52>
|
|
* END
|
|
* IF OREC<53> # '' THEN ;* VISIT 3
|
|
* PMREC<PM$RSM.VISIT3>=OREC<53>
|
|
* END
|
|
* IF OREC<54> # '' THEN ;* VISIT 4
|
|
* PMREC<PM$RSM.VISIT4>=OREC<54> ;* VISIT 4
|
|
* END
|
|
* IF OREC<55> # '' THEN ;* VISIT 5
|
|
* PMREC<PM$RSM.VISIT5>=OREC<55>
|
|
* END
|
|
* IF OREC<56> # '' THEN ;* VISIT 6
|
|
* PMREC<PM$RSM.VISIT6>=OREC<56>
|
|
* END
|
|
*
|
|
IF OREC<PM$LAST.NOTE> # '' THEN
|
|
PMREC<PM$LAST.NOTE>=OREC<PM$LAST.NOTE>
|
|
END
|
|
*
|
|
IF OREC<PM$FOLLOWUP.DATE> # '' THEN
|
|
PMREC<PM$FOLLOWUP.DATE>=OREC<PM$FOLLOWUP.DATE>
|
|
END
|
|
*
|
|
IF OREC<PM$RADIO.CALL.LETTERS> # '' THEN
|
|
PMREC<PM$RADIO.CALL.LETTERS>=OREC<PM$RADIO.CALL.LETTERS>
|
|
END
|
|
*
|
|
IF OREC<64> # '' THEN ;* PLEDGE TERMS TEXT
|
|
PMAUX<17>=OREC<64>
|
|
END
|
|
*
|
|
IF OREC<65> # '' THEN ;* AGE RANGE
|
|
PMAUX<18>=OREC<65>
|
|
END
|
|
*
|
|
* IF OREC<PM$SHIP.ADDR> # '' THEN
|
|
* PMREC<PM$SHIP.ADDR>=OREC<PM$SHIP.ADDR>
|
|
* MSG='NEED TO FIX SHIP ADDRESS'
|
|
* GOSUB 3000
|
|
* END
|
|
* *
|
|
* IF OREC<63> # '' THEN ;* SPOUSE BIRTHDAY
|
|
* PMREC<PM$RSM.WIFE.BIRTH>=OREC<63>
|
|
* END
|
|
*
|
|
*
|
|
IF OREC<67> = '' OR OREC<67> = 0 ELSE ;* ORDER BALANCE
|
|
PMAUX<18>=OREC<PM$BALANCE>
|
|
END
|
|
*
|
|
IF OREC<91> # '' THEN ;* ADDRESS VERIFY CODE
|
|
PMAUX<19>=OREC<91>
|
|
END
|
|
*
|
|
* IF OREC<68> # '' THEN ;* USING TAX FIELD FOR TRAN CT FOR RSM
|
|
* PMREC<PM$TAX>=OREC<68>
|
|
* END
|
|
* IF OREC<PM$TAX.ID> # '' THEN ;* TAX ID
|
|
* PMREC<PM$TAX.ID>=OREC<PM$TAX.ID>
|
|
* END
|
|
* IF OREC<PM$CONTACT.NAME> # '' THEN
|
|
* PMREC<PM$CONTACT.NAME>=OREC<PM$CONTACT.NAME>
|
|
* END
|
|
* IF OREC<PM$PO.REQUIRED> # '' THEN
|
|
* PMREC<PM$PO.REQUIRED>=OREC<PM$PO.REQUIRED>
|
|
* END
|
|
* IF OREC<PM$CC.TYPE> # '' THEN
|
|
* PMREC<PM$CC.TYPE>=OREC<PM$CC.TYPE>
|
|
* END
|
|
* IF OREC<PM$CC.NUM> # '' THEN
|
|
* PMREC<PM$CC.NUM>=OREC<PM$CC.NUM>
|
|
* END
|
|
* IF OREC<PM$CC.EXPIRE> # '' THEN
|
|
* PMREC<PM$CC.EXPIRE>=OREC<PM$CC.EXPIRE>
|
|
* END
|
|
* IF OREC<PM$CC.NAME> # '' THEN
|
|
* PMREC<PM$CC.NAME>=OREC<PM$CC.NAME>
|
|
* END
|
|
* IF OREC<PM$CREDIT.RATE> # '' THEN
|
|
* PMREC<PM$CREDIT.RATE>=OREC<PM$CREDIT.RATE>
|
|
* END
|
|
* IF OREC<PM$CREDIT.LIMIT> # '' THEN
|
|
* PMREC<PM$CREDIT.LIMIT>=OREC<PM$CREDIT.LIMIT>
|
|
* END
|
|
* IF OREC<PM$PAYMENT.TERMS> # '' THEN
|
|
* PMREC<PM$PAYMENT.TERMS>=OREC<PM$PAYMENT.TERMS>
|
|
* END
|
|
* IF OREC<PM$SHIP.MODE> # '' THEN
|
|
* PMREC<PM$SHIP.MODE>=OREC<PM$SHIP.MODE>
|
|
* END
|
|
* IF OREC<PM$SOURCE.SALE> # '' THEN
|
|
* PMREC<PM$SOURCE.SALE>=OREC<PM$SOURCE.SALE>
|
|
* END
|
|
* IF OREC<PM$PRICE.CLASS> # '' THEN
|
|
* PMREC<PM$PRICE.CLASS>=OREC<PM$PRICE.CLASS>
|
|
* END
|
|
* IF OREC<PM$CREDIT.FUNDS> # '' THEN
|
|
* PMREC<PM$CREDIT.FUNDS>=OREC<PM$CREDIT.FUNDS>
|
|
* END
|
|
* IF OREC<PM$LAST.STATEMENT> # '' THEN
|
|
* PMREC<PM$LAST.STATEMENT>=OREC<PM$LAST.STATEMENT>
|
|
* END
|
|
* *
|
|
* IF OREC<36> # '' THEN ;* RSM TV CALL LETTERS
|
|
* PMREC<36>=OREC<36>
|
|
* END
|
|
* *
|
|
* * MOVED RSM'S LIFETIME FIELDS TO CMS HIGHEST FIELDS
|
|
* *
|
|
* *IF OREC<64> # '' THEN ;* RSM LIFE TIME HIGH GIFT
|
|
* * PMREC<45>=OREC<64>
|
|
* *END
|
|
* *IF OREC<65> # '' THEN ;* RSM LIFE TIME HIGH DATE
|
|
* * PMREC<46>=OREC<65>
|
|
* *END
|
|
* *
|
|
* IF OREC<66> # '' THEN ;* RSM CUMULATIVE GIVING
|
|
* PMREC<47>=OREC<66>
|
|
* END
|
|
* IF OREC<68> # '' THEN ;* RSM TRAN CT FOR HPC
|
|
* PMREC<48>=OREC<68>
|
|
* END
|
|
* IF OREC<85> # '' THEN ;* RSM BATCH NUMBER '91' WAS SET
|
|
* PMREC<49>=OREC<85>
|
|
* END
|
|
* IF OREC<86> # '' THEN ;* RSM TAG NAME STATE 1
|
|
* PMREC<50>=OREC<86>
|
|
* END
|
|
* IF OREC<87> # '' THEN ;* RSM TAG NAME STATE 2
|
|
* PMREC<51>=OREC<87>
|
|
* END
|
|
* *
|
|
* * REVERSE RSM'S LAST TRANS AMOUNT AND DATE
|
|
* IF OREC<88> # '' THEN ;* RSM LAST TRANS AMOUNT
|
|
* PMREC<89>=OREC<88>
|
|
* END
|
|
* IF OREC<89> # '' THEN ;* RSM LAST TRANS DATE
|
|
* PMREC<88>=OREC<89>
|
|
* END
|
|
* *
|
|
* * PER PAT MICHELSEN - DO NOT CONVERT OLD STATUS DATES
|
|
* *IF OREC<90> # '' THEN ;* RSM STATUS CODE DATES
|
|
* * PMREC<52>=OREC<90>
|
|
* *END
|
|
* *
|
|
* *
|
|
* * REST OF FIELDS NEED TO BE REVIEWED
|
|
* *
|
|
* * CONVERT EMPLOYER.MASTER RECORD (CONTAINS WORK NUM AND OTHER NEW PM FIELDS)
|
|
* *
|
|
* READ EMPREC FROM EMPLOYER.MASTER.RSM,PMKEY THEN
|
|
* IF EMPREC<3>#'' THEN
|
|
* PMREC<PM$EMAIL>=EMPREC<3>:"|M" ;* e-mail address
|
|
* EMPREC<3>=''
|
|
* END
|
|
* IF EMPREC<4>#'' THEN
|
|
* PMREC=INSERT(PMREC,PM$PHONE,-1;EMPREC<4>:"|F") ;* fax number
|
|
* EMPREC<4>=''
|
|
* END
|
|
* IF EMPREC<6>#'' THEN
|
|
* PMREC=INSERT(PMREC,PM$PHONE,-1;EMPREC<6>:"|W") ;* work number
|
|
* EMPREC<6>=''
|
|
* END
|
|
* IF EMPREC<7>#'' THEN
|
|
* PMREC=INSERT(PMREC,PM$PHONE,-1;EMPREC<7>:"|X") ;* extension
|
|
* EMPREC<7>=''
|
|
* END
|
|
* WRITE EMPREC ON EMPLOYER.MASTER,PMKEY
|
|
* TOTAL.ARRAY<1,13>=TOTAL.ARRAY<1,13>+1
|
|
* END
|
|
*
|
|
TOTAL.ARRAY<1,3>=TOTAL.ARRAY<1,3>+1
|
|
*
|
|
WRITE PMREC ON PM,PMKEY
|
|
WRITE PMAUX ON PM.AUX,PMKEY
|
|
GO 100
|
|
199 *
|
|
*
|
|
*GO 299
|
|
200 * CONVERT NOTES FILE
|
|
*STOP ;* TEMP
|
|
SELECT NOTES.FILE.RSM
|
|
210 *
|
|
READNEXT NOTEKEY ELSE GO 299
|
|
READ OLDNOTE FROM NOTES.FILE.RSM,NOTEKEY ELSE GO 210
|
|
IF REM(TOTAL.ARRAY<1,4>,250)=0 THEN GOSUB 1000
|
|
PMKEY=OCONV(NOTEKEY,"G0*1")
|
|
READ PMREC FROM PM,PMKEY THEN
|
|
READV NOTENUM FROM PM.RSM,PMKEY,PM$LAST.NOTE ELSE ABORT
|
|
TOTAL.ARRAY<1,4>=TOTAL.ARRAY<1,4>+1
|
|
* PMREC<PM$LAST.NOTE>=PMREC<PM$LAST.NOTE>-1
|
|
PMREC<PM$LAST.NOTE>=NOTENUM
|
|
WRITE PMREC ON PM,PMKEY
|
|
NOTEREC=OLDNOTE
|
|
IF NOTEREC<6>='' THEN
|
|
NOTEREC<6>='99999 - SYSADMIN ROOT'
|
|
NOTEREC<7>='CNV'
|
|
NOTEREC<8>='GEN'
|
|
END ELSE
|
|
NOTEREC<9>=OLDNOTE<5>
|
|
NOTEREC<5>=''
|
|
END
|
|
* NOTEKEY=PMKEY:"*":PMREC<PM$LAST.NOTE>
|
|
WRITE NOTEREC ON NOTES.FILE,NOTEKEY
|
|
END ELSE
|
|
TOTAL.ARRAY<1,6>=TOTAL.ARRAY<1,6>+1
|
|
END
|
|
GO 210
|
|
299 *
|
|
* STOP ;* TEMP
|
|
*
|
|
* 300 * CONVERT PM.TRANS
|
|
* SELECT PM.TRANS.RSM
|
|
* 310 READNEXT TRKEY THEN
|
|
* READ TRREC FROM PM.TRANS.RSM,TRKEY THEN
|
|
* IF REM(TTRANSIN,500)=0 THEN GOSUB 1000
|
|
* TTRANSIN=TTRANSIN+1
|
|
* READ PMREC FROM PM,TRKEY THEN
|
|
* NEWTR=''
|
|
* NEWTR=TRREC
|
|
* WRITE NEWTR ON PM.TRANS,TRKEY
|
|
* TTRANS=TTRANS+1
|
|
* END
|
|
* END
|
|
* GO 310
|
|
* END
|
|
*
|
|
400 * CONVERT PM.PLEDGES
|
|
SELECT PM.PLEDGES.RSM
|
|
410 READNEXT PGKEY THEN
|
|
READ PGREC FROM PM.PLEDGES.RSM,PGKEY THEN
|
|
READ PMREC FROM PM,PGKEY THEN
|
|
IF REM(TOTAL.ARRAY<1,9>,250)=0 THEN GOSUB 1000
|
|
TOTAL.ARRAY<1,9>=TOTAL.ARRAY<1,9>+1
|
|
WRITE PGREC ON PM.PLEDGES,PGKEY
|
|
END ELSE
|
|
TOTAL.ARRAY<1,10>=TOTAL.ARRAY<1,10>+1
|
|
END
|
|
END
|
|
GO 410
|
|
END
|
|
*
|
|
500 * CONVERT PM.JOURNAL
|
|
SELECT PM.JOURNAL.RSM
|
|
510 READNEXT JRKEY THEN
|
|
READ JREC FROM PM.JOURNAL.RSM,JRKEY THEN
|
|
READ PMREC FROM PM,JRKEY THEN
|
|
IF REM(TOTAL.ARRAY<1,14>,250)=0 THEN GOSUB 1000
|
|
TOTAL.ARRAY<1,14>=TOTAL.ARRAY<1,14>+1
|
|
WRITE JREC ON PM.JOURNAL,JRKEY
|
|
END ELSE
|
|
TOTAL.ARRAY<1,15>=TOTAL.ARRAY<1,15>+1
|
|
END
|
|
END
|
|
GO 510
|
|
END
|
|
*
|
|
GO 2000
|
|
*
|
|
*
|
|
1000 *
|
|
GKREC=''
|
|
CTIME=TIME()
|
|
DTIME=STIME-CTIME
|
|
GKREC<1>='STARTED: ':OCONV(STIME,"MTH")
|
|
GKREC<2>='FINISH : ':OCONV(CTIME,"MTH")
|
|
GKREC<3>='RUN TIME: ':OCONV(DTIME,"MTS")
|
|
LNNUM=5
|
|
DISP=0
|
|
FOR TT = 1 TO 20
|
|
WK=TOTAL.ARRAY<1,TT>'L#8':' ':TOTAL.ARRAY<2,TT>
|
|
GKREC<4+TT>=WK
|
|
NEXT TT
|
|
WRITE GKREC ON GEN.KEYS,"CONVERT.PM.RSM"
|
|
FOR TT = 1 TO 24
|
|
IF REM(TT,13)=0 THEN DISP=40 ; LNNUM=5
|
|
CRT @(0+DISP,LNNUM):GKREC<TT>'L#40'
|
|
LNNUM=LNNUM+1
|
|
NEXT TT
|
|
RETURN
|
|
*
|
|
2000 *
|
|
GOSUB 1000
|
|
STOP
|
|
*
|
|
3000 * WRITE TO MESSAGE.FILE
|
|
MSG.COUNT=MSG.COUNT+1
|
|
MSGLN=KEY'L#12':" ":MSG
|
|
WRITE MSGLN ON MESSAGE.FILE,MSG.COUNT'R%5'
|
|
RETURN
|
|
*
|
|
4000 * ADD TO DEMOG FIELDS
|
|
*
|
|
RETURN
|