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

AIBCVT3.m

Go to the documentation of this file.
AIBCVT3 ;IHS/DDPS/DFM-IBM STAT RECORDS WRITE [ 01/12/89  1:11 PM ]
 ;1.3; 1/13/89 DEFAULT TO "3" ON RG3 SOURCE - PIECE 7 INSTEAD OF "2"
 ;1.3 RECODE BUILD OF DELETE MERGE NODE TO SET SOURCE = 3
 ;1.3; 9/23/88 RESTRUCTURE, ALLOW FOR REGISTRATION ELIGIBILITY FILE
 ;1.0; 3/28/88
 G:AIBFILE="ibmjob" BLDCARDS D WRITE U AIBPDV G RETURN
BLDCARDS ;BUILD CARDS FOR RJE BYSYNC JOB SUBMISSION
 S AIBB1=1,AIBOW=AIBOT_AIBOT(1),(AIBOT,AIBOT(1))=""
CARDLOOP ;BUILD NEXT CARD
 S AIBRK=$P(AIBB(AIBB1),U,1),AIBRKB=$P(AIBB(AIBB1),U,6)
 S AIBRL=$P(AIBB(AIBB1),U,4),AIBRB=$P(AIBB(AIBB1),U,5)
 S AIBRE=AIBRB+AIBRL-1
 I AIBRKB<2 G MOVREST
 S AIBOT=$E(AIBOW,AIBRB,AIBRE)_$J("",80-AIBRL-$L(AIBRK))_AIBRK G WRITEC
MOVREST ;
 S:AIBRKB=0 AIBRK=""
 S AIBOT=AIBRK_$E(AIBOW,AIBRB,AIBRE)_$J("",80-AIBRL-$L(AIBRK))
WRITEC ;WRITE 1 CARD
 D WRITE I AIBB1=AIBB2 U AIBPDV G RETURN
 S AIBB1=AIBB1+1,AIBOT="" G CARDLOOP
WRITE ;WRITE RECORD TO FILE
 U AIBTDV W AIBOT,AIBOT(1) S (AIBOT,AIBOT(1))=""
 I AIBOS="D" G DSMLOGIC
 W ! G:$L(AIBJ)>0 RETURN G DISPLAY
DSMLOGIC ;SPECIAL WRITE LOGIC FOR DSM
 X ^%ZOSF("MTERR") I Y S AIBA="R" G RETURN
 X ^%ZOSF("EOT") I Y D NEWTAPE G:$L(AIBA)>0 RETURN
DISPLAY ;DISPLAY RECORD COUNT ON CONSOLE (BY 10S)
 S AIBCTW=AIBCTW+1 U AIBCDV S AIBRM=AIBCTW#10 G:AIBRM>0 RETURN
 S AIBLK="",AIBLK=AIBLK_$J("",8-$L(AIBCTW)) W AIBLK,AIBCTW G RETURN
NEWTAPE ;WRITE TAPEMARK, CLOSE AND REWIND, MOUNT AND OPEN NEXT TAPE
 U AIBTDV W %MT("WTM"),%MT("REW") S IO=AIBTDV X ^%ZIS("C")
 S AIBMSG="Tape # "_AIBTC_" Volume Serial Number Created : "_AIBV
 D ERRMSG^AIBCVT6 D MOUNT^AIBSDEV1 G RETURN
WRITET ;WRITE TEMPORY GLOBAL FOR DIFFERENT FORMAT RECORDS
 I $L(AIBTZ)>0 G CKNEXT
 S AIBTZ=0,AIBZ(0)=AIBZ,AIBZZ(0)=AIBZZ,AIBZ=0,AIBZZ=0
 S @AIBTGLT=@AIBGBLT,AIBZ=AIBZ(0),@AIBTGFT=@AIBGBFT,AIBZZ=AIBZZ(0)
CKNEXT ;
 I AIBZ=AIBZ(0) G NEXT
 S AIBZ(1)=AIBZ,AIBZ=AIBZ(0),AIBZZ(0)=AIBZZ,AIBZZ=0
 S AIBTZ(0)=AIBTZ,AIBTZ=0
 S $P(@AIBTGFT,U,3)=AIBTZ(0),$P(@AIBTGFT,U,4)=AIBTZ(0)
 S AIBTZ(1)=AIBTZ(1)+AIBTZ(0),AIBZ=AIBZ(1),AIBZ(0)=AIBZ
 S @AIBTGFT=@AIBGBFT,AIBZZ=AIBZZ(0)
NEXT ;PROCESS CONTINUE
 S AIBTZ=AIBTZ+1 G:AIBNK="RG3" RG3FORM
 I AIBNK="RG4" G RG4BATH
 S AIBOT=AIBIN G CONTWT
RG3FORM ;REFORMAT NODE RG3 REGISTRATION DELETE MERGE
 S AIBRG4=$P(AIBIN,U,4) IF $L(AIBRG4)=0 S AIBRRR="" G RG3BLD
 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