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

DDMPSM1.m

Go to the documentation of this file.
  1. DDMPSM1 ;SFISC/DPC-IMPORT SCREENMAN CALLS (CONT) ;9/20/96 11:28
  1. ;;22.0;VA FileMan;;Mar 30, 1999
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. HOSTHELP ;Called from HELP on the Host File prompt.
  1. N DDMPPATH
  1. S DDMPPATH=$$GET^DDSVALF("PTH",1,1)
  1. K ^TMP($J,"DDMPHOST")
  1. D GETHOSTS(DDMPPATH,$NA(^TMP($J,"DDMPHF")))
  1. S ^TMP($J,"DDMPHOST",1)="Enter the name of the host file that contains the data to be imported."
  1. I $D(^TMP($J,"DDMPHF")) D
  1. . S ^TMP($J,"DDMPHOST",2)=""
  1. . S ^TMP($J,"DDMPHOST",3)="These are the files in the "_DDMPPATH_" directory:"
  1. . N DDMPHFNM,I S DDMPHFNM=""
  1. . F I=4:1 S DDMPHFNM=$O(^TMP($J,"DDMPHF",DDMPHFNM)) Q:DDMPHFNM="" S ^TMP($J,"DDMPHOST",I)=DDMPHFNM S:I#2 ^(I,"F")="?40"
  1. . D EN^DDIOL("","^TMP($J,""DDMPHOST"")")
  1. K ^TMP($J,"DDMPHF"),^TMP($J,"DDMPHOST")
  1. Q
  1. ;
  1. GETHOSTS(DDMPPATH,DDMPHFAR) ;
  1. ;Obtains list of all host files in a specified directory.
  1. ;Input:
  1. ;DDMPPATH - Directory name w/ full path.
  1. ;DDMPHFAR - Target array for output from $$LIST^%ZISH call.
  1. N DDMPHF
  1. I DDMPPATH="" Q
  1. S DDMPHF("*.*")=""
  1. K @DDMPHFAR
  1. I $$LIST^%ZISH(DDMPPATH,"DDMPHF",DDMPHFAR)
  1. Q
  1. PAGE2 ;
  1. ;Call from page 2 pre-action.
  1. I $D(DDMPFRP4) K DDMPFRP4 Q
  1. I $G(DDMPF)="" D Q
  1. . S DDSBR="F_SEL^1^1"
  1. . D HLP^DDSUTL($C(7)_"You must choose a file before you can go to the Field Selection page.")
  1. S DDMPCF=$G(DDMPCF,DDMPF)
  1. D UNED^DDSUTL("LEN",1,2,$S($G(DDMPSMFF("FIXED"))="YES":0,1:1))
  1. I $G(DDMPSMFF("FIXED"))="YES",DDMPFDCT,'$D(DDMPFDSL("LN")) D
  1. . N DDMPHLP
  1. . S DDSBR="FLD_DEL"
  1. . S DDMPHLP(1)=$C(7)
  1. . S DDMPHLP(2)="You have specified a fixed length format for imported data."
  1. . S DDMPHLP(3)="However, you have not entered field lengths for fields you have chosen."
  1. . S DDMPHLP(4)="So, you must either delete all the fields entered so far"
  1. . S DDMPHLP(5)="or change the format to one that is not fixed length."
  1. . D HLP^DDSUTL(.DDMPHLP)
  1. Q
  1. ;
  1. LENCHK ;
  1. ;Called from the post action on change field of the Length: prompt pop-up page.
  1. I X="L" D
  1. . S DDSBR="LEN^1^2"
  1. E D
  1. . D DELFLD^DDMPSM
  1. . S DDSBR="FLD^1^2"
  1. . D PUT^DDSVALF("FLD",1,2,"")
  1. D PUT^DDSVALF(2,1,4,"")
  1. Q