AFSHEXU0 ; IHS/OIRM/DSD/JDM - PRE EXPORT (SPLIT-OUT) PROCESSING PROGRAM ; [ 10/27/2004 4:20 PM ]
;;3.0T1;AO FINANCIAL DATA MGMT SYSTEM;**13**;FEB 02, 1999
;;MODIFIED FOR CACHE' COMPLIANCE ACR*2.1*9
FILESEL ;EP
I $D(DTOUT) S AFSOUT=1 Q
A0 ;
S AFSTXNAM=$S(AFSHBCLR=1:"PCC-BLUE",AFSHBCLR=2:"PCC-RED",AFSHBCLR=3:"BCBS-BLUE",AFSHBCLR=4:"BCBS-RED",AFSHBCLR=5:"ARMS-BLUE",AFSHBCLR=6:"ARMS-RED")
S AFSFNPFX=$S(AFSHBCLR=1:"afsdhpb",AFSHBCLR=2:"afsdhpr",AFSHBCLR=3:"afsdhcb",AFSHBCLR=4:"afsdhcr",AFSHBCLR=5:"afsdhab",AFSHBCLR=6:"afsdhar",1:" ") ; UNCOMMENT THIS LINE TO IMPLEMENT ARMS INTERFACE CONVERSION
A9 S AFSHDRNM="EXPORT PROCESSING OF "_AFSTXNAM_" DATA TO "_AFSCCTR
W !?80-$L(AFSHDRNM)/2,AFSHDRNM,!
F AFSI=1:1:79 W "*"
S AFSXXX="" S:$D(AFSHBCLL) AFSXXX=AFSHBCLL
S AFSHBCLL="a"
S AFSXX="ibm" S:$L(AFSHDTNM>1) AFSXX=AFSHDTNM_AFSXXX
S AFSUXFPF=AFSFNPFX
S %FN=AFSUXFPF,%OPT=1,AFSFNLN=$L(%FN)
K AFSHJFLG D ARCHLIST^AFSHARC0 Q:$D(DTOUT)!($D(DUOUT))!($D(DIROUT))
I $D(AFSHJFLG) G VKILL
;I '$O(AFSHFLES(0)) S AFSHNXTL="a" G A9A
S LTR=0 D NXTLTR K LTR
A9A ;
I '$D(AFSHNXTL) S AFSHNXTL="a"
S AFSXXX=AFSHNXTL
;S X1=DT,X2=$E(DT,1,3)_"0101" D ^%DTC S AFSDTJUL=$E(DT,2,3)_$E("000",1,3-$L(X+1))_(X+1) ;ACR*2.1*13.06 IM14144
;S %SDIR="/usr/spool/afsdata" ;ACR*2.1*13.06 IM14144
;S AFSEXFN=%SDIR_"/"_AFSUXFPF_AFSXXX_"."_AFSDTJUL,AFSEXFNS=AFSUXFPF_AFSXXX_"."_AFSDTJUL ;ACR*2.1*13.06 IM14144
S AFSDTJUL=$$JDATE^ACRFUTL ;ACR*2.1*13.06 IM14144
S %SDIR=$$ARMSDIR^ACRFSYS(1) ;ACR*2.1*13.06 IM14144
Q:%SDIR']""
NAMEGEN ;
;S AFSEXFN=%SDIR_"/"_AFSUXFPF_AFSXXX_"."_AFSDTJUL,AFSEXFNS=AFSUXFPF_AFSXX_"."_AFSDTJUL ;ACR*2.1*13.06 IM14144
S AFSEXFN=%SDIR_AFSUXFPF_AFSXXX_"."_AFSDTJUL ;ACR*2.1*13.06 IM14144
S AFSEXFNS=AFSUXFPF_AFSXXX_"."_AFSDTJUL ;ACR*2.1*13.06 IM14144
Q
JCANCEL U IO(0)
W *7,!!,AFSERMSG,!?10,"ENTER <RETURN> TO EXIT" S DX=$X+2,DY=$Y,%L=1,%F="A" D DAT1^AFSHCALL S AFSJFLG=1
Q
VKILL ;;KILL OFF VARIABLES HERE
K AFSJFLG
D PREXPORT^AFSHVKIL
Q
NXTLTR ;
F L=1:1:99 I '$D(AFSHFLES(L)) Q
I L'>0 S AFSHNXTL="a" Q
NXTLTRA ;
I '$O(AFSHFLES(LTR)) Q
S LTR=$O(AFSHFLES(LTR))
S AFSHLSTL=AFSHFLES(LTR)
S (AFSHF,AFSHLSTL)=$P(AFSHLSTL,"^",2),AFSHLSTL=$E(AFSHLSTL,8)
S AFSHNXTL="a" I $P(AFSHF,".",2)=AFSHDTJL S AFSHNXTL=$A(AFSHLSTL)
I AFSHNXTL=122 U IO(0) W !,"EXPORT WOULD EXCEED DAILY LIMIT. WAIT UNTIL TOMORROW & TRY AGAIN." Q
S AFSHNXTL=AFSHNXTL+1
S AFSHNXTL=$C(AFSHNXTL)
G NXTLTRA
AFSHEXU0 ; IHS/OIRM/DSD/JDM - PRE EXPORT (SPLIT-OUT) PROCESSING PROGRAM ; [ 10/27/2004 4:20 PM ]
+1 ;;3.0T1;AO FINANCIAL DATA MGMT SYSTEM;**13**;FEB 02, 1999
+2 ;;MODIFIED FOR CACHE' COMPLIANCE ACR*2.1*9
FILESEL ;EP
+1 IF $DATA(DTOUT)
SET AFSOUT=1
QUIT
A0 ;
+1 SET AFSTXNAM=$SELECT(AFSHBCLR=1:"PCC-BLUE",AFSHBCLR=2:"PCC-RED",AFSHBCLR=3:"BCBS-BLUE",AFSHBCLR=4:"BCBS-RED",AFSHBCLR=5:"ARMS-BLUE",AFSHBCLR=6:"ARMS-RED")
+2 ; UNCOMMENT THIS LINE TO IMPLEMENT ARMS INTERFACE CONVERSION
SET AFSFNPFX=$SELECT(AFSHBCLR=1:"afsdhpb",AFSHBCLR=2:"afsdhpr",AFSHBCLR=3:"afsdhcb",AFSHBCLR=4:"afsdhcr",AFSHBCLR=5:"afsdhab",AFSHBCLR=6:"afsdhar",1:" ")
A9 SET AFSHDRNM="EXPORT PROCESSING OF "_AFSTXNAM_" DATA TO "_AFSCCTR
+1 WRITE !?80-$LENGTH(AFSHDRNM)/2,AFSHDRNM,!
+2 FOR AFSI=1:1:79
WRITE "*"
+3 SET AFSXXX=""
IF $DATA(AFSHBCLL)
SET AFSXXX=AFSHBCLL
+4 SET AFSHBCLL="a"
+5 SET AFSXX="ibm"
IF $LENGTH(AFSHDTNM>1)
SET AFSXX=AFSHDTNM_AFSXXX
+6 SET AFSUXFPF=AFSFNPFX
+7 SET %FN=AFSUXFPF
SET %OPT=1
SET AFSFNLN=$LENGTH(%FN)
+8 KILL AFSHJFLG
DO ARCHLIST^AFSHARC0
IF $DATA(DTOUT)!($DATA(DUOUT))!($DATA(DIROUT))
QUIT
+9 IF $DATA(AFSHJFLG)
GOTO VKILL
+10 ;I '$O(AFSHFLES(0)) S AFSHNXTL="a" G A9A
+11 SET LTR=0
DO NXTLTR
KILL LTR
A9A ;
+1 IF '$DATA(AFSHNXTL)
SET AFSHNXTL="a"
+2 SET AFSXXX=AFSHNXTL
+3 ;S X1=DT,X2=$E(DT,1,3)_"0101" D ^%DTC S AFSDTJUL=$E(DT,2,3)_$E("000",1,3-$L(X+1))_(X+1) ;ACR*2.1*13.06 IM14144
+4 ;S %SDIR="/usr/spool/afsdata" ;ACR*2.1*13.06 IM14144
+5 ;S AFSEXFN=%SDIR_"/"_AFSUXFPF_AFSXXX_"."_AFSDTJUL,AFSEXFNS=AFSUXFPF_AFSXXX_"."_AFSDTJUL ;ACR*2.1*13.06 IM14144
+6 ;ACR*2.1*13.06 IM14144
SET AFSDTJUL=$$JDATE^ACRFUTL
+7 ;ACR*2.1*13.06 IM14144
SET %SDIR=$$ARMSDIR^ACRFSYS(1)
+8 IF %SDIR']""
QUIT
NAMEGEN ;
+1 ;S AFSEXFN=%SDIR_"/"_AFSUXFPF_AFSXXX_"."_AFSDTJUL,AFSEXFNS=AFSUXFPF_AFSXX_"."_AFSDTJUL ;ACR*2.1*13.06 IM14144
+2 ;ACR*2.1*13.06 IM14144
SET AFSEXFN=%SDIR_AFSUXFPF_AFSXXX_"."_AFSDTJUL
+3 ;ACR*2.1*13.06 IM14144
SET AFSEXFNS=AFSUXFPF_AFSXXX_"."_AFSDTJUL
+4 QUIT
JCANCEL USE IO(0)
+1 WRITE *7,!!,AFSERMSG,!?10,"ENTER <RETURN> TO EXIT"
SET DX=$X+2
SET DY=$Y
SET %L=1
SET %F="A"
DO DAT1^AFSHCALL
SET AFSJFLG=1
+2 QUIT
VKILL ;;KILL OFF VARIABLES HERE
+1 KILL AFSJFLG
+2 DO PREXPORT^AFSHVKIL
+3 QUIT
NXTLTR ;
+1 FOR L=1:1:99
IF '$DATA(AFSHFLES(L))
QUIT
+2 IF L'>0
SET AFSHNXTL="a"
QUIT
NXTLTRA ;
+1 IF '$ORDER(AFSHFLES(LTR))
QUIT
+2 SET LTR=$ORDER(AFSHFLES(LTR))
+3 SET AFSHLSTL=AFSHFLES(LTR)
+4 SET (AFSHF,AFSHLSTL)=$PIECE(AFSHLSTL,"^",2)
SET AFSHLSTL=$EXTRACT(AFSHLSTL,8)
+5 SET AFSHNXTL="a"
IF $PIECE(AFSHF,".",2)=AFSHDTJL
SET AFSHNXTL=$ASCII(AFSHLSTL)
+6 IF AFSHNXTL=122
USE IO(0)
WRITE !,"EXPORT WOULD EXCEED DAILY LIMIT. WAIT UNTIL TOMORROW & TRY AGAIN."
QUIT
+7 SET AFSHNXTL=AFSHNXTL+1
+8 SET AFSHNXTL=$CHAR(AFSHNXTL)
+9 GOTO NXTLTRA