source: WorldVistAEHR/trunk/r/VOLUNTARY_TIMEKEEPING-ABSV/ABSVTP.m@ 1714

Last change on this file since 1714 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.9 KB
RevLine 
[613]1ABSVTP ;VAMC ALTOONA/CTB_CLH - READ MASTER TAPE FROM AUSTIN ;4/4/00 8:48 AM
2V ;;4.0;VOLUNTARY TIMEKEEPING;**18**;JULY 6, 1994
3 S X="!!I will be reading the tape/floppy disk distributed by the Austin DPC to load the Voluntary Service Master File." D MSG^ABSVQ
4 D ^ABSVSITE I '% S X="The station number MUST be entered in the VOLUNTARY SERVICE SITE PARAMETER file. Option Termiated with No Action*" D MSG^ABSVQ Q
5 S DIR(0)="S^F:FLOPPY;T:9 TRACK TAPE",DIR("A")="Select Distribution Media Type" D ^DIR
6 I $$DIR^ABSVU2 QUIT
7 S MEDIA=Y
8 S ABSVXA="Are you ready to down-load the Master File",ABSVXB="",%=1 D ^ABSVYN G:%'=1 OUT
9 S ABSVXA="Is the "_$S(MEDIA="F":"floppy disk",1:"Tape")_" loaded and the drive on-line",ABSVXB="",%=1 D ^ABSVYN G:%'=1 OUT
10 W !!,*7,"Use the following Parameters for reading this "_$S(MEDIA="F":"floppy disk",1:"Tape")
11 W:MEDIA="T" !,?5,"DSM 11 and M11+ - (""EBL"":158:1580)",!?5,"VAXDSM - (FORMAT=""EFL"":RECORDSIZE=158:BLOCKSIZE=1580)"
12 W:MEDIA="F" !?5,"MSM - (""B:\VAVSLOAD.DAT"":""R"")",!
13 ;READ TAPE SET ^TMP
14 D ^%ZIS I POP D HOME^%ZIS QUIT
15 S ABSVEOT=0,ABSVTAPE=IO,ABSVHOME=IO(0),ZY="",COUNT=0
16LN S X="X^ABSVTP" S @^%ZOSF("TRAP") F I=1:1 D RD Q:'ABSVX D A
17 G EOT
18OUT K %,ABSVXA,ABSVXB Q
19A I MEDIA="F" S ZY=X D WR Q
20 F J=1:1 Q:$L(X)=0 D
21 . S NY=158-$L(ZY),ZY=ZY_$E(X,1,NY),X=$E(X,NY+1,2000)
22 . I $L(ZY)=158 D WR
23 . QUIT
24 QUIT
25WR S ^TMP("VOL1",$J,COUNT+1)=ZY,COUNT=COUNT+1 U ABSVHOME W !,"("_COUNT_") ",ZY S ZY=""
26 Q
27RD U ABSVTAPE R X:5 I '$T U ABSVHOME W !,"FATAL ERROR READING TAPE, PLEASE START OVER." K ^TMP("VOL1",$J) G H^XUS
28 X ^%ZOSF("EOT") I Y S X=""
29 S ABSVX=$S(X="":0,1:1)
30 Q
31EOT U ABSVHOME W !!,*7,"End of tape reached, will now rewind tape and build ^TMP.",!
32 ;S X="X^ABSVTP" S @^%ZOSF("TRAP") U ABSVTAPE W @%MT("REW")
33X ;S X="",@^%ZOSF("TRAP") S IOP=ABSVTAPE,ABSVEOT=1 D ^%ZIS
34 D ^%ZISC S IOP="HOME" D ^%ZIS U IO K IOP
35 S X="ERR^ZU" S @^%ZOSF("TRAP")
36 G EN^ABSVTP1
Note: See TracBrowser for help on using the repository browser.