[613] | 1 | LBRYSRV ;SSI/ALA-LIBRARY SERVER PROGRAM ;[ 03/09/94 10:57 AM ]
|
---|
| 2 | ;;2.5;Library;;Mar 11, 1996
|
---|
| 3 | SERV ;
|
---|
| 4 | S TTY("TIR")="TITLE RECORD FROM FORUM",TTY("PUR")="PUBLISHER RECORD FROM FORUM"
|
---|
| 5 | S TTY("FRR")="FREQUENCY RECORD FROM FORUM",TTY("ISR")="INDEXING SOURCE RECORD FROM FORUM"
|
---|
| 6 | S TTY("PPR")="PREDICTION PATTERN RECORD FROM FORUM",TTY("CTI")="CORRECTED TITLE RECORD"
|
---|
| 7 | S TTY("CPL")="CORRECTED PREDICTION PATTERN LISTING",TTY("CFR")="CORRECTED FREQUENCY RECORD"
|
---|
| 8 | S TTY("TIC")="LOCAL TITLE CONFIRMATION",TTY("DLT")="TITLE DELETION"
|
---|
| 9 | S TTY("CPR")="NEW PREDICTION PATTERN FROM FORUM"
|
---|
| 10 | F D HDR Q:XMER'=0
|
---|
| 11 | Q
|
---|
| 12 | HDR ; Receiving transactions to be processed
|
---|
| 13 | X XMREC Q:XMER'=0 Q:$P(XMRG,U)="$"
|
---|
| 14 | Q:"LIB"'[$P(XMRG,U)
|
---|
| 15 | TYP S TYP=$P(XMRG,U,4),SSTN=$P(XMRG,U,2)
|
---|
| 16 | I TYP="CPR"!(TYP="PPR") D PR^LBRYSRV1 Q
|
---|
| 17 | I TYP="FRR"!(TYP="CFR") D FR^LBRYSRV1 Q
|
---|
| 18 | I TYP="PUR" D PU^LBRYSRV1 Q
|
---|
| 19 | I TYP="ISR" D IN^LBRYSRV1 Q
|
---|
| 20 | D TR
|
---|
| 21 | Q
|
---|
| 22 | TR ; Put title information into transaction file
|
---|
| 23 | D TRN^LBRYUTL K X,Y
|
---|
| 24 | TR1 X XMREC
|
---|
| 25 | I $P(XMRG,U)="$" D BUL:TYP'="LTR",REJ:TYP="LTR" Q
|
---|
| 26 | I $P(XMRG,U)="TI" S $P(^LBRY(682.1,LBRYDA,0),U,5)=$P(XMRG,U,6) S ND=1 D FIL S TIT=$P(XMRG,U,2)
|
---|
| 27 | I $P(XMRG,U)="T2" S ND=2 D FIL
|
---|
| 28 | I $P(XMRG,U)="T3" S ND=3 D FIL
|
---|
| 29 | I $P(XMRG,U)="T4" S ND=4 D FIL
|
---|
| 30 | I $P(XMRG,U)="T5" S CT=$P(XMRG,U,2) S ^LBRY(682.1,LBRYDA,6,CT,0)=$P(XMRG,U,3)
|
---|
| 31 | I $P(XMRG,U)="T6" S CT=$P(XMRG,U,2) S ^LBRY(682.1,LBRYDA,7,CT,0)=$P(XMRG,U,3)
|
---|
| 32 | I $P(XMRG,U)="T7" S CT=$P(XMRG,U,2) S ^LBRY(682.1,LBRYDA,10,CT,0)=$P(XMRG,U,3)
|
---|
| 33 | G TR1
|
---|
| 34 | FIL F I=2:1:6 S $P(^LBRY(682.1,LBRYDA,ND),U,I-1)=$P(XMRG,U,I)
|
---|
| 35 | Q
|
---|
| 36 | BUL ; Send mail message about transaction
|
---|
| 37 | I TYP="CTI" S TIT="now: "_TIT,OTI=$P(^LBRY(682.1,LBRYDA,1),U,3) I OTI'="" S OTIT=" was: "_$P($G(^LBRY(680.5,OTI,0)),U)
|
---|
| 38 | S TYP=$G(TTY(TYP)) S:TYP="" TYP="UNKNOWN TRANSACTION"
|
---|
| 39 | S XMB="LBRYFORUM",XMB(1)=TYP,XMB(2)=TIT,XMY("G.LBRYUPDT")="",XMB(3)=$G(OTIT)
|
---|
| 40 | S XMDUZ="FORUM LIBRARIANS" D ^XMB K XMY,XMB,TIT
|
---|
| 41 | Q
|
---|
| 42 | REJ S XMSUB="LOCAL SERIAL TITLE REJECTION",XMTEXT="MSG("
|
---|
| 43 | S XMY("G.LBRYUPDT")="",XMDUZ="FORUM LIBRARIANS"
|
---|
| 44 | S MSG(1)="You have received a Local Serial Title Rejection from FORUM for "_TIT_"."
|
---|
| 45 | S MSG(2)=" "
|
---|
| 46 | S MSG(3)="Comments: " S I=0 F S I=$O(^LBRY(682.1,LBRYDA,10,I)) Q:I'>0 S MSG(3+I)=^LBRY(682.1,LBRYDA,10,I,0)
|
---|
| 47 | D ^XMD K MSG,XMY,XMSUB,XMTEXT
|
---|
| 48 | Q
|
---|