AIBCVT ;IHS/DDPS/DFM - IBM STAT RECORDS CREATION ROUTINE [ 09/23/88 11:51 AM ]
+1 ;1.3; 9/23/88 RESTRUCTURE, ALLOW FOR REGISTRATION ELIGIBILITY FILE
+2 ;1.1; 5/30/88 ADD DSM DEVICE LOGIC
+3 ;1.0; 3/28/88
+4 DO INIT^AIBCVT4
IF $LENGTH(AIBA)=0
GOTO CTL
IF AIBA="A"
GOTO ABEND
GOTO CLOSE
CTL ;PERFORM GET CONTROL INFORMATION ROUTINE
+1 DO CONTROL^AIBCVT0
IF $LENGTH(AIBA)>0
GOTO ABEND
USE AIBCDV
DO GBLHEAD^AIBCVT2
IF $LENGTH(AIBA)>0
GOTO ABEND
+2 IF AIBOS="M"
SET (AIBT1,AIBFN)=AIBDIR_AIBCF_"."_AIBFILE
+3 IF AIBT2="A"
IF AIBOS="D"
GOTO PROCESS
+4 USE AIBCDV
DO OUT^AIBSDEV
IF AIBA="A"
GOTO ABEND
IF AIBA="C"
GOTO OPCANCL
SET AIBTDV=AIBDEV
SET AIBFFN=2
IF AIBOS="D"
GOTO PROCESS
+5 IF AIBFILE="keytap"
GOTO TAPE
+6 IF AIBT2="W"
DO BJCL^AIBCVT0
GOTO PROCESS
+7 GOTO PROCESS
TAPE ;DISPLAY VOL SER TO CREATE
+1 IF AIBT2="A"
GOTO PROCESS
+2 IF AIBGBLP="AGEL"
GOTO PROCESS
+3 USE AIBCDV
READ !!,"Enter Volume Serial Number Of Keytape To Be Created ",AIBV:DTIME
WRITE !!
PROCESS ;PROCESS RECORDS
+1 DO PROCESS^AIBCVT1
IF AIBA="A"
GOTO ABEND
IF AIBA="R"
GOTO MTERR
IF AIBA="C"
GOTO OPCANCL
GOTO CKEOJ
MTERR ;ABEND ON BAD TAPE WRITE
+1 DO MTERR^AIBCVT6
GOTO CLOSE
OPCANCL ;ABEND BECAUSE OPERATOR CANCLED JOB
+1 DO OPCANCL^AIBCVT6
GOTO CLOSE
ABEND ;ABNORMAL END OF JOB
+1 DO ABEND^AIBCVT6
GOTO CLOSE
CKEOJ ;CHECK IF DONE
+1 IF $LENGTH(AIB2ND)=0
GOTO CKRJE
+2 DO EOJ^AIBCVT2
+3 SET AIBGBLP=AIBTGBL
SET AIBA=""
SET AIBT2="A"
IF '$DATA(AIBOK)
KILL @AIBGBL
DO CKGLOB^AIBCVT4
+4 USE AIBTDV
SET (IO,AIBDEV)=AIBTDV
IF AIBOS="M"
DO CLOSE^AIBSDEV
+5 GOTO CTL
CKRJE ;CHECK IF RJE ENDING JCL NEEDS TO BE WRITTEN
+1 IF AIBFILE="ibmjob"
DO EJCL^AIBCVT0
+2 DO EOJ^AIBCVT2
CLOSE ;CLOSE FILES
+1 DO CLOSEND^AIBCVT6
QUIT