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

AFSHEXU0.m

Go to the documentation of this file.
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