Last change
on this file since 1067 was 642, checked in by Sam Habiel, 15 years ago |
Modified directory structure; moved routines.
|
File size:
1.1 KB
|
Line | |
---|
1 | XBX12R ;IHS/ASDST/DMJ - READ X12 FILE [ 08/10/2004 12:13 PM ]
|
---|
2 | ;;4.0;XB;;Jul 20, 2009;Build 2
|
---|
3 | START ;start
|
---|
4 | D LOAD
|
---|
5 | D ^%ZISC
|
---|
6 | D VIEW
|
---|
7 | F D V2 Q:$G(XB12QUIT)
|
---|
8 | K ^TMP($J,"XB12")
|
---|
9 | K XB12QUIT,XB12CTR,XB12REC
|
---|
10 | Q
|
---|
11 | LOAD ;load file into global
|
---|
12 | W !!,"Load File",!
|
---|
13 | S %ZIS("B")="HFS"
|
---|
14 | D ^%ZIS
|
---|
15 | Q:POP
|
---|
16 | K ^TMP($J,"XB12")
|
---|
17 | S XB12REC=""
|
---|
18 | S XB12CTR=0
|
---|
19 | S XB12CTR2=0
|
---|
20 | S XB12DLM=""
|
---|
21 | F D Q:$$STATUS^%ZISH
|
---|
22 | .U IO R X#1
|
---|
23 | .Q:$$STATUS^%ZISH
|
---|
24 | .S XB12CTR2=XB12CTR2+1
|
---|
25 | .I XB12CTR2=106 S XB12DLM=X
|
---|
26 | .I X=XB12DLM D FILE Q
|
---|
27 | .S XB12REC=XB12REC_X
|
---|
28 | Q
|
---|
29 | FILE ;file
|
---|
30 | S XB12CTR=XB12CTR+1
|
---|
31 | S ^TMP($J,"XB12",XB12CTR)=XB12REC
|
---|
32 | S XB12REC=""
|
---|
33 | Q
|
---|
34 | VIEW ;view
|
---|
35 | S DA=0
|
---|
36 | F S DA=$O(^TMP($J,"XB12",DA)) Q:'DA D
|
---|
37 | .S XB12CTR=DA
|
---|
38 | W !,XB12CTR," segments loaded.",!
|
---|
39 | Q
|
---|
40 | V2 ;view continued
|
---|
41 | W !
|
---|
42 | S DIR(0)="LOC^1:"_XB12CTR
|
---|
43 | S DIR("A")="View lines"
|
---|
44 | D ^DIR K DIR
|
---|
45 | I Y["^" S XB12QUIT=1 Q
|
---|
46 | I Y="" S Y="1-"_XB12CTR
|
---|
47 | S XB12FR=+$P(Y,"-",1)
|
---|
48 | S XB12TO=+$P(Y,"-",2)
|
---|
49 | S:'XB12TO XB12TO=XB12FR
|
---|
50 | W @IOF
|
---|
51 | F I=XB12FR:1:XB12TO D Q:$G(XB12QUIT)
|
---|
52 | .I $Y+4>IOSL D
|
---|
53 | ..S DIR(0)="E" D ^DIR K DIR
|
---|
54 | ..I X["^" S XB12QUIT=1
|
---|
55 | ..W @IOF
|
---|
56 | .Q:$G(XB12QUIT)
|
---|
57 | .W !
|
---|
58 | .W "(",I,") "
|
---|
59 | .W ^TMP($J,"XB12",I)
|
---|
60 | Q
|
---|
Note:
See
TracBrowser
for help on using the repository browser.