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

BARMEISS.m

Go to the documentation of this file.
  1. BARMEISS ; IHS/SD/LSL - Manually resend EISS files ;
  1. ;;1.8;IHS ACCOUNTS RECEIVABLE;;OCT 26, 2005
  1. ;
  1. ; IHS/SD/LSL - 05/03/04 - V1.8
  1. ; Routine created to manually resend EISS files left in the
  1. ; directory.
  1. ;
  1. Q
  1. ; ********************************************************************
  1. EP ;EP
  1. D FINDFILE ; Find files in directory
  1. Q:'$D(BARFILES) ; No files in directory
  1. D DISPFILE ; Display files for choosing
  1. I BARANS<1 D Q ; No file selected
  1. . D PAZ^BARRUTL
  1. D RUSURE ; Resend message.
  1. I BARANS<1 D Q ; Don't resend
  1. . D PAZ^BARRUTL
  1. D RESEND ; Resend selected file
  1. D PAZ^BARRUTL
  1. Q
  1. ; ********************************************************************
  1. ;
  1. FINDFILE ;
  1. ; Find files in EISS directory. List returned in BARFILES array
  1. ; BARFILES(#)=filename
  1. S BARDIR=$P($G(^BAR(90052.06,DUZ(2),DUZ(2),2)),U,4)
  1. Q:BARDIR="" ; No EISS local directory.
  1. S BARLIST=$$LIST^%ZISH(BARDIR,"*",.BARFILES)
  1. I '$D(BARFILES) D Q
  1. . W !!,"No files in ",BARDIR," directory"
  1. . D PAZ^BARRUTL
  1. Q
  1. ; ********************************************************************
  1. ;
  1. DISPFILE ;
  1. W !!
  1. S (BARA,BARCNT)=0
  1. F S BARA=$O(BARFILES(BARA)) Q:'+BARA D
  1. . S BARCNT=BARCNT+1
  1. . W !,$J(BARCNT,2),?5,BARFILES(BARA)
  1. . S BARTMP(BARCNT)=BARA
  1. S BARANS=0
  1. W !
  1. K DIR
  1. S DIR(0)="NAO^1:"_BARCNT
  1. S DIR("A")="Please enter the LINE # of the EISS file to be resent: "
  1. S DIR("?")="Enter a number between 1 and "_BARCNT
  1. D ^DIR
  1. S BARANS=Y
  1. Q:BARANS<1
  1. S BARFN=BARFILES(BARTMP(BARANS))
  1. Q
  1. ; ***********************************************************************
  1. ;
  1. RUSURE ;
  1. W !
  1. S BARANS=0
  1. K DIR
  1. S DIR(0)="Y^A"
  1. S DIR("A")="Would you like to resend "_BARFN_" now"
  1. S DIR("B")="Y"
  1. D ^DIR
  1. S:Y BARANS=1
  1. K DIR
  1. Q
  1. ; ********************************************************************
  1. ;
  1. RESEND ;
  1. ; Resend selected file
  1. S BAREISS=$G(^BAR(90052.06,DUZ(2),DUZ(2),2))
  1. S XBFN=BARFN
  1. S XBUF=BARDIR
  1. S BARUNAM=$P(BAREISS,U,2) ; Username of system receiving file
  1. S BARUPASS=$P(BAREISS,U,3) ; Password of system receiving file
  1. S XBQTO=$P(BAREISS,U) ; System id to receive file
  1. ; Include username and password in system id
  1. ; Add i to XBQTO to send immediately rather than queue. Needed so can
  1. ; delete sent files. (A/R 1.8)
  1. S XBQTO="-il """_BARUNAM_":"_BARUPASS_""" "_XBQTO
  1. I XBUF=""!(BARUNAM="")!(BARUPASS="")!(XBQTO="") Q
  1. I IO=IO(0) W !!
  1. I $$VERSION^%ZOSV(1)["Windows" D UUCPQ^ZIBGSVEP
  1. E D UUCPQ^ZIBGSVEM
  1. D ^%ZISC,HOME^%ZIS
  1. S:'$D(XBFLG) XBFLG=0
  1. Q:+XBFLG ; Send not successful
  1. ; delete file from local, send successful
  1. S BARDEL=$$DEL^%ZISH(BARDIR,BARFN)
  1. Q