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

BGP8LSTF.m

Go to the documentation of this file.
  1. BGP8LSTF ; IHS/CMI/LAB - List 'BG08' files in pub ;
  1. ;;18.1;IHS CLINICAL REPORTING;**1**;MAY 25, 2018;Build 65
  1. ;
  1. ;
  1. W:$D(IOF) @IOF
  1. 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.",!
  1. FILE ;
  1. D HOME^%ZIS
  1. DIR ;
  1. K DIR
  1. S BGPDIR=""
  1. S DIR(0)="F^3:50",DIR("A")="Enter directory path (i.e. /usr/spool/uucppublic/)" K DA D ^DIR K DIR
  1. I $D(DIRUT) W !!,"Directory not entered!! Bye." K BGPDIR Q
  1. S BGPDIR=Y
  1. ;
  1. K BGPLIST S BGPLIST="",X=$$LIST^%ZISH(BGPDIR,"BG"_$$FV^BGP8BAN()_"*",.BGPLIST)
  1. I $O(BGPLIST(""))="" W !!,"There are no files in that directory." D EOP^BGP8DH D EN^XBVK("BGP") Q
  1. W !!,"The following CRS 2018 files reside in the ",BGPDIR," directory."
  1. S X="" F S X=$O(BGPLIST(X)) Q:X'=+X W !?5,BGPLIST(X)
  1. ;S X=$$TERMINAL^%HOSTCMD("ls /usr/spool/uucppublic/G* > /usr/spool/uucppublic/glist")
  1. ;S X=$$TERMINAL^%HOSTCMD("ls G* > glist")
  1. ;S X=$$TERMINAL^%HOSTCMD("cat /usr/spool/uucppublic/glist")
  1. ;S X=$$TERMINAL^%HOSTCMD("rm glist")
  1. K DIR S DIR(0)="E" D ^DIR
  1. K BGPDIR
  1. Q