395 CHARACTER*10 COCBUF(*)
397 CHARACTER*4 COCRPT(10000),BLANK
400 INTEGER LOCRPT(*),KATGC(20,11),KATGL(20,11),KATL(11),KATO(11),
405 equivalence(rocrpt,mocrpt,cocrpt)
409 DATA blank/
' '/,cnines/
'9999999'/,imsg/99999/,xmsg/99999./
410 DATA katl/6,4,4,4,6,6,3,3,1,20,15/,kato/13,15,17,19,21,23,25,27,
412 DATA kat/
'01',
'02',
'03',
'04',
'05',
'06',
'07',
'08',
'09',
'51',
'52'/
413 DATA katgc/ 5*2,4,14*0, 3*2,4,16*0, 3*2,4,16*0, 3*2,4,16*0,
414 $ 5*2,4,14*0, 5*2,4,14*0, 2*2,4,17*0, 2*2,4,17*0, 4,19*0,
415 $ 8*2,4,10*1,2, 15*1,5*0/
416 DATA katgl/ 5,4,3*3,4,14*0, 5,4,2*3,16*0, 5,2*3,2,16*0,
417 $ 5,2*3,2,16*0, 5,4,3*3,4,14*0, 5,4,3*3,4,14*0, 5,3,2,17*0,
418 $ 5,3,2,17*0, 12,19*0,
419 $ 2*5,2*3,4,3,2*4,5,2*3,7*2,1,3, 4,3,4,1,5*2,4,2*2,1,2,7,5*0/
422 entry w3ai02(cocbuf,locrpt,next)
424 IF (lwflag.EQ.0)
THEN
440 IF(cocbuf(n).EQ.
'END RECORD'.OR.cocbuf(n).EQ.
'XXXXXXXXXX')
THEN
442 IF(cocbuf(n).EQ.
'XXXXXXXXXX') print 109, irec
452 cocrpt(lw2*5-lw1) =
' '
453 cocrpt(lw2*6-lw1) =
' '
458 cocrpt(lw2*11-lw1) =
' '
459 cocrpt(lw2*12-lw1) =
' '
466 IF(cocbuf(n)(1:5).NE.
'99999')
READ(cocbuf(n)(1:5),51) rocrpt(m)
469 IF(cocbuf(n)(6:10).NE.
'99999')
READ(cocbuf(n)(6:10),51) rocrpt(m)
475 cocrpt(lw2*m-lw1) = cocbuf(n)(1:4)
477 cocrpt(lw2*m-lw1) = cocbuf(n)(5:6)//
' '
480 IF(cocbuf(n)(7:10).NE.
'9999')
READ(cocbuf(n)(7:10),41) rocrpt(m)
484 cocrpt(lw2*m-lw1) = cocbuf(n)(3:6)
487 cocrpt(lw2*m-lw1) = cocbuf(n)(1:2)//cocbuf(n)(7:7)//
' '
490 READ(cocbuf(n)(8:10),30) mocrpt(m)
494 IF(cocbuf(n)(1:5).NE.
'99999')
READ(cocbuf(n)(1:5),51) rocrpt(m)
497 IF(cocbuf(n)(6:7).NE.
'99')
READ(cocbuf(n)(6:7),20) mocrpt(m)
499 READ(cocbuf(n)(8:10),30) nwds
504 IF(cocbuf(n).EQ.
'END REPORT')
THEN
507 IF(n-nexto.EQ.nwds)
THEN
514 & cocrpt(lw2*11-lw1),cocrpt(lw2*12-lw1)(1:2),n-nexto,nwds
519 locrpt(i) = mocrpt(i)
525 READ(cocbuf(n)(3:5),30) nwdsc
527 READ(cocbuf(n)(6:7),20) lvls
530 IF(cocbuf(n)(1:2).EQ.kat(ncat))
GO TO 1000
536 $ cocrpt(lw2*11-lw1),cocrpt(lw2*12-lw1)(1:2),cocbuf(n)(1:2)
564 hold(1:ll) = cocbuf(n)(i:10)//cocbuf(n+1)(1:j-10)
572 hold(1:ll) = cocbuf(n)(i:j)
581 IF(katgc(k,ncat).EQ.4)
GO TO 1500
582 IF(katgc(k,ncat).NE.1.AND.katgc(k,ncat).NE.2)
THEN
586 print 104, cocrpt(lw2*11-lw1),cocrpt(lw2*12)(1:2)
590 IF(hold(1:ll).EQ.cnines(1:ll))
THEN
592 IF(katgc(k,ncat).EQ.1) mocrpt(mo) = imsg
593 IF(katgc(k,ncat).EQ.2) rocrpt(mo) = xmsg
598 IF(katgc(k,ncat).EQ.1)
READ(hold(1:ll),10) mocrpt(mo)
599 IF(katgc(k,ncat).EQ.2)
READ(hold(1:ll),11) rocrpt(mo)
600 ELSE IF(ll.EQ.2)
THEN
602 IF(katgc(k,ncat).EQ.1)
READ(hold(1:ll),20) mocrpt(mo)
603 IF(katgc(k,ncat).EQ.2)
READ(hold(1:ll),21) rocrpt(mo)
604 ELSE IF(ll.EQ.3)
THEN
606 IF(katgc(k,ncat).EQ.1)
READ(hold(1:ll),30) mocrpt(mo)
607 IF(katgc(k,ncat).EQ.2)
READ(hold(1:ll),31) rocrpt(mo)
608 ELSE IF(ll.EQ.4)
THEN
610 IF(katgc(k,ncat).EQ.1)
READ(hold(1:ll),40) mocrpt(mo)
611 IF(katgc(k,ncat).EQ.2)
READ(hold(1:ll),41) rocrpt(mo)
612 ELSE IF(ll.EQ.5)
THEN
614 IF(katgc(k,ncat).EQ.1)
READ(hold(1:ll),50) mocrpt(mo)
615 IF(katgc(k,ncat).EQ.2)
READ(hold(1:ll),51) rocrpt(mo)
616 ELSE IF(ll.EQ.6)
THEN
618 IF(katgc(k,ncat).EQ.1)
READ(hold(1:ll),60) mocrpt(mo)
619 IF(katgc(k,ncat).EQ.2)
READ(hold(1:ll),61) rocrpt(mo)
620 ELSE IF(ll.EQ.7)
THEN
622 IF(katgc(k,ncat).EQ.1)
READ(hold(1:ll),70) mocrpt(mo)
623 IF(katgc(k,ncat).EQ.2)
READ(hold(1:ll),71) rocrpt(mo)
628 print 108, cocrpt(lw2*11-lw1),cocrpt(lw2*12-lw1)(1:2)
638 cocrpt(lw2*mo-lw1)(1:4)=hold(1:ll)//blank(1:4-ll)
639 ELSE IF(ll.EQ.4)
THEN
641 cocrpt(lw2*mo-lw1)(1:4) = hold(1:ll)
649 cocrpt(lw2*mo-lw1)(1:4) = hold(ip:jp)
653 ELSE IF(jp.EQ.ll)
THEN
655 cocrpt(lw2*mo-lw1)(1:4) = hold(ip:jp)
658 cocrpt(lw2*mo-lw1)(1:4) = hold(ip:ll)//blank(1:jp-ll)
669 IF(n-nexto.NE.nwdsc)
THEN
675 print 105, cocrpt(lw2*11-lw1),cocrpt(lw2*12-lw1)(1:2),
676 $ kat(ncat),n-nexto-1,
690 IF(n.GT.644)
GO TO 97
691 IF(cocbuf(n).EQ.
'END RECORD')
GO TO 97
692 IF(cocbuf(n).EQ.
'END REPORT')
THEN
707 locrpt(i) = mocrpt(i)
725 101
FORMAT(/
' *** W3FI64 ERROR- REPORT: ',a4,a2,
'; ACTUAL NO. 10-CHAR'
726 $,
' WORDS:',i10,
' NOT EQUAL TO VALUE READ IN WITH REPORT:',i10/6x,
727 $
'- MAY BE DUE TO INTERNAL READ PROBLEM ASSOC. W/ EITHER ORIG. ',
728 $
'PACKING OR TRANSFER OF FILE RESULTING IN UNPROCESSABLE INFO.'/6x
729 $,
'- WILL ATTEMPT TO MOVE AHEAD TO NEXT REPORT, IF NOT POSSIBLE ',
730 $
'WILL EXIT RECORD WITH NEXT = -3'/)
731 102
FORMAT(/
' *** W3FI64 ERROR- REPORT: ',a4,a2,
'; PACKED CATEGORY '
732 $,
'CODE: ',a2,
' IS NOT A VALID O.N. 29 CATEGORY'/6x,
733 $
'- MAY BE DUE TO INTERNAL READ PROBLEM ASSOC. W/ EITHER ORIG. ',
734 $
'PACKING OR TRANSFER OF FILE RESULTING IN UNPROCESSABLE INFO.'/6x
735 $,
'- WILL ATTEMPT TO MOVE AHEAD TO NEXT REPORT, IF NOT POSSIBLE ',
736 $
'WILL EXIT RECORD WITH NEXT = -2'/)
737 104
FORMAT(/
' *** W3FI64 ERROR- REPORT: ',a4,a2,
'; INTERNAL READ ',
738 $
'PROBLEM'/6x,
'- EITHER ORIGINAL PACKING OF FILE OR TRANSFER ',
739 $
'OF FILE HAS RESULTED IN UNPROCESSABLE INFORMATION'/6x,
740 $
'- WILL ATTEMPT TO MOVE AHEAD TO NEXT REPORT, IF NOT POSSIBLE ',
741 $
'WILL EXIT RECORD WITH NEXT = -2'/)
742 105
FORMAT(/
' *** W3FI64 ERROR- REPORT: ',a4,a2,
'; ACTUAL NO. 10-CHAR'
743 $,
' WORDS IN CAT. ',a2,
',',i10,.NE.
' TO VALUE READ IN WITH ',
745 $
'- MAY BE DUE TO INTERNAL READ PROBLEM ASSOC. W/ EITHER ORIG. ',
746 $
'PACKING OR TRANSFER OF FILE RESULTING IN UNPROCESSABLE INFO.'/6x
747 $,
'- WILL ATTEMPT TO MOVE AHEAD TO NEXT REPORT, IF NOT POSSIBLE ',
748 $
'WILL EXIT RECORD WITH NEXT = -3'/)
749 106
FORMAT(/
' +++ IT WAS POSSIBLE TO MOVE TO NEXT REPORT IN THIS ',
750 $
'RECORD -- CONTINUE WITH THE UNPACKING OF THIS NEW REPORT'/)
751 107
FORMAT(/
' *** IT WAS NOT POSSIBLE TO MOVE TO NEXT REPORT IN THIS',
752 $
' RECORD -- MUST EXIT THIS RECORD WITH NEXT =',i3/)
753 108
FORMAT(/
' *** W3FI64 ERROR- REPORT: ',a4,a2,
'; AN INPUT ',
754 $
'PARAMETER CONSISTS OF MORE THAN SEVEN CHARACTERS'/6x,
755 $
'- MAY BE DUE TO INTERNAL READ PROBLEM ASSOC. W/ EITHER ORIG. ',
756 $
'PACKING OR TRANSFER OF FILE RESULTING IN UNPROCESSABLE INFO.'/6x
757 $,
'- WILL ATTEMPT TO MOVE AHEAD TO NEXT REPORT, IF NOT POSSIBLE ',
758 $
'WILL EXIT RECORD WITH NEXT = -2'/)
759 109
FORMAT(/
' *** W3FI64 ERROR- RECORD ',i4,
' DOES NOT END WITH ',
760 $
'"END RECORD" BUT INSTEAD CONTAINS "X" FILLERS AFTER LAST ',
761 $
'REPORT IN RECORD'/6x,
'- WILL EXIT RECORD WITH NEXT = -1, NO ',
762 $
'REPORTS SHOULD BE LOST'/)