34 lines
1.4 KiB
Mathematica
34 lines
1.4 KiB
Mathematica
DVBHQR3 ;ISC-ALBANY/PKE-parse Birls response ; 8/19/87 06:44 ;
|
|
;;V4.0;HINQ;;03/25/92
|
|
;abbreviated name, number parser
|
|
G EN
|
|
RON S LP=(L\246)+1,L2=L#245 S:L2=0 L2=245 S L3=L1-(245-L2) ;maybe +1
|
|
I $D(X(LP)) S X=$E(X(LP),L2,L2+L1-1) I $L(X)<L1,$D(X(LP+1)) S X=X_$E(X(LP+1),1,L3) Q
|
|
Q
|
|
FOLDER Q:'+DVBFL(I) S Z=0,Z=$O(^DIC(4,"D",+DVBFL(I),Z)) I Z,$D(^DIC(4,Z,0)) S DVBFL(I)=Z_" - "_$P(^(0),U) Q
|
|
Q
|
|
BOS S Z=DVBBOS(I),DVBBOS(I)=$S(Z="A ":"ARMY",Z="AF ":"AFOR",1:Z) Q
|
|
;
|
|
EN S L=1,L1=27 D RON S DVBABREV=$E(X,5) D:DVBABREV="N" NAME D:DVBABREV="M" NUMBER Q
|
|
;
|
|
NAME S DFN=+$E(X,8,21),DVBLEN=$E(X,22,25),DVBRECN=+$E(X,26,27) I 'DVBRECN K DVBRECN Q
|
|
;
|
|
S L=28,L1=53 D RON
|
|
F I=1:1:DVBRECN D PARSE
|
|
Q
|
|
PARSE S LF=$F(X,"@"),X=$E(X,1,LF-1)
|
|
I LF,$L(X)
|
|
E Q
|
|
S DVBCN(I)=$E(X,1,9),DVBSSN(I)=$E(X,10,18),DVBSN(I)=$E(X,19,27),DVBPAYN(I)=$E(X,28,29),DVBDOB(I)=$E(X,30,33),DVBDOD(I)=$E(X,34,37)
|
|
S DVBEOD(I)=$E(X,38,41),DVBRAD(I)=$E(X,42,45),DVBBOS(I)=$E(X,46,49),DVBFL(I)=$E(X,50,52),L=L+LF-1 D RON,FOLDER,BOS Q
|
|
;
|
|
NUMBER S DFN=+$E(X,8,21),DVBLEN=$E(X,22,25),DVBRECN=+$E(X,26,27) I 'DVBRECN K DVBRECN Q
|
|
S L=28,L1=67 D RON
|
|
F I=1:1:DVBRECN D PARSE1
|
|
Q
|
|
PARSE1 S LF=$F(X,"@"),X=$E(X,1,LF-1)
|
|
I LF,$L(X)
|
|
E Q
|
|
S DVBNAM(I)=$E(X,1,36),DVBCN(I)=$E(X,37,45),DVBPAYN(I)=$E(X,46,47),DVBFL(I)=$E(X,48,50),DVBEOD(I)=$E(X,51,54),DVBRAD(I)=$E(X,55,58),DVBDOB(I)=$E(X,59,62),DVBDOD(I)=$E(X,63,66),L=L+LF-1 D RON,FOLDER Q
|
|
Q
|