source: WorldVistAEHR/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DDMPSM1.m@ 1714

Last change on this file since 1714 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.1 KB
RevLine 
[613]1DDMPSM1 ;SFISC/DPC-IMPORT SCREENMAN CALLS (CONT) ;9/20/96 11:28
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4HOSTHELP ;Called from HELP on the Host File prompt.
5 N DDMPPATH
6 S DDMPPATH=$$GET^DDSVALF("PTH",1,1)
7 K ^TMP($J,"DDMPHOST")
8 D GETHOSTS(DDMPPATH,$NA(^TMP($J,"DDMPHF")))
9 S ^TMP($J,"DDMPHOST",1)="Enter the name of the host file that contains the data to be imported."
10 I $D(^TMP($J,"DDMPHF")) D
11 . S ^TMP($J,"DDMPHOST",2)=""
12 . S ^TMP($J,"DDMPHOST",3)="These are the files in the "_DDMPPATH_" directory:"
13 . N DDMPHFNM,I S DDMPHFNM=""
14 . 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"
15 . D EN^DDIOL("","^TMP($J,""DDMPHOST"")")
16 K ^TMP($J,"DDMPHF"),^TMP($J,"DDMPHOST")
17 Q
18 ;
19GETHOSTS(DDMPPATH,DDMPHFAR) ;
20 ;Obtains list of all host files in a specified directory.
21 ;Input:
22 ;DDMPPATH - Directory name w/ full path.
23 ;DDMPHFAR - Target array for output from $$LIST^%ZISH call.
24 N DDMPHF
25 I DDMPPATH="" Q
26 S DDMPHF("*.*")=""
27 K @DDMPHFAR
28 I $$LIST^%ZISH(DDMPPATH,"DDMPHF",DDMPHFAR)
29 Q
30PAGE2 ;
31 ;Call from page 2 pre-action.
32 I $D(DDMPFRP4) K DDMPFRP4 Q
33 I $G(DDMPF)="" D Q
34 . S DDSBR="F_SEL^1^1"
35 . D HLP^DDSUTL($C(7)_"You must choose a file before you can go to the Field Selection page.")
36 S DDMPCF=$G(DDMPCF,DDMPF)
37 D UNED^DDSUTL("LEN",1,2,$S($G(DDMPSMFF("FIXED"))="YES":0,1:1))
38 I $G(DDMPSMFF("FIXED"))="YES",DDMPFDCT,'$D(DDMPFDSL("LN")) D
39 . N DDMPHLP
40 . S DDSBR="FLD_DEL"
41 . S DDMPHLP(1)=$C(7)
42 . S DDMPHLP(2)="You have specified a fixed length format for imported data."
43 . S DDMPHLP(3)="However, you have not entered field lengths for fields you have chosen."
44 . S DDMPHLP(4)="So, you must either delete all the fields entered so far"
45 . S DDMPHLP(5)="or change the format to one that is not fixed length."
46 . D HLP^DDSUTL(.DDMPHLP)
47 Q
48 ;
49LENCHK ;
50 ;Called from the post action on change field of the Length: prompt pop-up page.
51 I X="L" D
52 . S DDSBR="LEN^1^2"
53 E D
54 . D DELFLD^DDMPSM
55 . S DDSBR="FLD^1^2"
56 . D PUT^DDSVALF("FLD",1,2,"")
57 D PUT^DDSVALF(2,1,4,"")
58 Q
Note: See TracBrowser for help on using the repository browser.