我有一个全局索引(XWES.ETI),我想用它来拉取花药表的下标。XWES.ETI 全局有一个下标(一个序列号),并且有两条数据我想用作缓存 sql 存储映射 (^ZIDETRP) 中定义的实际全局的下标。我的类编译没有错误,但不会加载并在 %AcquireLock 中出现错误,因为我创建的一个变量(edt)未定义。我知道这段代码很接近,但我似乎无法发现问题。建议任何人?课程如下:
Class System.ErrTest Extends (%Persistent, %XML.Adaptor) [ StorageStrategy = Legacy ]
{
Property ErrID As %Library.Integer;
Property ErrDt As %Library.Date;
Property ErrNum As %Library.Integer;
Property EDat As %Library.String;
/// Index iMaster on ErrID [IDKey,Unique];
Index iMaster On ErrID [ IdKey, Unique ];
<Storage name="Legacy">
<ExtentSize>100000</ExtentSize>
<IdLocation>^XWES.ETI</IdLocation>
<SequenceNumber>6</SequenceNumber>
<SQLMap name="Map1">
<Data name="EDat">
<Delimiter>$c(0)</Delimiter>
<Node>1</Node>
<Piece>1</Piece>
</Data>
<Data name="ErrDt">
<RetrievalCode> Set {*}=edt</RetrievalCode>
</Data>
<Data name="ErrNum">
<RetrievalCode> Set {*}=enum</RetrievalCode>
</Data>
<Global>^ZIDETRAP</Global>
<RowReference>^ZIDETRAP(edt,enum)</RowReference>
<Subscript name="1">
<AccessType>Other</AccessType>
<Accessvar name="1">
<Code> S edt=$p(^XWES.ETI({L1}),"^",1)</Code>
<Variable>edt</Variable>
</Accessvar>
<Accessvar name="2">
<Code> S enum=$p(^XWES.ETI({L1}),"^",2)</Code>
<Variable>enum</Variable>
</Accessvar>
<Expression>{ErrID}</Expression>
<NextCode> s {L1}=$Order(^XWES.ETI({L1}))</NextCode>
</Subscript>
<Type>data</Type>
</SQLMap>
<StreamLocation>^WSandlin.System.ErrTestS</StreamLocation>
<Type>%CacheSQLStorage</Type>
</Storage>
}