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

ACGSDX.m

Go to the documentation of this file.
ACGSDX ;IHS/OIRM/DSD/THL,AEF - EXPORT CONTROLLER; [ 03/27/2000   2:22 PM ]
 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
 ;;UTILITY WHICH CREATES THE EXPORT GLOBAL AND TRANSMITS IT TO THE
 ;;ALBUQUERQUE DATA CENTER - FOR EDITED ACTIONS ONLY
DX ;EP;TO EXPORT RECORDS BY DATE LAST EDITED
 S X1=$P(^ACGPARA(ACGPODA,0),U,7),X2=-30
 D C^%DTC
 S ACGDATE=X
 D DCON
 S ACGPARA=^ACGPARA(ACGPODA,0),ACG4=$P(ACGPARA,U,3),%FN=$S($P(ACGPARA,U,2)=1:"acg",ACG4=102:"B:ACG",1:"ACG")_ACG4_"."_$S($P(ACGPARA,U,2)=1:$S(ACG4'=236:"asc",1:"phs"),1:"ASC")
 D OPEN
 I POP D CLOSE Q
 U IO
 W ACGX,!,"MONTHLY EXPORT FOR CONTRACT OFFICE ",ACG4,!
 D DATE,DXC
 Q
OPEN ;OPEN HOST FILE
 S %ZIS("IOPAR")=%FN,IOP=$S(ACG4>200:"HOST FILE SERVER #4",1:51)
 D ^%ZIS
 K IOP
 I POP>0 W *7,*7,!!,"HOST FILE SERVER not available.  Export terminated.  Please retry later." D HOLD^ACGSMENU
 Q
DATE ;WRITE GLOBAL DATA TO HOST FILE
 U IO
 S ACGCNT=0,ACGD=ACGDATE
 F  S ACGD=$O(^ACGS("Q",ACGD)) Q:'ACGD  D
 .S ACGRDA=0
 .F ACGI=1:1 S ACGRDA=$O(^ACGS("Q",ACGD,ACGRDA)) Q:'ACGRDA  D
 ..F X=0,10 S Y="^ACGS("_ACGRDA_","_X_")",Z=@Y W Y,!,Z,!
 ..F X="DT","DT1","DT2","DT3","IC","IHS","IHS1","SP" S Y="^ACGS("_ACGRDA_","""_X_""")",Z=$G(@Y) W Y,!,Z,!
 ..S Y="^ACGS(""ACGEXP"","_ACGRDA_")",Z=""
 ..W Y,!,Z,!
 Q
DXC ;CLOSE EXPORT
 W "*",!,"*",!,"**",!,"**",!
CLOSE D ^%ZISC
 Q
DCON ;CONVERT DATE FOR GLOBAL SAVE
 D NOW^%DTC
 S Y=%
 X ^DD("DD")
 S X=$P(Y,"@"),Y=$P(Y,"@",2),ACGX=$P($P(X,",")," ",2)_"-"_$P(X," ")_"-"_$E($P(X,",",2),3,4),ACGY=" "_$S($P(Y,":")<13:+$P(Y,":"),1:$P(Y,":")-12)_":"_$P(Y,":",2)_" "_$S($P(Y,":")<13:"AM",1:"PM"),ACGX=ACGY_"  "_ACGX
 Q