IBM
Contents Index Previous Next



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.

Note:

When executing a Batch command, external service management via the PostMaster interface is disabled.

Print Multiple Files

Syntax:

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

Syntax:

sdtbatch -p[rint] \
         -s[elect] documentfile \
         [-o[ption] optionfile] 

Prints one file.

Compare Two Diagram Files

Note:

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.

Syntax:

sdtbatch -d[iff] [ -b ] [ -n ] \
          documentfile1 documentfile2

Compares 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

Syntax:

sdtbatch -a[nalyse] systemfile \
        [-s[elect] diagramfile] \
        [-o[ption] optionfile] 

Analyzes the contents in the system file. Corresponds to the Analyze quick button.

Make

Syntax:

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

Syntax:

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.44

Then...

sdtbatch -extract -comment \
         -keyword diagramversion a.ssy

...will produce the following output:

1.44

Show License Information

Syntax:

sdtbatch -licenseinfo

Show information about license holders and number of available licenses, as textual output in the console window where the command was entered.

Show Version Information

Syntax:

sdtbatch -v[ersion]

Reports the current program version number for the installed tools.

List Files

Syntax:

sdtbatch -files systemfile

Lists all files referenced from the system file, as textual output in the console window where the command was entered.

Pack Files

Syntax:

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

Syntax:

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

Syntax:

sdtbatch -changecase cross-reference-file

Change 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=True

SetPredefinedXRef=True

added 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

Syntax:

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

Syntax:

sdtbatch -checkdiagrams systemfile
sdtbatch -checkandfixdiagrams systemfile

Normally 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

Example 11 : CPP2SDL section in a batch ".sdt" -file

[CPP2SDLOPTIONS]
InputLanguageC=False
InputLanguageCpp=True
InputLanguageMicrosoft=False
InputLanguageGNU=False
RTTI=False
RecognizeSDLsorts=False
ObjectSlicing=False
Preprocessor=""
UsePreprocessorOptions=False
PreprocessorOptions=""
PtrPrefix=ptr_
KeywordPrefix=keyword_
ArrPrefix=arr_
IncompletePrefix=incomplete_
TplPrefix=tpl_
UscoreSuffix=uscore
NoAbsolutePath=True
GenerateCPPTypes=False
OptimizeClassPointers=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=True
OnlyChaptersInTOC=False
OrganizerScale=FitPage
LinkScale=100
OMScale=100
HMSCScale=100
SCScale=100
DPScale=100
SDLInteractionScale=FitPage
SDLFlowchartScale=FitPage
SDLOverviewScale=100
MSCScale=FitWidth
CoverageScale=100
IndexScale=100
TypeScale=100
MSCInstanceRuler=True
OrgViewPageRef=True

Note:

Note that if the options contains a filename in quotes all backslashes must be escaped with one more backslash. Example of correct filename uses:
PrinterFile=d:\tmp\printfile.ps
or
PrinterFile="d:\\tmp\\printfile.ps"


http://www.ibm.com/rational
Contents Index Previous Next