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