Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

IncludeOrder Statement Summary

IncludeOrder is a terminal or nonterminal, utility statement that can occur only in command scripts. This statement computes the processing order of web site components based on their includes. The introduction of PageSliceslargely deprecated the need for this statement; however, it is still useful for finding missing includes and missing references.

 

The terminal form of the IncludeOrderstatement writes a report describing the results of the analysis. The nonterminal form authors a script contained in its substatements that can include the references found and the names of the pageslice files that have to be processed.

 

A command script using the IncludeOrderstatement follows the following general form.

 

Code Block
themeEclipse
languagenone
themeEclipse
linenumberstrue
   
<gmBasic>
      <Storage Action="Create" ... />
      <Select Local="..." />
      <Select System="..." />
      <Select Target="..." />
      <Load Page="filename(1)" />
           ...
      <Load Page="filemame(n)" />
      <Output Status="New" Filename="..." />
      <IncludeOrder ...
      <Storage Action="Close" />
   </gmBasic>
A major piece of the analysis performed by this statement involves finding all references to external components in the web site pages and verifying that those components are described via reference scripts stored in the search locations to be used when doing the translations. Therefore, those search locations must be specified here. The Load Pagestatements simple load the raw files into text buffers in the storage area so that they can be searched for external references and for includes.

 

The attributes of the IncludeOrderstatement are as follows:

 

AttributeDescription
IdentifierThis attribute is only used with the nonterminal form. It is a semicolon-delimited character string containing the parameter strings to be used when writing the substatement script. Each input record in that script is search for entries like %1d or %2d, etc. These are then replaced by the corresponding entry in this list.
FilenameThis attribute limits the analysis performed to the single page named by this attribute. This page must be one of the pages loaded. It can be helpful when initially setting up or for debugging particular issues that may be associated with the page.

The script errors associated with the IncludeOrderstatement are as follows:

 

ErrorDescription
1121Unable to locate requested file: %1d
1122Encountered EOF while reading search information.

The report generated by the terminal form IncludeOrderstatement begins with three statements

 

Code Block
themeEclipse
languagenone
themeEclipse
linenumberstrue
   The ordering over %d pages converged.
   There were %d references missing:
       list of missing references
   There were 1 order test iterations
Then the pages loaded, or the single one requested along with its includes, are listed in their suggested build order along with a listing of the files that they include.

 

The intent of the report generated by the nonterminal form of the command is to author the actual command script to be used to do the PageSlice oriented site translations. In is described in the Fmstocks topic.

Creating the Fmstocks Site Translation script

This discussions uses the Fmstocks sample ASP site to show how the IncludeOrder utility statement is used to aid in the creation of an initial PageSlice oriented translation command script. The Fmstocks code base consists of a set of VB6 projects and then a collection of ASP pages, some of which are only includes, that reference those projects. The assumption here is that the VB6 code has been translated and the libraries that it created have descriptions in the Localsearch location.

 

The first step is the create the initial IncludeOrdercommand script that will give an analysis report. This might look as follows

 

Code Block
themeEclipse
languagenone
themeEclipse
linenumberstrue
   <gmBasic>
      <Storage Action="Create" />
      <Select Local="C:\gmProj\FmStocks\IDF\FromCode" />
      <Select System="C:\gmProj\FmStocks\IDF\FromIDL" />
      <Select Target="C:\gmProj\FmStocks\IDF\FromIDL" />
      <Load Page=
          ...
      <Output Status="New" Filename="Order0.lst" />
      <IncludeOrder />
      <Storage Action="Close" />
  </gmBasic>
The problem, of course, are the Load Page statements. Web sites can contain thousands of pages. A simple way of generating this script is needed. In addition to the utility statements embedded within gmBasic there are also external utility statements available that are created via the gmNI and discussed under the gmNI Utilities topic. One of these is the LoadSite utility than is designed for just this type of situation. The command script needed to generate the needed IncludeOrdercommand script is simply

 

Code Block
themeEclipse
languagenone
themeEclipse
linenumberstrue
   
<gmBasic>
   <Storage Action="Create" />
   <LoadRuntime dllName="Document.dll" />
   <Output Status="New" Filename="Order0.xml" />
   <LoadSite Directory="C:\gmSrc\fmstocks\WebSite" Extensions="asa,asp" >
   <gmBasic>
      <Storage Action="Create" />
      <Select Local="C:\gmProj\FmStocks\IDF\FromCode" />
      <Select System="C:\gmProj\FmStocks\IDF\FromIDL" />
      <Select Target="C:\gmProj\FmStocks\IDF\FromIDL" />
      <Load Page="%filename%" />
      <Output Status="New" Filename="Order0.lst" />
      <IncludeOrder />
     <Storage Action="Close" />
   </gmBasic>
   </LoadSite>
   <Storage Action="Close" />
  </gmBasic>
Running the command script produces an Order0.xml file that contains the needed set of Load Pagestatements. Running that script produces a report

 

Code Block
themeEclipse
languagenone
themeEclipse
linenumberstrue
   The ordering over 33 pages converged.
   There were 6 order test iterations
       ...
showing no missing references or missing includes, so the actual translation script can be authored by modifying the IncludeOrderstatement in the script.

 

Code Block
themeEclipse
languagenone
themeEclipse
linenumberstrue
   
<IncludeOrder Identifier="FmstockWeb;csh" >
   <gmBasic>
      <Storage Action="Create" Identifier="%1d"/>
      <Select DevEnv="VS2010" />
      <Select Dialect="%2d" />
      <Select Local="C:\gmProj\FmStocks\IDF\FromCode" />
      <Select System="C:\gmProj\FmStocks\IDF\FromIDL" />
      <Select Target="C:\gmProj\FmStocks\IDF\FromIDL" />
      <Select DeployLocation="C:\gmProj\FmStocks\Deploy\%1d_%2d" />
      <Select VirtualRoot="C:\gmSrc\FmStocks\WebSite" />
      %references%
      %compile%
      <Analyse />
      <Output Status="New" Filename="%1d.bnd" />
      <Author />
      <Storage Action="Close"/>
   </gmBasic>
   </IncludeOrder>
Running this script now produces the desired translation command script.

 

Code Block
themeEclipse
languagenone
themeEclipse
linenumberstrue
   <gmBasic>
      <Storage Action="Create" Identifier="FmstockWeb"/>
      <Select DevEnv="VS2010" />
      <Select Dialect="csh" />
         ...
      <Select DeployLocation="C:\gmProj\FmStocks\Deploy\FmstockWeb_csh" />
      <Select VirtualRoot="C:\gmSrc\FmStocks\WebSite" />
      <reference id="FMStocks_Bus.dll"/>
      <reference id="FMSStore_Bus.dll"/>
      <reference id="msado25.tlb"/>
      <reference id="FMStocks_Ext.dll"/>
      <reference id="FMStocks_DB.dll"/>
      <compile pageslice="C:\gmSrc\fmstocks\WebSite\401k.asp"/>
      <compile pageslice="C:\gmSrc\fmstocks\WebSite\AccountSummary.asp"/>
          ...
     <Analyse />
     <Output Status="New" Filename="FmstockWeb.bnd" />
     <Author />
     <Storage Action="Close"/>
 </gmBasic>
The name of the script and the desired dialect have been filled in. The meta variable %references% has been replaced by the set of needed Reference statements and the meta variable %compile% has been replaced by the needed set of Compile PageSlice statements.
Panel
bgColorCCFFFF
titleTable of Contents

Table of Contents