Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: AIBSDEV1

AIBSDEV1.m

Go to the documentation of this file.
AIBSDEV1 ;TAPE SELECTION ROUTINE [ 02/01/89  8:50 AM ]
 ;1.3 ADDITIONAL CHANGES FOR DSM
 ;1.3; 9/23/88 RESTRUCTURE, ALLOW FOR REGISTRATION ELIGIBILITY FILE
 ;1.1 ;DFM
TAPE ;OPEN TAPE UNIT
 X ^%ZOSF("MAGTAPE") S AIBTONL=^%ZOSF("MTONLINE")_" I Y"
 S %IS("A")="Enter"_AIBTXIO_"device ",%IS="N",%IS("B")=AIBDFLT
 U AIBCDV D ^%ZIS I 'POP S (AIBTDV,AIBDEV)=IO G MOUNT
 U AIBCDV W !,"TAPE DRIVE NOT SELECTED" G ABEND
MOUNT ;MOUNT TAPE ON DRIVE, CHECK ONLINE
 U AIBCDV W !!,"Mount",AIBTXIO,"Tape on Drive  ",AIBTDV,$S(IN&AIBSEQ=1:"",IN:"sequence # "_AIBSEQ,1:" 'WRITE ENABLED' ")," and ",!,"Press ENTER When Ready or '^' to Cancel Processing; "
 R AIBR:DTIME I AIBR="^" G OPCANCL
 S:$D(AIBSEQ) AIBSEQ=AIBSEQ+1 D OPEN^AIBSDEV
 U AIBTDV X AIBTONL I $T G ONLINE
 U AIBCDV W !,"Waiting for tape drive to come online" F AIB=1:1:75 U AIBTDV X AIBTONL G:$T ONLINE U AIBCDV W "." H 5
 W !!,*7,"Tape not ready after 6 minutes, processing canceled" G ABEND
ONLINE ;TAPE DRIVE IS ONLINE
 G:IN REWIND U AIBTDV X ^%ZOSF("MTWPROT") I Y=0 G READY
PROTECT ;TAPE IS PROTECTED
 U AIBCDV W *7,!!," Tape is Write Protected, Please Remove the Tape,",!,"And Place a Ring in the Write Ring Groove," G TAPE
READY ;TAPE IS READY
 ;W %MT("WTM") REMOVED - NOT NEEDED
 U AIBCDV R !!,"Enter Volume Serial Number of Output Tape ",AIBV:DTIME
 W ! G EXIT
REWIND ;REWIND INPUT TAPE
 U AIBCDV W !,"Positioning input tape, please standby" U AIBTDV W @%MT("REW") F L=1:1:150 U AIBCDV X ^%ZOSF("MTBOT") G:Y EXIT W "." H 2
 W *7,!!,"Tape not rewound"
ABEND ;ABNORMAL END OF JOB
 S AIBA="A" G EXIT
OPCANCL ;OPERATOR CANCEL
 S AIBA="C" G EXIT
EXIT ;RETURN TO CALLING PROGRAM
 Q