![]() |
![]() |
![]() |
![]() |
![]() |
Batch Facilities
SDL Suite supports operations in batch mode, such as printing the documentation, analyzing an SDL structure and generating code. These operations are managed by the Organizer in a batch, windowless mode.
Batch Syntax
The syntax for a batch command is:
sdtbatch <systemfile> <options>Where <systemfile> and <options> are described in "Batch Options" on page 213.
When the sdtbatch command is issued, the Organizer interprets the command line arguments, performs the requested operation and then terminates. Error logging is performed by the Organizer.
Information concerning the batch job is directed the standard output device.
When executing a Batch command, external service management via the PostMaster interface is disabled.
Print Multiple Files
sdtbatch -p[rint] systemfile \[-s[elect] documentfile] \[-o[ption] optionfile]Prints the contents in the system file. Corresponds to clicking the Print quick button.
Print One File
sdtbatch -p[rint] \-s[elect] documentfile \[-o[ption] optionfile]Compare Two Diagram Files
This sdtbatch command produces a textual difference report. To get a graphical difference report, consider using the -grdiff option with the sdt startup command. Read more about this in chapter 2, Introduction to the SDL Suite.
sdtbatch -d[iff] [ -b ] [ -n ] \documentfile1 documentfile2Compares two SDL, HMSC or MSC diagram files. By default, a summary of how many differences that were found is printed. When using the -b option (verbose), information about every differing object is presented, including an SDT reference to the object in question. The use of the -n option corresponds to setting the option Ignore moved or resized objects to off. Normally this means that moved and resized symbols will not be detected as being different.
Analyze
sdtbatch -a[nalyse] systemfile \[-s[elect] diagramfile] \[-o[ption] optionfile]Analyzes the contents in the system file. Corresponds to the Analyze quick button.
Make
sdtbatch -m[ake] systemfile \[-s[elect] diagramfile] \[-o[ption] optionfile]Makes a target as specified by the system file. Corresponds to the Make quick button.
Extract Text
sdtbatch -extract [ -comment ] \[ -keyword <keyword> ] <diagram file>Extracts text from the diagram file. As default, all text in the diagram is shown. By using the -comment option, only text in comment symbols and /* C-style comments */ in other symbols is shown. The -keyword option limits the shown text to text from symbols containing the <keyword>. The <keyword> itself is not shown. For instance, if you have a comment symbol with the following text:
diagramversion 1.44sdtbatch -extract -comment \-keyword diagramversion a.ssy...will produce the following output:
1.44Show License Information
sdtbatch -licenseinfoShow information about license holders and number of available licenses, as textual output in the console window where the command was entered.
Show Version Information
sdtbatch -v[ersion]Reports the current program version number for the installed tools.
List Files
sdtbatch -files systemfileLists all files referenced from the system file, as textual output in the console window where the command was entered.
Pack Files
sdtbatch -pack systemfile [ archivefile ]Create an archive file (*.tgz) for a system, using default pack settings. If the archive file name is not given, then an archive file will be created in target directory, with a default name.
Unpack Files
sdtbatch archivefile [ directory ]sdt archivefile [ directory ]Extracts an archive file into the current or supplied directory. If executed in normal mode it will open the systemfile.
Change Case
sdtbatch -changecase cross-reference-fileChange the case for all words found in all referenced files in the cross reference file to the case used in the declaration.
The command will also change the case for all keywords. These should be located in a special keyword file found in the same directory, with the same name as the name of the given cross reference file but with the extension .key.
The command does only work with the standard SDL text editor.
To generate a more extensive cross reference file and a file containing keywords, run the sdtbatch -analyze command with the options
SDLKeywordFile=TrueSetPredefinedXRef=Trueadded to the option file. The analyzer will then generate more information in the cross reference file, case-sensitive.xrf, and furthermore a keyword file, case-sensitive.key, in the target directory of the system.
Configuration Update
sdtbatch -r[ecursive] systemfile \[-s[elect] diagramfile] [-u[pdate]]Does a recursive update of the structure in the Organizer according to the Control Unit files in the system file. Corresponds to the Configuration > Update menu choice having the diagram file selected. Without the -s option the action is as if the systemfile has been selected.
Checking diagrams for duplicated object IDs
sdtbatch -checkdiagrams systemfilesdtbatch -checkandfixdiagrams systemfileNormally each object in an SDL diagram have a unique ID within the diagram. This ID can be shown for example when using the SDL editor command Show GR Reference. For some existing SDL diagrams, especially diagrams that have been created using the Merge or Add Differences functions, the same ID has been used by more than one object. This will result in unpredictable behaviour when using GR References, e.g. when transforming the system to case-sensitive SDL or when an analysis error should be shown, the wrong symbol might appear. Also if the two objects having the same ID are on the same SDL Page, the lines can be connected to symbols in a way that is different from the way you expect by looking at the geometrical layout of the lines. This can give strange errors when generating SDL/PR, giving strange analysis errors. This problem has been fixed in versions 4.2.7, 4.3.3, and 4.4, therefore diagrams that are saved with these or later versions will not have this problem.
To test the diagrams for duplicated IDs you can run the batch command -checkdiagrams. The command will produce a report on duplicates for all the SDL diagrams.
Whenever there are problems with duplicates you can run -checkandfixdiagrams. This will fix all duplicates and save the diagrams such that all diagrams are free from duplicated IDs.
Batch Options
- <systemfile>
- <systemfile> is an Organizer System File. A valid system file should be supplied.
- -select <file>
- <file>, which should be included in the document structure, (associated documents are also included if the -print option specified) becomes the selected object upon which the command is applied. This option corresponds to a manual selection of the document in the Organizer drawing area.
- A full file path for the file must be supplied.
- -o[ption] <optionfile>
- <optionfile> is a file with the same syntax as a System File, containing options which supersede the options found in the system file. An optional section CPP2SDLOPTIONS can manually be entered into the option file to supersede the SDL systems cpp2sdl import specification files. An arbitrary number of options may be supplied, but options in the file must be preceded with an option section field as found in the system file.
Example 11 : CPP2SDL section in a batch ".sdt" -file
[CPP2SDLOPTIONS]InputLanguageC=FalseInputLanguageCpp=TrueInputLanguageMicrosoft=FalseInputLanguageGNU=FalseRTTI=FalseRecognizeSDLsorts=FalseObjectSlicing=FalsePreprocessor=""UsePreprocessorOptions=FalsePreprocessorOptions=""PtrPrefix=ptr_KeywordPrefix=keyword_ArrPrefix=arr_IncompletePrefix=incomplete_TplPrefix=tpl_UscoreSuffix=uscoreNoAbsolutePath=TrueGenerateCPPTypes=FalseOptimizeClassPointers=False
- An optional section PRINTSETUPOPTIONS can manually be entered into the option file to identify the print setup options to be used during batch printing.
Example 12 : PRINTSETUP section in an options file used for batch printing
[PRINTSETUPOPTIONS]TOCAfterText=TrueOnlyChaptersInTOC=FalseOrganizerScale=FitPageLinkScale=100OMScale=100HMSCScale=100SCScale=100DPScale=100SDLInteractionScale=FitPageSDLFlowchartScale=FitPageSDLOverviewScale=100MSCScale=FitWidthCoverageScale=100IndexScale=100TypeScale=100MSCInstanceRuler=TrueOrgViewPageRef=True
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |