tldm-universe/CMS/BP.CNV/CMSD.SUB.CONV

56 lines
1.5 KiB
Plaintext
Raw Normal View History

2024-09-10 19:25:06 +00:00
* CMSD.SUB.CONV
* AUTHOR: STEVEN ADAMS
* DATE: 10/11/95
* PURPOSE: TO CONVERT OLD REL8.5 SUBSCRIPTION IDS TO NEW IDS
*
$INCLUDE BP.MASTER PM
$INCLUDE BP.MASTER PM.SUBSCRIPTION
*
OPEN 'PM.SUBSCRIPTIONS' TO PM.SUBSCRIPTIONS ELSE ABORT
OPEN 'GEN.KEYS' TO GEN.KEYS ELSE ABORT
OPEN 'PM' TO PM ELSE ABORT
*
CRT @(-1)
SELECT PM
EOL=0 ; PM.CT=0 ; SCT=0 ; CT=0 ; MISSING=0
LOOP
READNEXT ID ELSE EOL=1
UNTIL EOL DO
READU PMREC FROM PM,ID THEN
IF REM(PM.CT,100)=0 THEN GOSUB 1000
PM.CT=PM.CT+1
IF PMREC<PM$SUBSCRIPTION> # '' THEN
SCT=SCT+1
SUBS=PMREC<PM$SUBSCRIPTION>
PMREC<PM$SUBSCRIPTION>=''
FOR S=1 TO SUBS
READU SREC FROM PM.SUBSCRIPTIONS,ID:"*":S THEN
CT=CT+1
READU NEXT.SUB FROM GEN.KEYS,'NEXT.SUBSCRIPTION' ELSE NEXT.SUB=1000
NEXT.SUB=NEXT.SUB+1
WRITE NEXT.SUB ON GEN.KEYS,'NEXT.SUBSCRIPTION'
SREC<SUB$PARTNER>=ID
SREC<SUB$SUB.KEY>=NEXT.SUB
WRITE SREC ON PM.SUBSCRIPTIONS,NEXT.SUB
DELETE PM.SUBSCRIPTIONS,ID:"*":S
PMREC=INSERT(PMREC,PM$SUBSCRIPTION,-1;NEXT.SUB)
END ELSE
MISSING=MISSING+1
END
NEXT S
WRITE PMREC ON PM,ID
END
RELEASE
END
REPEAT
GOSUB 1000
CRT
STOP
*
1000 *
CRT @(0,12):"Number of partners read: ":PM.CT:@(-4):
CRT @(0,13):"Number of partners processed: ":SCT:@(-4):
CRT @(0,15):"Number of subscriptions converted: ":CT:@(-4):
CRT @(0,16):"Number of subscriptions missing: ":MISSING:@(-4):
RETURN