BGP8LSTF ; IHS/CMI/LAB - List 'BG08' files in pub ;
;;18.1;IHS CLINICAL REPORTING;**1**;MAY 25, 2018;Build 65
;
;
W:$D(IOF) @IOF
W !,"This option is used to list all CRS 2018 files that are in a directory.",!,"These files begin with BG"_$$FV^BGP8BAN()_".",!,"You must specify the directory in which the CRS 2018 data files reside.",!
FILE ;
D HOME^%ZIS
DIR ;
K DIR
S BGPDIR=""
S DIR(0)="F^3:50",DIR("A")="Enter directory path (i.e. /usr/spool/uucppublic/)" K DA D ^DIR K DIR
I $D(DIRUT) W !!,"Directory not entered!! Bye." K BGPDIR Q
S BGPDIR=Y
;
K BGPLIST S BGPLIST="",X=$$LIST^%ZISH(BGPDIR,"BG"_$$FV^BGP8BAN()_"*",.BGPLIST)
I $O(BGPLIST(""))="" W !!,"There are no files in that directory." D EOP^BGP8DH D EN^XBVK("BGP") Q
W !!,"The following CRS 2018 files reside in the ",BGPDIR," directory."
S X="" F S X=$O(BGPLIST(X)) Q:X'=+X W !?5,BGPLIST(X)
;S X=$$TERMINAL^%HOSTCMD("ls /usr/spool/uucppublic/G* > /usr/spool/uucppublic/glist")
;S X=$$TERMINAL^%HOSTCMD("ls G* > glist")
;S X=$$TERMINAL^%HOSTCMD("cat /usr/spool/uucppublic/glist")
;S X=$$TERMINAL^%HOSTCMD("rm glist")
K DIR S DIR(0)="E" D ^DIR
K BGPDIR
Q
BGP8LSTF ; IHS/CMI/LAB - List 'BG08' files in pub ;
+1 ;;18.1;IHS CLINICAL REPORTING;**1**;MAY 25, 2018;Build 65
+2 ;
+3 ;
+4 IF $DATA(IOF)
WRITE @IOF
+5 WRITE !,"This option is used to list all CRS 2018 files that are in a directory.",!,"These files begin with BG"_$$FV^BGP8BAN()_".",!,"You must specify the directory in which the CRS 2018 data files reside.",!
FILE ;
+1 DO HOME^%ZIS
DIR ;
+1 KILL DIR
+2 SET BGPDIR=""
+3 SET DIR(0)="F^3:50"
SET DIR("A")="Enter directory path (i.e. /usr/spool/uucppublic/)"
KILL DA
DO ^DIR
KILL DIR
+4 IF $DATA(DIRUT)
WRITE !!,"Directory not entered!! Bye."
KILL BGPDIR
QUIT
+5 SET BGPDIR=Y
+6 ;
+7 KILL BGPLIST
SET BGPLIST=""
SET X=$$LIST^%ZISH(BGPDIR,"BG"_$$FV^BGP8BAN()_"*",.BGPLIST)
+8 IF $ORDER(BGPLIST(""))=""
WRITE !!,"There are no files in that directory."
DO EOP^BGP8DH
DO EN^XBVK("BGP")
QUIT
+9 WRITE !!,"The following CRS 2018 files reside in the ",BGPDIR," directory."
+10 SET X=""
FOR
SET X=$ORDER(BGPLIST(X))
IF X'=+X
QUIT
WRITE !?5,BGPLIST(X)
+11 ;S X=$$TERMINAL^%HOSTCMD("ls /usr/spool/uucppublic/G* > /usr/spool/uucppublic/glist")
+12 ;S X=$$TERMINAL^%HOSTCMD("ls G* > glist")
+13 ;S X=$$TERMINAL^%HOSTCMD("cat /usr/spool/uucppublic/glist")
+14 ;S X=$$TERMINAL^%HOSTCMD("rm glist")
+15 KILL DIR
SET DIR(0)="E"
DO ^DIR
+16 KILL BGPDIR
+17 QUIT