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

AIBTCFLM.m

Go to the documentation of this file.
AIBTCFLM ;IHS/AAO/MFD;FRONT-END TELECOMM FILE GATHER BEFORE MERGE/CONVERT [ 02/01/89  9:08 AM ]
 ;1.3; 9/23/88 RESTRUCTURE, ALLOW FOR REGISTRATION ELIGIBILITY FILE
 ;1.01 ;DFM ;10/1/88
 ;1.00 ;5/24/88 UNDER NAME OF AIBFILES
 ;Set AIBGLPRE=global prefix you wish to merge and AIBFILE="keytap"
 ;or "ibmjob" prior to doing this routine.
 ;This routine calls AIBMRG then goes to AIBCVT.
 ;Comment out DOEM+2 to do the merge only and not go right into convert.
 S AIBFILE="keytap" G INTRO
IBMJOB ;USE THIS ENTRY POINT TO CREATE TELECOM FILE FOR MAINFRAME
 S AIBFILE="ibmjob"
INTRO S:'$D(DTIME) DTIME=300 S AIBFFN=2
 I '$D(AIBGLPRE) R !!,"Enter Global Prefix (i.e. AGTX) for merge: ",AIBGLPRE:DTIME G ALLDONE:"^"[AIBGLPRE!(AIBGLPRE'?4A)
 W !!,"GLOBAL MERGE AND CONVERSION FOR "_AIBGLPRE_"DATA"
GFILES S AIBDEV=51,AIBPFN="/usr/spool/uucppublic/"_AIBGLPRE K CODENO,ZA,I
 R !!,"Enter Unix file suffixes, separated by commas",!,"(i.e. 202101.42,202401.36)  :  ",CODENOS:DTIME G ALLDONE:CODENOS=""!(CODENOS["^")!('$T) G:CODENOS["?" GFILES
 S AIBCC=1
SETCOD F N=1:1 S CODENO(AIBCC)=$P(CODENOS,",",N) Q:$P(CODENOS,",",N)=""  S AIBCC=AIBCC+1
 S AIBCC=AIBCC-1 K N W !
 F I=1:1:AIBCC W ! W ?4,AIBPFN_CODENO(I)
 W !!,"Are these the files you wish to extract from? ('^' to re-enter) (Y/N) Y// " R X:DTIME S:X="" X="Y" G ALLDONE:X["N",GFILES:X["^"
CHK F I=1:1:AIBCC D CHKHFS I ZA<0 G GFILES
WHATPRT S %IS("A")="Select Printer for Error Reports: ",%IS("B")=3,%IS="",IO="" D ^%ZIS G:IO="" ALLDONE S AIBPDV=IO
 K X,ZA S AIBOK=1,AIBGLOB="^"_AIBGLPRE_"GLOB" K @AIBGLOB,AIBGLOB
 K:AIBGLPRE="AGTX" ^AGDMGLOB,^AGHAGLOB,^AGELGLOB
DOEM F I=1:1:AIBCC D CHKHFS
 K I,CODENOS,CODENO,ZA,AIBDEV,AIBPFN,AIBFN
 S AIBGBLP=AIBGLPRE K AIBGLPRE D ^AIBCVT ;COMMENT OUT THIS LINE TO QUIT WITHOUT CONVERTION TO 9TRACK OR IBM TC FILE
 G ALLDONE
CHKHFS ;
 S AIBFN=AIBPFN_CODENO(I)
OPENHFS O AIBDEV:(AIBFN:"R"):0
 U AIBDEV S ZA=$ZA U 0 I ZA<0 W !,?5,"Open failed on device 51 for file",AIBFN,*7,!!,?30,"TRY AGAIN" Q
 D:$D(AIBOK) BEGIN^AIBMRG
 C AIBDEV
 Q
ALLDONE K AIBOK,AIBGLPRE,AIBFILE,I,CODENOS,CODENO,AIBCC,ZA,AIBDEV,AIBPFN,AIBFN,AIBFFN
 ;IHS/MFD ADDED AIBFFN ABOVE
 Q