Resolve
Use this command to resolve tokens within a file. The tokens can resolve to variables, attributes, or values in a data area. The command reads in a specified file and generates a new file, resolving any tokens encountered.
Syntax
RESOLVE sourceDocName targetDocName [APPEND]
where:
- SourceDocName is the name of the file containing the tokens. It can include a complete or partial folder path in the format C:\...\FileName. If FileName includes spaces, enclose it in double quotation marks; for example:
"C:\My Documents\My Variable File.txt"
- targetDocName is the name of the output document.
- APPEND is optional and adds the output to an existing text file.
If the named text file already exists and APPEND is not designated, the existing text file will be overwritten and any data stored in it will be lost.
Syntax example
RESOLVE sourceDocName.xml targetDocName1.xml
Syntax example
RESOLVE sourceDocName2.html targetDocName2.html APPEND
Within the source document, tokens are specified by enclosing the token between two square brackets [[ ]]. The following tokens are supported:
Token Type | Syntax and Description |
---|---|
Variables |
[[VARIABLE,VariableName]] Resolves to the specified variable. where
|
Attributes |
[[ATTRIBUTE, AttrClass, AttrName, AttrObject]] Resolves to the specified attribute. where
|
Base Data |
[[DATA, DataAreaName,SymName1,SymName2,.., [Format] ]] Resolves to the specified data value. where
|
Schedule Data |
[[SCHEDDATA,DataAreaName,SymName1,SymName2,...,SchedName, ExtraDimSymName1,ExtraDimSymName2,... [Format] ]] Resolves to the specified data value. where
|
Include |
[[INCLUDE, filename]] Resolves the specified file and inserts the resolved content into the current file. where
|
Note: *You may nest most tokens but variables cannot be nested within another variable.
Source File Example
The Resolve command can be used to generate xml reports that reference Longview data, attributes, and variables within a procedure.
The following snippet is an example of an xml file that references the supported tokens for the Resolve command:
CountryByCountryReporting.xml
<?xml version="1.0" encoding="utf-8"?>
<CBC_OECD version="">
<MessageSpec>
<SendingEntityIN>ABC Inc</SendingEntityIN>
<TransmittingCountry>CA</TransmittingCountry>
[[INCLUDE, XML_Header_RecCountry_Res.xml]]
<MessageType>CBC</MessageType> <!--MessageType_EnumType-->
<Language>EN</Language> <!--LanguageCode_Type*-->
<Warning>[[VARIABLE,warningText]]</Warning>
<Contact>Free text containing contact information</Contact>
<MessageRefId>SendersUniqueIdentfierForThisMessage</MessageRefId>
<MessageTypeIndic>[[VARIABLE,MessageTypeIndic]]</MessageTypeIndic>
<CorrMessageRefId>
[[DATA,da,MsgRefID,Dim1Set,Dim2Set,Dim3Set,Dim4Set,Dim5Set]]
</CorrMessageRefId>
<ReportingPeriod>
[[ATTRIBUTE, SYSTEM, ASReportingPer, DBDEFAULT]]
</ReportingPeriod>
</MessageSpec>
<CbcBody> <!--CbcBody_Type (unbounded)-->