Release notes for Sirius Mods V7.8: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
(No difference)

Revision as of 01:02, 30 October 2012

This document lists the enhancements and other changes contained in Sirius Mods version 7.8, which was released in November, 2010. The immediately preceding and following versions of the Sirius Mods are:

The previous version of the Sirius Mods, 7.7, became available in March, 2010.

Changes to classes and methods

Janus SOAP ULI

The following sections describe changes in the Janus SOAP ULI in this release.

New arguments for Record class ToXmlDoc method

The ToXmlDoc method in the Record class has the following new arguments:

CodepageTable This optional, NameRequired, Boolean argument, which defaults to False, specifies whether to use the base codepage translation table when creating the XmlDoc. For more details, see the description of the CodepageTable argument in "LoadFromRecord subroutine in XmlDoc and XmlNode classes".

This argument was actually introduced in version 7.6 of the Sirius Mods.

AllowNull The value of this optional, NameRequired, Boolean argument, which defaults to False, is copied to the AllowNull property of the XmlDoc created by ToXmlDoc. The XmlDoc's AllowNull property, in turn, determines whether field values that contain the X'00' character are stored in the XmlDoc with base64 encoding. Such values are base64 encoded if AllowNull is False.

For more information, see the description of the AllowNull argument in "NewFromRecord shared function in XmlDoc class".

This argument was actually introduced in version 7.7 of the Sirius Mods.

Field references in Record class CurrentRecord methods

For methods declared with a CurrentRecord attribute, it was the case under Sirius Mods 7.7 that field references were an exception to the following rule:
Statements within the method definition, even a CurrentRecord method call, may reference the record without having to be wrapped inside a record For loop.

Under Sirius Mods 7.8, field references are no longer an exception to this rule. You may reference a record field from within a method declared with CurrentRecord without being inside a record For loop.

For example, for the field COLOR, the For Record currentRecord and End For statements containing the print COLOR statement in the method definition below may be discarded under Sirius Mods 7.8:

local subroutine (Record in file myproc):printField currentRecord in file myproc for record currentRecord print COLOR end for end subroutine

New class: PersistentObjectInfo

Sirius Mods 7.8 contains the new PersistentObjectInfo class, which contains information about a global or session object in the current thread.

PersistentObjectInfo objects offer the advantage of the sorting, finding, and subsetting facilities of collections.

Three pieces of information (provided by class functions named as follows) are available for a global or session object in the PersistentObjectInfo class:

Name The global/session name associated with the object.
SetTime The time the global/session object was set in YYYYMMDDHHMISSXXX format.
ClassDescription A description of the class of the object. For example, "System:Stringlist", or "MyUserLanguageClass", or "Arraylist of Object MyUserLanguageClass".

SetTime and ClassDescription are intended for debugging and problem diagnosis and not for application purposes.

Creating PersistentObjectInfo objects

One way of creating a PersistentObjectInfo object is with the NewFromGlobal method or the NewFromSession method. These methods take a single, required, unnamed string parameter which indicates the name of the global or session variable.

Probably the most common way of creating PersistentObjectInfo objects is using the GlobalList and SessionList methods. These are shared methods that return an Arraylist of Object PersistentObjectInfo.

The GlobalList and SessionList methods have one optional parameter that contains the name of the variables to be returned, with wildcards allowed.

The PersistentObjectInfoList type

As a coding convenience, this Info class feature also introduces a new User Language %variable declaration type: PersistentObjectInfoList. This type is defined as an "Arraylist of Object PersistentObjectInfo". Consequently, instead of a declaration like this one:

%persInfoList is arraylist of object persistentObjectInfo

You can simply specify:

%persInfoList is type persistentObjectInfoList

Note: The keyword Type is required.

The GlobalList and SessionList Object class methods

In addition to belonging to the PersistentObjectInfo class, the GlobalList and SessionList methods are also Object class shared methods. This means that both of these statements are valid:

%persInfoList = %(persistentObjectInfo):globalList %persInfoList = %(object):globalList

New exception class: BadJournal

The BadJournal exception class reports errors in CCAJRNL or CCAJLOG datasets or streams, including naming errors. The New method of the Journal system class is the system method that automatically throws a BadJournal exception.

The following example shows a Try and Catch of a Journal class, New method, exception. An invalid journal name is specified to generate the BadJournal exception:

    Begin
 
    %sl        is object stringlist
    %rc        is float
    %journal   is object journal
    %bdjrnl    is object BadJournal
 
    try printtext {~} is: {%journal = new('OLD~RNL')}
      catch BadJournal to %bdjrnl
      Print 'Failure!!! Reason code is: ' %bdjrnl:reasonCode
    end try
 
    %rc = %sl:appendJournalData( -
              Options='MAXIO=1000 WIDTH=138 ST AA USER', -
              Threads='*', Journal=%journal)
    Print %rc
    Print %sl:count
    %sl:print
 
    End

The Stringlist AppendJournalData method does not cancel if its Journal parameter is null. The request result shows the reason code (ReasonCode property value) stored in the exception object:

    %journal = new('OLD~RNL') is: Failure!!! Reason code is: 1
    0
    0

The methods of the BadJournal class are described in the following subsections.

New constructor

This constructor generates an instance of a BadJournal exception. As shown below, the optional argument of the New method is a setting of the ReasonCode property.

New constructor syntax
  [%bdJrnl =] [%(BadJournal):] New(ReasonCode=num)
ReasonCode property

This ReadOnly property returns a numeric reason code that indicates the cause of the BadJournal exception.

ReasonCode syntax

%rc = %bdJrnl:ReasonCode


Possible reason codes are:

1 Either the dataset or stream name is invalid, or the journal is invalid.
2 The dataset or stream is empty.
3 The journal was created with a different Model 204 version than the current Online.
4 A merged journal is invalid.

New Collection methods

Seven new methods are added to each of the collection classes in Sirius Mods Version 7.8.

The Sum, Average, Variance, and StandardDeviation methods

These functions have the same syntax and perform mathematical operations:

Sum Returns the simple sum of the values of the items in the collection.
Average Returns the average of the values of the items in the collection.
Variance Returns the "mean standard deviation" of the values of the items in the collection. From statistics, this is the average of the squares of the deviations of the value of each item from the mean of all the items.
StandardDeviation Returns the standard deviation, the variation from the mean, of the values of the items in the collection. This is the square root of the collection's variance.

Here is an example:

b %al is arrayList of float %al = new %al:add(5) %al:add(3) %al:add(8) print %al:sum print %al:average print %al:variance print %al:standardDeviation end

The result is:

16 5.33333333333333 4.22222222222222 2.05480466765633

The syntax of the methods is:

%num = %collectionType:methodName( [method] )

Where:

%num A Float variable to contain the numeric result.
%collectionType An Arraylist, NamedArraylist, FloatNamedArraylist, or UnicodeNamedArraylist object variable.
method A function that operates on the type of the items in the collection. It may be a local method or method variable or a class member (Variable, Property), and it must return an intrinsic (probably Float) value. The default method value is the special identity function, This, which simply returns the item value.

The optional method parameter lets you further manipulate the collection item values before performing the requested method's operation. If your collection's items are not intrinsic values, you must specify a function that can map the item values to intrinsic values or the method will fail.

For example, for a collection that is a list of coordinates, you could return the average of their distance from the origin by first applying a local function as the Average method's method parameter:

b class point public constructor new(%x is float, %y is float) variable x is float variable y is float end public constructor new(%x is float, %y is float) %this:x = %x %this:y = %y end constructor end class local function (point):distance is float return (%this:x * %this:x + %this:y * %this:y):squareRoot end function %al is arrayList of object point %al = new %al:add(new(1,1)) %al:add(new(3,4)) %al:add(new(-5,12)) print %al:average(distance) end

The result is 6.47140452079103.

The CountSubset method

The CountSubset function returns the number of items in a collection that match a specified selection criterion. It is related to the SubsetNew collection mathod, which returns not the count but a collection of the matching items for a specified criterion.

The syntax of the method is:

%num = %collectionType:CountSubset( criterion )

Where:

%num A float variable to contain the numeric result.
%collectionType An Arraylist, NamedArraylist, FloatNamedArraylist, or UnicodeNamedArraylist object variable.
criterion A SelectionCriterion object, which is a relational expression that is applied to each collection item value to determine whether the value satisfies the expression. This is a required parameter.

As a simple example, for the ArrayList whose items are the odd integers between 0 and 10, and the selection criterion LT(this, 9)), CountSubset returns 4.

The MinItem and MaxItem methods

The MinItem and MaxItem functions return the minimum and maximum values in a collection. They are related to the Minimum and Maximum collection methods, which return the number or name of the item that has the minimum or maximum value in the collection.

The syntax of these methods is:

%num = %collectionType:methodName( [method] )

Where:

%num A float variable to contain the numeric result.
%collectionType An Arraylist, NamedArraylist, FloatNamedArraylist, or UnicodeNamedArraylist object variable.
method A function that operates on the type of the items in the collection. It may be a local method or method variable or a class member (Variable, Property), and it must return an intrinsic (probably Float) value. The default method value is the special identity function, This, which simply returns the item value.

The optional method parameter lets you further manipulate the collection item values before performing the requested method's operation. If your collection's items are not intrinsic values, you must specify a function that can map the item values to intrinsic values or the method will fail.

For the ArrayList %al whose items are the odd integers between 0 and 10, %al:maxItem returns 9.

New intrinsic methods

The ToDegrees, ToRadians, and StringTokenizer methods
ToDegrees

This Float function converts to angular degrees its floating point argument which is a number of radians.

The syntax of ToDegrees is: Where:

%number A variable to contain the number of degrees of the method object.
float A Float (datatype) value that is the number of radians.

The following example shows the result of several ToDegrees calls:

begin printText {~} = {1:toDegrees} printText {~} = {0:toDegrees} printText {~} = {0.1:toDegrees} printText {~} = {-0.1:toDegrees} printText {~} = {3.1415926:toDegrees} printText {~} = {$pi:toDegrees} end

The result is:

1:toDegrees = 57.2957795130823 0:toDegrees = 0 0.1:toDegrees = 5.72957795130823 -0.1:toDegrees = -5.72957795130823 3.1415926:toDegrees = 179.999996929531 $pi:toDegrees = 180

ToRadians

This Float function converts to radians its floating point argument which is a number of angular degrees.

The syntax of ToRadians is: Where:

%number A variable to contain the number of radians of the method object.
float A Float value that is the number of degrees.

The following example shows the result of several ToRadians calls:

begin printText {~} = {57:toRadians} printText {~} = {0:toRadians} printText {~} = {120:toRadians} printText {~} = {-120:toRadians} printText {~} = {360:toRadians} end

The result is:

57:toRadians = 0.994837673636768 0:toRadians = 0 120:toRadians = 2.0943951023932 -120:toRadians = -2.0943951023932 360:toRadians = 6.28318530717959

StringTokenizer

The String class StringTokenizer function returns a new instance of a StringTokenizer object using the method object string as the tokenizer string.

The StringTokenizer syntax is:

where:

%stringTokenizer A StringTokenizer object expression to contain the new object instance.
string The string to be tokenized.
TokenChars This name required string argument TokenChars is a set of single-character token-delimiters (delimiters that are also tokens) that may be separated by whitespace characters.
Spaces This name required string argument Spaces is a set of "whitespace" characters, that is, characters that separate tokens.
Quotes This name required string argument Quotes is a set of quotation characters.
Date/time conversion methods

These new date conversion methods correspond to the $Sir_Date2N* group and to the $Sir_N*2Date group.

String class:

Float class:

New SelectionCriterion methods: IsNull and IsNotNull

These shared methods take no parameters and create a new SelectionCriterion object. The methods provide control for Null objects in the collection you are searching. They also let you determine whether a collection contains items that are objects, because they cancel the request if the collection being searched contains non-object (intrinsic type) items.

An IsNull criterion selects a collection item if the item is a Null object; an IsNotNull criterion selects an item object if it is not Null.

The syntax of the methods follows:

The examples below test a variety of searches against Arraylist %al of objects of class T:

class T public variable x is float end public end class %al is arraylist of object t %t is object t %t1 is object t %t2 is object t %t1 = null %t2 = new %al = list(%t1, %t2)

  1. The Arraylist class FindNextItem method, which throws an exception if its selection criterion matches no item, fails in the Try clause below when it tests the Null object item. The method's exception is not thrown because the test failure prevents the method from completing its search:

    try %t = %al:findNextItem(EQ(x,1)) printtext found t printtext {~} = {%t:x} catch itemNotFound printText None! end try

    The result is:

    CANCELLING REQUEST: MSIR.0750: Class ARRAYLIST, function FindNextItem: reference to null object in line xx

    To complete this request without cancellation, you can use an IsNotNull criterion to bypass Null items:

    try %t = %al:findNextItem(AND(isNotNull, EQ(x,1))) printtext found t printtext {~} = {%t:x} catch itemNotFound printText None! end try

    The search finds no matching items, so the Catch clause above catches the method's ItemNotFound exception, and the result is:

    None!

  2. Instead of bypassing Null items, you might instead want the search to include them:

    try %t = %al:findNextItem(OR(isNull, EQ(x,1))) printtext found t printtext {~} = {%t:x} catch itemNotFound printText None! end try

    The Null item is found, but the Try clause PrintText invocation of %t:x fails, and the result is:

    CANCELLING REQUEST: MSIR.0561: Text output: reference to null object in line xx

    If you want to search exclusively for the next Null item in a collection, you can simply use this:

    %t = %al:findNextItem(isNull)

  3. To successfully locate the non-Null item in %al, you could use either of the following method calls in the Try clause:

    %t = %al:findNextItem(isNotNull) %t = %al:findNextItem(AND(isNotNull, EQ(x,0)))

    Thanks to the change in the Eq criterion in the second call above, the result of trying either of these searches is:

    found t %t:x=0

New Stringlist class methods

AppendFieldValues and AppendFieldImages are new Stringlist variants of $Field_List and $Field_ListI. AppendFieldValues has the same parameters as $Field_list except they are all NameRequired. AppendFieldImages has the same parameters as $Field_listI except they are NameRequired parameters.

New StringTokenizer methods

Several new methods are added to the StringTokenizer class in Sirius Mods Version 7.8.

The Separators method

This readWrite property introduces another class of characters in the StringTokenizer to delimit, or separate, tokens. Prior to this version, only Spaces and TokenChars characters were available to separate tokens. The new Separators characters are similar to Spaces and TokenChars, but in addition to delimiting tokens, Separators characters:

  • do not compress to a single separator (like Spaces characters)
  • are not themselves tokens (like TokenChars characters), so are not returned by repeated NextToken calls that encounter consecutive Separators characters

Separators provide a way to handle consecutive occurrences of the same token delimiter character, for example, in a comma-separated value (csv) file, where they indicate a missing value. As an example, the adjacent separators in the token string below are detected and returned as nulls by the NextToken method:

b %toke is object StringTokenizer %toke = new(separators=',;') %toke:string = '0,1,2,,4,;6' repeat while %toke:notAtEnd printtext {~} = '{%toke:nextToken}' end repeat end

The result is:

%toke:nextToken = '0' %toke:nextToken = '1' %toke:nextToken = '2' %toke:nextToken = '' %toke:nextToken = '4' %toke:nextToken = '' %toke:nextToken = '6'

Separators override default and explicitly defined Spaces characters. For example, if the only change to the example above is that the tokenizer string is "please, don't go", the result is:

%toke:nextToken = 'please' %toke:nextToken = 'don't go'

The blank after don't does not act as a token delimiter.

Note: Separators do not override explicitly defined TokenChars characters. If both separators and token characters are defined, all such characters act as token delimiters.

The CompressSpaces, FoldDoubledQuotes, and QuotesBreak methods

These readWrite properties all return or set a Boolean value.

The CompressSpaces property

CompressSpaces compresses the intermediate spaces in a string of whitespace characters. For example, consider the following %toke StringTokenizer string, defined with a blank as the whitespace character and with comma as a non-token separator character:

this, is a compression , example

Without compression, repeated calls of %toke:NextToken strip the leading and trailing whitespace and select the following tokens:

this is a compression example

Without compression, that is, with CompressSpaces set to True, the result is:

this is a compression example

CompressSpaces compresses a token's intermediate whitespace to a single whitespace character. If multiple whitespace characters are defined, the first character in the Spaces string is the character to which intermediate whitespace is compressed. For example, if Spaces='X ', the token 'foot ball' will compress to 'footXball'.

The CompressSpaces default value is False.

The FoldDoubledQuotes property

The practice of doubling an apostrophe ( ' ) to yield a single apostrophe is common in User Language Print statements. For example, the result of Print 'Please, don''t go' is:

Please, don't go

The doubled, or escaped, apostrophe is implicitly folded to a single apostrophe. Similarly, if double quotation marks instead of the apostrophes are used to indicate a quoted string (as is allowed as of Sirius Mods version 7.8): Print "Please, don""t go"

The result is:

Please, don"t go

The escaped double quotation mark is implicitly folded to one double quotation mark.

The StringTokenizer, however, does not perform this implicit folding if it encounters a doubled Quotes character within a quoted region. For example:

b %toke is object StringTokenizer %toke = new(quotes='"') %toke:string = '"Please, don""t go"' repeat while %toke:notAtEnd printtext {~} = '{%toke:nextToken}' end repeat end

The result of this request is:

%toke:nextToken = 'Please, don' %toke:nextToken = 't go'

To provide for cases where you might expect or want implicit folding of a doubled Quotes character, version 7.8 adds the FoldDoubledQuotes property to the StringTokenizer class. If the FoldDoubledQuotes property is set to True (this is not the default), the tokenizer considers two adjacent Quotes characters within a quoted region that is begun by the same Quotes character to be an escape sequence for a single quotation character, and the result of tokenizing %toke:string = '"Please, don""t go"' from the previous request is:

Please, don"t go

The QuotesBreak property

QuotesBreak determines whether quotes are considered boundaries of tokens. The string peanut"butter" will tokenize to peanut and butter when QuotesBreak is true. Otherwise it will tokenize to peanutbutter (assuming RemoveQuotes is set). QuotesBreak is True by default.

The PreviousChar, PeekPreviousChar, and StringUpTo methods

PreviousChar returns the value of the character that precedes the character that is at the tokenizing position, and it steps the tokenizing position back to the preceding character.

PeekPreviousChar returns the value of the character that precedes the character that is at the tokenizing position. It does not change the tokenizing position.

StringUpTo advances the tokenizer position past the next occurrence of its argument string, and it returns a substring of the tokenizing string, starting at the current position and ending just before the occurrence of its argument string.

New System class methods

The LastSubsystemErrorFile, LastSubsystemErrorSubsystem, and LastSubsystemErrorProcedure methods return information about the invoked procedure that forced transfer to the APSY error procedure.

These date retrieval methods corresponding to the $Sir_DateN* group and to $Sir_Date:

Aliases for class names

As of Sirius Mods Version 7.8, you can define an alias name for an existing user class. You do so by specifying an Alias parameter setting on the existing class declaration. For example, you are changing a naming convention for some code, and you want to refer to user-defined class Blue by another name, say Indigo. Your class declaration would be:

class blue alias indigo

You can then use either the primary class name or the alias when declaring objects of the class:

%foo is object blue %bar is object indigo

An object of the alias class is compiled as an object of the primary class, and the runtime class of an object variable that was defined using an alias is the primary class. Consequently, all system messages you receive will specify the primary class.

For example, given the declarations above, if you call method TouchUp for an object declared for the Indigo class:

%bar:touchUp

And method TouchUp does not exist in the class, the error message you receive is:

MSIR.0733: Member TOUCHUP not found in class Blue

While this might seem potentially confusing, aliases are intended primarily for migrating class names, so any confusion will be limited to this migration period. In addition, only the owner of a class can declare an alias, so aliases are not likely to proliferate in your site's code.

Should it ever be necessary, you may also specify multiple aliases:

class blue alias indigo and ultramarine and navy

You may declare a user-defined class with an alias name that matches the name of a system class.

Success block added to exception catching

You use a Try/Catch statement block to catch a thrown User Language exception. For example, the following block catches an InvalidSortSpecification exception thrown by a Stringlist Sort statement:

try %strlist:sort(%sortSpec) catch invalidSortSpecification Print 'Invalid sort spec' end try

However, in more complex cases, opportunity for confusion exists if you want to execute additional statements after a Try statement if it produces no exceptions:

try <a>... <b>... <c>... <d>... <e>... catch foo <x>... catch bar <y>... catch another <z>... end try

The problem is that there's no way to know that <b>, <c>, <d>, and <e> can't throw an exception that might be one of the caught exceptions. In fact they might, but you might not expect an exception from any of them in this context. There seems no good way of preventing the catches to be in effect for them.

But as of Sirius Mods Version 7.8, you can use a Success block to make it clear that the catches apply to statement <a> and do not apply to <b>, <c>, <d>, and <e>:

try <a>... success <b>... <c>... <d>... <e>... catch foo <x>... catch bar <y>... catch another <z>... end try

The principle benefits of the Success statement are:

  • It makes it clear in the code which statement is expected to produce the exceptions being caught.
  • It prevents a catch from accidentally catching an exception from a statement that didn't really expect that exception.

You can also reverse the order of the the Success and catches:

try <a>... catch foo <x>... catch bar <y>... catch another <z>... success <b>... <c>... <d>... <e>... end try

New common enumeration method: FromString

Sirius Mods Version 7.8 adds the FromString shared function as a method common to all system and user-defined enumerations. FromString converts a string argument into a value of the specified enumeration type. This is the opposite of an enumeration ToString method, which converts an enumeration value to its String representation.

As an example, consider the following user-defined enumeration:

enumeration Animal public value cat value dog value gecko value parrot end public end enumeration

You can populate an Animal enumeration variable with one of the Animal enumeration values by making a call to FromString:

%pet is enumeration animal %pet = fromString('gecko')

The result of a Print of %pet above is gecko. In the method call, fromString does not have to be preceded by %(Animal): to identify the type of enumeration, because the FromString method is automatically available for any User Language enumeration, system or user-defined.

Only strings that match a value of the particular enumeration type can be converted. If a string cannot be converted to an enumeration value, FromString throws an InvalidValue exception:

%pet = fromString('alien') *** 1 CANCELLING REQUEST: MSIR.0750: Class Animal, function FromString: InvalidValue exception: ALIEN is not a valid enumeration value in line 84, procedure ENUM, file MYPROC

Enumeration comparisons

The SelectionCriterion Eq and Ne methods now allow equality and inequality tests for enumerations so that you can do something like:

%suspects = %villagers:subsetNew(or(eq(evil, true), ne(nationality, usa)))

where Nationality is an enumeration. Enumeration comparisons are not allowed in any other SelectionCriterion methods.

Enumeration attributes and attribute inverses

User Language enumeration support now includes enumeration attributes. These are constant data (types String, Float, and Enumeration are supported) that can be attached to enumeration values. Here's an example:

enumeration coffee public attribute oz is float attribute price is float value tall (oz=12, price=2.99) value grande (oz=16, price=3.99) value venti (price=4.99, oz=20) end public end enumeration %order is enumeration coffee %order = venti printtext {~} = {%order:price}

The result is:

%order:price = 4.99

New generic inverse attribute methods return an enumeration value based on the value of one of its attributes. You do this by declaring an "inverse" method after an attribute declaration. The fromOz method below is an example:

enumeration coffee public attribute oz is float inverse fromOz value tall (12) value grande (16) value venti (20) end public end enumeration %order is enumeration coffee %order = fromOz(16) Print %order

The result is:

grande

Anonymous functions

Anonymous functions are methods whose definition you specify but do not bind to a specific name. Typically, you define such a method in the context in which it is actually used.

Janus SOAP XmlDoc API

The following sections describe changes in the Janus SOAP XmlDoc API in this release.

XPathError exceptions

All XmlDoc and XmlNode class methods that accept XPath arguments now can throw an XPathError exception.

An example of using the XPathError exception is:

%err Object XPathError Try %d:Print('a b c') Catch XPathError To %err PrintText {~} = {%err:Reason} PrintText {~} = {%err:Description} PrintText {~} = {%err:CharacterPosition} End Try

Since the expression in the above invocation of the Print method (a b c) is not a valid Xpath expression, the above fragment will result in the following:

%err:Reason = SyntaxError %err:Description = Expect "/" for new step or "[" for predicate %err:CharacterPosition = 3

The methods in the XmlDoc and XmlNode classes that can throw an XPathError exception are:

  • Audit
  • DefaultURI
  • DeleteSubtree
  • Exists
  • Length
  • LocalName
  • Prefix
  • PrefixURI
  • Print
  • Qname
  • SelectCount
  • SelectNodes
  • SelectSingleNode
  • Serial
  • ToXpathStringlist
  • Trace
  • Type
  • UnionSelected
  • Uri
  • Value
  • ValueDefault
  • XPathNodeID
The XPathError exception class

The members of the XPathError exception class are described below. Except for the constructor, New, all class members are ReadOnly properties:

Reason An enumeration of type XmlPathErrorReason. The possible values are:
SyntaxError A violation of the syntax of an Xpath expression.
EmptyResult There are no nodes matched by the XPath expression, and the method requires at least one matching node.
CharacterPosition The position within the XPath expression at or before which the error was detected.
Description A message that explains the error.
New The constructor for the class, New lets you set values for each member of the class.

%ex = New ( Reason = reasonEnum - [, CharacterPosition = num] - [, Description = string] )

The Reason argument is required. All other arguments are optional, NameRequired, and have default values of the null string or 0 as appropriate.

NewFromRecord shared function in XmlDoc class

This shared function creates a new XmlDoc object which contains the fields and fieldgroups from the current record. This record extraction is the same operation that is performed by the LoadFromRecord subroutine and by the ToXmlDoc function in the Record class.

Whether to use ToXmlDoc, NewFromRecord, or LoadFromRecord depends on what is most convenient for your application. If you are already using a Record object which references the desired record, using ToXmlDoc may be more convenient; if not, then either NewFromRecord or LoadFromRecord (both of which require that the method be contained in a “record loop”) may be more convenient. You must use LoadFromRecord if you want to add the record's content as a subtree to a non-empty XmlDoc; in other cases the NewFromRecord “factory method” may be your choice.

Since NewFromRecord and ToXmlDoc create new XmlDoc objects, they have the AllowNull argument for setting the created XmlDoc's AllowNull poperty; LoadFromRecord does not have the AllowNull argument.

As stated, both NewFromRecord and LoadFromRecord must be contained in a “record loop”, for example, an FRN block, and they may not be invoked within a fieldgroup context.

Except for these considerations, ToXmlDoc, NewFromRecord, and LoadFromRecord all perform the same operation and have the same arguments. The discussion of the “extract from record to XmlDoc” operation, generally uses LoadFromRecord, except where one of these considerations is relevant to the discussion.

The arguments to NewFromRecord are shown in this syntax:

%newXmlDoc = %(XmlDoc):NewFromRecord( - [AttributeValues=bool] - [, AttributeNames=bool] - [, NamesToLower=bool] - [, AllowUnreversible=bool] - [, CodepageTable=bool] - [, AllowNull=bool] )

Descriptions of some of the arguments follow:

%newXmlDoc NewFromRecord returns a new XmlDoc object.
%(XmlDoc) The class name in parentheses denotes a shared method and is one way to invoke NewFromRecord. You can also use an object expression whose type is XmlDoc (even if the value of the expression is null).
AllowNull The value of this Boolean argument, which defaults to False, is copied to the AllowNull property of the XmlDoc created by NewFromRecord.

The XmlDoc's AllowNull property, in turn, determines whether field values that contain the X'00' character are stored in the XmlDoc with base64 encoding. Such values are base64 encoded if AllowNull is False.

A False value of the AllowNull property of an XmlDoc is its default. This prevents null characters from being stored in the XmlDoc, so it will be conformant to the XML Recommendation, which does not allow null characters in an XML document.

The following fragment:

%s = 'Field with null/' With '00':X With '/' Store Record FOO = %s End Store %r = $CurRec FRN %r %doc = %doc:NewFromRecord End For PrintText {~} = {%doc:AllowNull} %doc:Print

produces this output:

%doc:AllowNull = False <Record version="1" file="QAWORK" number="1"> <field name="FOO" encoding="base64"> xomFk4RApomjiECVpJOTYQBh </field> </Record>

In the above output, notice that FOO is base64 encoded, because it contains a null character, and null characters are not allowed in an XmlDoc whose AllowNull property is False. The following fragment:

%s = 'Field with null/' With '00':X With '/' Store Record FOO = %s End Store %r = $CurRec FRN %r %doc = %doc:NewFromRecord(AllowNull=True) End For PrintText {~} = {%doc:AllowNull} %doc:Print

produces the following output:

%doc:AllowNull = True <Record version="1" file="QAWORK" number="1"> <field name="FOO"> Field with null/&#x0;/ </field> </Record>

In the above output, FOO is not base64 encoded; the XmlDoc contains a null character, which is displayed by the Print method using a character reference (&#x0;). This may be useful for visually inspecting the contents of the XmlDoc, again noting that such a document is not, strictly speaking, conformant to the XML Recommendation.

See the description of the AttributeValues argument of the LoadFromRecord subroutine for a list of all conditions which force base64 encoding of the "field" element.
Other NewFromRecord arguments See LoadFromRecord for a discussion of all the other arguments of NewFromRecord.

See the LoadFromRecord section below for a discussion of extracting the contents of the current record into an XmlDoc.

Note that this method was actually introduced in version 7.6 of the Sirius Mods, although the AllowNull argument was not provided until version 7.7 of the Sirius Mods.

LoadFromRecord subroutine in XmlDoc and XmlNode classes

This subroutine adds to an XmlDoc object a subtree that contains the fields and fieldgroups from the current record. This record extraction is the same operation that is performed by the NewFromRecord function and by the ToXmlDoc function in the Record class.

Whether to use ToXmlDoc, NewFromRecord, or LoadFromRecord depends on what is most convenient for your application. If you are already using a Record object that references the desired record, using ToXmlDoc may be more convenient; if not, then either NewFromRecord or LoadFromRecord (both of which require that the method be contained in a “record loop”) may be more convenient. You must use LoadFromRecord if you want to add the record's content as a subtree to a non-empty XmlDoc; in other cases, the NewFromRecord “factory method” may be your choice.

Since NewFromRecord and ToXmlDoc create new XmlDoc objects, they have the AllowNull argument for setting the created XmlDoc's AllowNull property. LoadFromRecord does not have the AllowNull argument.

As stated, both NewFromRecord and LoadFromRecord must be contained in a “record loop” (for example, an FRN block), and they may not be invoked within a fieldgroup context.

Except for these considerations, ToXmlDoc, NewFromRecord, and LoadFromRecord all perform the same operation and have the same arguments. The discussion of the “extract from record to XmlDoc” operation generally uses LoadFromRecord, except where one of these considerations is relevant to the discussion.

The arguments to LoadFromRecord are shown in the following syntax:

%xmlNr:LoadFromRecord( - [AttributeValues=bool] - [, AttributeNames=bool] - [, NamesToLower=bool] - [, AllowUnreversible=bool] - [, CodepageTable=bool] )

Where:

%xmlNr LoadFromRecord is in both the XmlDoc and XmlNode classes. When the method object is an XmlDoc, or refers to the Root node of an XmlDoc:
  • The XmlDoc must not contain any nodes except the Root node.
  • A "Record" element is added as the top level element of the XmlDoc. Children are added to the Record element, representing the outer fields and fieldgroups of the record.

When the method object is an XmlNode not referring to the Root node of an XmlDoc:

  • The node must be an Element node.
  • Children are added to that element, representing the outer fields and fieldgroups of the record.
  • See the AddToRecord subroutine description for some examples of extracting multiple records into a single XmlDoc.

See "Structure of XmlDoc for AddToRecord" for a description of the XmlDoc created by LoadFromRecord.

AttributeValues This name required argument is a Boolean value that indicates whether a field value will be stored as “XML text” or as an XML attribute (belonging to its field, which is an XmlDoc element).

For example, <APSUBUND>COMM</APSUBUND> is text format, and <APSUBUND value="COMM"/> is attribute value format.

The default value is False, which produces text format. In this format, the value of a field will be converted to base64 in the XmlDoc if the field contains a byte that is:

  • Equal to X'00', if the AllowNull property of the XmlDoc is False.
  • Between X'00' and X'3F'.
  • Not translatable from EBCDIC to Unicode, using either the standard Unicode translation table or the base codepage translation table, as determined by the CodepageTable argument.
  • Not invertible when translating from EBCDIC to Unicode and back to EBCDIC using the standard Unicode translation table, if the CodepageTable argument is False.

This argument must be False if the XmlDoc is to be used as the method object of the AddToRecord subroutine.

AttributeNames This name required argument is a Boolean value that indicates whether each field name is to be stored in the XmlDoc as an element name or as the value of a "name" attribute.

For example, <APSUBUND>COMM</APSUBUND> is element-name format, and the following is name-as-attribute format:

<field name="APSUBUND"> COMM </field>

The default value as of Sirius Mods version 7.6 (and maintenance back to version 7.3) is True, which produces name-as-attribute format. Formerly, the default value was False.

The name-as-attribute format from the True option is better suited to operations on the XmlDoc, particularly a record copying operation. The element-name format from the False option produces more compact output when the XmlDoc is serialized.

This argument must be True if the XmlDoc is to be used as the method object of the AddToRecord subroutine.

NamesToLower This name required argument is a Boolean value that indicates whether field names are stored in all lowercase characters. The default value is False, which does not translate uppercase name characters to lowercase.

If the XmlDoc is to be used for record copying, this argument should probably be False.

AllowUnreversible This name required argument is a Boolean value that indicates whether a request is cancelled if a field name would be changed irreversibly by lowercasing or by replacing with a period the characters that would be invalid in an XML document.

The default value is False, which allows request cancellation to alert you about unreversible field names.

If the XmlDoc is to be used for record copying, this argument should probably be False.

CodepageTable This name required argument is a Boolean value; if True, the translations defined by the base Unicode codepage are used when translating from EBCDIC to Unicode for storing in the XmlDoc.

This argument is for the unusual case where you anticipate that the XML document is to be used later by AddToRecord, and the standard Unicode translation tables in place when AddToRecord is invoked may differ from those in place when the record was copied to the XmlDoc.

The default value is False, which uses the standard Unicode translation tables, including any modifications specified in UNICODE Trans or UNICODE Map commands. The advantage of using CodepageTable=False is that it will allow you to readily modify the XmlDoc directly (that is, with the AddElement and AddAttribute methods). Those operations will use the standard Unicode translation tables; there is no way to perform them using the base codepage translation tables.

All fields are copied to the XmlDoc by LoadFromRecord.

See the AddToRecord subroutine description for an example of extracting a record to an XmlDoc for record copying, and see the ToXmlDoc function in the Record class for other examples using the method arguments.

This method was actually introduced in version 7.6 of the Sirius Mods, but the XmlNode class LoadFromRecord implementation prior to version 7.8 required that the XmlDoc be empty.

AddToRecord subroutine in XmlDoc class

This subroutine adds to the current record the fields and/or fieldgroups that are contained in the method XmlDoc object according to the structure created by the LoadFromRecord subroutine. AddToRecord must be contained within a “record loop” (for example, an FRN block), and must not be contained in a fieldgroup context.


The arguments to AddToRecord are shown in this syntax:

%doc:AddToRecord( - [DisableFieldConstraints=bool] - [, CopyIDs=bool] - [, IgnoreUndefinedFields=bool] )

Where

%doc The method object is an XmlDoc whose structure conforms to that created by the LoadFromRecord subroutine; see "Structure of XmlDoc for AddToRecord".
DisableFieldConstraints This name required argument is a Boolean value; if True, then various field constraints (such as LENGTH-EQ, which was introduced in Model 204 V7R2) are not checked when the fields are added to the record.

The default is False.

CopyIDs This name required argument is a Boolean value; if True, then the fieldgroup IDs are copied, if possible, from the XmlDoc (stored as the "groupID" attribute of "fieldgroup" elements) to the record, and the "maxGroupID" attribute value of the "Record" element is also used as the maximum fieldgroup ID in the record, if possible.

On any given "fieldgroup" element, a "groupID" attribute may be 0, or missing, or not greater than the current maximum fieldgroup ID; in any of these cases, a new fieldgroup ID is generated for the fieldgroup occurrence.

If False, new fieldgroup IDs are generated.

The default is False.

IgnoreUndefinedFields This name required argument is a Boolean value. If True, then:
  • If a field in the XmlDoc is not defined in the current file, the field is ignored.
  • If a fieldgroup in the XmlDoc is not defined in the current file, the fieldgroup, and all descendants of the fieldgroup element, are ignored.

If False, any field or fieldgroup in the XmlDoc that is not defined in the current file throws an AddToRecordError exception.

The default is False.

The AddToRecord subroutine can throw an AddToRecordError exception.

Fields in the XmlDoc that are defined as CAT or CTO are ignored by AddToRecord.

Any fieldgroup update tracking fields in a fieldgroup are automatically set when that fieldgroup is created by AddToRecord, but no other updated tracking fields are automatically set by the updates performed by AddToRecord.

Any fields in the XmlDoc that are defined as update tracking fields are copied to the record. See "Removing update tracking fields from an XmlDoc" for an example of removing update tracking fields from AddToRecord's XmlDoc; generally this will not be needed, but it may be useful in certain situations.

The basic approach to copying a record from one file to another is:

In SRCFILE FRN %source %doc = %doc:NewFromRecord End For In TARGFILE Store Record End Store %targ = $CurRec In TARGFILE FRN %targ %doc:AddToRecord End For

Some additional examples of record copying are shown in "Copying from multiple source records".

Note that this method was actually introduced in version 7.6 of the Sirius Mods, although until version 7.8 of the Sirius Mods an exception was thrown if the version of Model 204 in use was older than V7R2.

Copying from multiple source records

Since the LoadFromRecord subroutine can extract from a record into a subtree of an Element node in an XmlDoc, you can use it, together with AddToRecord, to combine multiple source records into one target record.

As a simple example, you can put the fields from two records “side by side” into a target record:

FRN %x %doc = %doc:NewFromRecord End For %top = %doc:SelectSingleNode('*') FRN %y %top:LoadFromRecord End For Store Record End Store %rn = $CurRec FRN %rn %doc:AddToRecord End For

The XmlDoc that is input to AddToRecord would have a structure similar to the following:

<Record ...> <field ...> ... first field from record %x </field> ... <field ...> ... first field from record %y </field> ... </Record>

Of course, you could also accomplish this particular objective by using two XmlDoc objects:

FRN %x %doc1 = %doc1:NewFromRecord End For FRN %y %doc2 = %doc2:NewFromRecord End For Store Record End Store %targ = $CurRec FRN %targ %doc1:AddToRecord %doc2:AddToRecord End For

You can also use LoadFromRecord to modify the fieldgroup structure within a record (using V7R2 of Model 204). For example, you could take the “outer” fields of one record and move them to be fieldgroup members in the target record:

In SRCFILE FRN %x %doc = %doc:NewFromRecord End For %fg = %doc:SelectSingleNode('*/fieldgroup[@name="GRP"]') In SRCFILE FRN %y %fg:LoadFromRecord End For In TARGFILE Store Record End Store %rn = $CurRec In TARGFILE FRN %rn %doc:AddToRecord PAI End For

The use of a separate source and target file above (which in general is a typical usage of the record copying methods) is more or less required here, because the fields in SRCFILE are defined as outer fields, but in TARGFILE they are defined as members of fieldgroup GRP (or they would need to be “FIELDGROUP *” fields). So, for example, definitions for SRCFILE might include:

DEFINE FIELD FOO DEFINE FIELDGROUP GRP

and definitions for TARGFILE might include:

DEFINE FIELDGROUP GRP DEFINE FIELD FOO WITH FIELDGROUP GRP

And the XmlDoc that is input to the above AddToRecord subroutine may look like:

<Record ...> <fieldgroup name="GRP" ...> <field name="FOO"> value of foo </field> </fieldgroup> </Record>

And the corresponding output of the above PAI would be:

    \GRP = 1
     FOO = value of foo
    /GRP = 1
Removing update tracking fields from an XmlDoc

In the simple situation, the record copying operation provided by LoadFromRecord and AddToRecord produces a copy of all of the record's fields, including update tracking fields (such as UPDATE-TIME fields). However, in some circumstances, you may not want some of the update tracking fields to be propagated by AddToRecord. This can readily be accomplished by using DeleteSubtree to remove the tracking fields you want to suppress (of course, DeleteSubtree could be used to remove other fields and/or fieldgroups, as well).

Consider an example in which AddToRecord is being used to add fields to a record that already has fields stored in it:

IN ?&SOURCE DEFINE FIELD REC.UPD WITH UPDATE-TIME IN ?&SOURCE DEFINE FIELD FOO IN ?&TARGET DEFINE FIELD REC.UPD WITH UPDATE-TIME IN ?&TARGET DEFINE FIELD FOO ... Do the following on Monday: In ?&SOURCE Store Record FOO = 'Record stored on Monday' End Store %rn = $CurRec In ?&SOURCE FRN %rn %doc = %doc:NewFromRecord End For %serial = %doc:Serial In LOG Store Record RECORD.XML = %serial End Store ... Do the following on Tuesday: In LOG For 1 Record %doc:LoadXml(RECORD.XML) End For In ?&TARGET Store Record FOO = 'Record stored on Tuesday' End Store %rn = $CurRec In ?&TARGET FRN %rn %doc:AddToRecord End For

In this scenario, GRP.UPD would be set to Monday, overlaying the more recent (and probably desired) value which was set on Tuesday. To prevent this overlay, you can insert the following statement after %doc:LoadXml(RECORD.XML):

%doc:DeleteSubtree('*/fieldgroup/field[@name="GRP.UPD"]')

Structure of XmlDoc for AddToRecord

The method object of the AddToRecord subroutine is an XmlDoc whose structure conforms to that created by the LoadFromRecord subroutine. You can also create an XmlDoc to be used for AddToRecord; the rules for the XmlDoc are described here. The outline of the XmlDoc is:

<Record [version="1"] [codepage="--codepage name--"] [maxGroupID="--fieldgrouop counter--"] [file="---file name---"] [number="---record number---"]> <field name="---field name---"> ---field value--- </field> <field name="---field name---" encoding="base64"> ---base64 encoded field value--- </field> <fieldgroup name="---fieldgroup name---" [groupID="---fieldgroup ID---"]> <field ... <fieldgroup ... ... </fieldgroup> ... </Record>

The requirements for the XmlDoc are:

Comments and PIs Comment and PI nodes are allowed anywhere in the XmlDoc.
Elements in non-null namespaces In addition to the elements mentioned below for the various elements contained in the XmlDoc, the Record and fieldgroup elements may have any additional child elements that are in any non-null namespace. These additional elements are ignored. For example, the following is a valid AddToRecord XmlDoc representing an empty record:

<Record> <foo:bar xmlns:foo="u:xyz"/> </Record>

However, the only null-namespace child elements permitted of elements in the null namespace are those described for each element type below. For example, the following is an invalid AddToRecord XmlDoc:

<Record> <foo/> </Record>

Attributes in non-null namespaces In addition to the attributes mentioned below for the various elements contained in the XmlDoc, those elements may contain any additional attributes that are in any non-null namespace. These additional attributes are ignored. For example, the following is a valid AddToRecord XmlDoc representing an empty record:

<Record foo:bar="x" xmlns:foo="u:xyz"/>

Of course, elements in non-null namespaces may have any attributes. The only attributes permitted in elements in the null namespace are those described below. For example, the following is an invalid AddToRecord XmlDoc:

<Record foo="x"/>

Record element The top level element of the XmlDoc must be named "Record"; all of its attributes are optional and are described below. The element children of the Record element are optional; they may be:
  • field
  • fieldgroup

The Record element may not have a Text child node.

version attribute of Record element If present, this attribute must have the numeric value "1".
codepage If present, this attribute contains the name of the codepage whose base translation tables are used for converting the Unicode field names and field values (if not base 64 encoded) in the XmlDoc to EBCDIC.
maxGroupID attribute of Record element If present, this attribute contains the value of the maximum fieldgroup ID to be set (if greater than or equal to all of the fieldgroup IDs stored in the record) in the added record, if the CopyIDs=True argument is provided. This must be a non-negative integer value.
file attribute of Record element This attribute is ignored.
number attribute of Record element If present, this must either be "-1", signifying that the input record number is not known, or it must be a non-negative integer value. As noted in "AddToRecord constraint on 'number' attribute", this represents a compatibility issue.
field element The field element may be a child of either the Record or fieldgroup element; it contains a field occurrence. It must have a name attribute, and may have an encoding attribute. It may have one Text child, which is either the value of the occurrence or, if the encoding attribute is present (with the value base64), is the base64 encoded value of the occurrence.
name attribute of field element This attribute is required; it is the name of the field.
encoding attribute of field element This attribute is optional; if present, it must have the value base64, indicating that the Text child of the field element is the base64 encoding of the field value.
fieldgroup element The fieldgroup element may be a child of either the Record or fieldgroup element; it is the top of a subtree representing a fieldgroup occurrence. The element children of the fieldgroup element are optional; they may be:
  • field
  • fieldgroup

The fieldgroup element may not have a Text child node. It must have a name attribute, and may have a groupID attribute.

name attribute of fieldgroup element This attribute is required; it is the name of the fieldgroup.
groupID attribute of fieldgroup element If present, this attribute contains the value of the fieldgroup ID to be set (if possible) for the fieldgroup occurrence in the added record, if the CopyIDs=True argument is provided.
AddToRecordError exception class

The members of the AddToRecordError exception class are described below. Except for the constructor, New, all class members are read-only properties:

Reason
An enumeration of type AddToRecordErrorReason. The possible values are:
InvalidNode A node in the XmlDoc Does not conform to the structure as created by the LoadFromRecord subroutine.
UntranslatableFieldName A field name in the XmlDoc is not translatable to EBCDIC.
UntranslatableFieldgroupName A fieldgroup name in the XmlDoc is not translatable to EBCDIC.
UntranslatableValue A field value in the XmlDoc is not translatable to EBCDIC.
InvalidBase64 A string used for the base64 encoding of a field in the XmlDoc is not a valid base64 string.
FieldNameTooLong A field name in the XmlDoc is longer than 255 characters.
FieldgroupNameTooLong A fieldgroup name in the XmlDoc is longer than 255 characters.
ValueTooLong The value of a field in the XmlDoc that is not defined as a LOB field in the current file is longer than 255 characters or is longer than the defined LEN attribute, if the field is a fixed OCCURS field.
UnknownFieldName A field name in the XmlDoc is not defined in the current file.
UnknownFieldgroupName A fieldgroup name in the XmlDoc is not defined in the current file.
ExpectedField A field name in the XmlDoc is defined as a fieldgroup in the current file.
ExpectedFieldgroup A fieldgroup name in the XmlDoc is defined as a field in the current file.
ErrorAddingField An error occurred adding a field, such as a violation of a field constraint.
ErrorAddingFieldgroup An error occurred adding a fieldgroup, such as a file full condition.
ErrorObtainingRecord AddToRecord was unable to lock the record in exclusive mode.
InvalidFieldgroupID A fieldgroup ID in the XmlDoc is not numeric.
InvalidCodepage The codepage name specified on the codepage attribute of the Record element is not a known codepage name.
ErrorAddingMaxFieldgroupID The attempt to set the fieldgroup ID counter in the record failed; this is a very unusual condition.
InsufficientStorageForLOB Model 204 STBL, VTBL, or User Buffer storage was unavailable. The Description property indicates which of these is applicable.
InvalidVersion Invalid value of the version attribute of the Record element; the only allowed value is "1".
InvalidInputRecordNumber Invalid value of the number attribute of the Record element; it must either be "-1" or a non-negative integer.
Description
A message that explains the error.
UntranslatableHexValue
If the Reason indicates that a string in the XmlDoc is not translatable to EBCDIC, this contains the hexadecimal representation of the Unicode codepoint that is not translatable.
FieldOrFieldgroupName
If the error involves a field or fieldgroup (for example, if Reason = ErrorAddingField), this is the field or fieldgroup name.
NodeName
If the error involves a named node in the XmlDoc (for example, some cases when Reason = InvalidNode), this is the name of the node.
NodeType
If the error involves a node in the XmlDoc (for example, all cases when Reason = InvalidNode), this an XmlNodeType enumeration value of the type of the node.
Value
If the error involves a value in the XmlDoc (for example, when Reason = InvalidBase64), this is the value that is in error (actually, up to 255 bytes of the value).
InputRecordNumber
The value of the number attribute of the Record element in the XmlDoc.
New
The constructor for the class, New lets you set values for each member of the class:

%ex = New ( Reason = reasonEnum - [, Description = string] - [, UntranslatableHexValue = hexString] - [, FieldOrFieldgroupName = string] - [, NodeName = string] - [, NodeType = xmlNodeTypeEnum] - [, Value = string] - [, InputRecordNumber = number])

The Reason argument is required; all other arguments are optional, name required. The default value of InputRecordNumber is "-1"; all other default values are the null string or the Null object, as appropriate.

Note that this class was actually introduced in version 7.6 of the Sirius Mods.

MoveNamespace argument for AddTopElement

The following optional, name required argument has been added to the AddTopElement function in the XmlDoc class:

MoveNamespace=boolean

If MoveNamespace is True, and a Uri argument (with a non-null string) is provided, then if the "old" top element contains a namespace declaration that is the same as the declaration inserted due to the Uri argument, the declaration is deleted from the old top element.

Note: You should use MoveNamespace=True only when some consumer of the XML document cares about not having the redundant declaration. This would be an unusual situation, because the information content of the document does not change. Using MoveNamespace=True might trigger a scan of the entire XmlDoc, which AddTopElement does not normally do.

DeleteTopElement subroutine in XmlDoc class

The syntax for DeleteTopElement is:

doc:DeleteTopElement

This subroutine removes the top Element from an XmlDoc, and makes its children be the “middle siblings” of the left and right siblings of the deleted Element.

  • The deleted element may not have more than one Element child.
  • The deleted element may not have a Text child.

In common usage, the Element child of the deleted Element will become the new top Element of the XmlDoc. DeleteTopElement is a convenient, better-performing alternative to using AddSubtree to copy all but the top Element (or in multiple iterations, removing successive top Elements) from an XmlDoc.

For example, you can use it to remove the SOAP wrappers from an XmlDoc. If the contents of %xdoc are:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <data> ... </data> </soap:Body> </soap:Envelope>

Then the following User Language fragment:

%xdoc:DeleteTopElement %xdoc:DeleteTopElement

Results in the following contents of %xdoc:

<data> ... </data>

The remaining considerations for using DeleteTopElement concern the occurrence of namespace declarations in the XmlDoc; there are a few details to explain how they are manipulated, and to explain how the performance of DeleteTopElement is affected.

As shown in the “SOAP wrapper removal” example above, DeleteTopElement will remove from the XmlDoc any namespace declarations (in this example, xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/") that are not referenced after removing the top Element. Note that a variant on the above example can occur using a default namespace declaration:

<Envelope xmlns"http://schemas.xmlsoap.org/soap/envelope/"> <Body> <data xmlns=""> ... </data> </Body> </Envelope>

Then the following User Language fragment:

%xdoc:DeleteTopElement %xdoc:DeleteTopElement

Results in the following contents of %xdoc:

<data xmlns=""> ... </data>

As seen in this example, the null namespace declaration is not removed, even though, strictly speaking, it is not needed.

In addition, DeleteTopElement will move to the new top Element any namespace declarations that do continue to be referenced after the top Element deletion:

%n = %d:AddElement('foo', , 'u:uri') %n:AddElement('bar', , 'u:uri') %d:Print %d:DeleteTopElement Print 'After deletion:' %d:Print

The result of the above User Language fragment is:

<foo xmlns="u:uri"> <bar/> </foo> After deletion: <bar xmlns="u:uri"/>

The performance of DeleteTopElement should always be significantly better than an approach using AddSubtree, and in many cases, it is constant, regardless of the size of the XmlDoc. For a detailed explanation of when the cost of DeleteTopElement might vary with the size of the XmlDoc, there are three reasons that the descendants of the new top Element need to be recursively visited:

  1. Fixing references to moved namespace declaration

    As mentioned above, one or more namespace declarations can be moved from the deleted element to the new top element. Having done that, any references to the moved namespace must be fixed. A count is kept to the total references to moved namespace declarations; when this goes to zero, there is no more need to do this. So, for example:

    <p:oldTop xmlns:p="p:uri"> <p:newTop> <child/> </p:newTop> </p:oldTop>

    The p:newTop element needs to have it's namespace reference fixed, but that is the only reference to it, so there is no need to visit child.
  2. Fixing pointers to a deleted namespace declaration

    When a namespace declaration is deleted, it may be pointed to by other namespace declarations (there is a graph of them in the XmlDoc); these pointers need to be fixed to point to the first non-deleted declaration following the deleted one. This is not needed by the descendants of any element that has a namespace declaration (in the original XmlDoc). So, for example:

    <p:oldTop xmlns:p="p:uri"> <newTop> <q:child xmlns:q="q:uri"> <grandchild/> </q:child> </newTop> </p:oldTop>

    Both newTop and q:child need to have their namespace pointers fixed, but since q:child has a namespace declaration, grandchild doesn't need to be fixed, so it does not need to be visited.
  3. Turning off “ancestor may have non-null default namespace declaration”

    In order to make certain namespace operations faster, there is a "state" maintained at XmlDoc nodes that permits a non-null default namespace declaration to occur on an ancestor. This state is fixed up if DeleteTopElement deletes a non-null namespace declaration (as happens in the second “SOAP wrapper removal” example above, the one using a default namespace). The need to set this state is eliminated in descendants of an Element that have a default namespace declaration (either null or not). So, for example:

    <oldTop xmlns="p:uri"> <newTop> <q:child xmlns="q:uri"> <grandchild/> </q:child> </newTop> </p:oldTop>

    The state needs to be fixed at newTop, but since q:child has a default namespace declaration, the state at grandchild does not need to be fixed up, so it does not need to be visited.

Other feature changes

Changes affecting all or multiple products

Double quotation marks for quoted strings

As of Sirius Mods version 7.8, the User Language and Janus SOAP compiler accepts either a single-quotation-mark character (') or a double-quotation-mark character (") as a quoted-string delimiter. Prior to this version, only a single-quotation-mark character (also called an apostrophe) could be such a delimiter.

These are examples of the feature:

  1. The statements below are equivalent as of version 7.8:

    %n = 'abc':stringToHex %n = "abc":stringToHex

  2. The hex string produced by the statements below as of version 7.8 is 818283:

    printText {'abc':stringToHex} printText {"abc":stringToHex}

  3. The first and second statements below are equivalent as of version 7.8, producing the string IT'S COOL!:

    printText {'It''s cool!':toUpper} printText {"It's cool!":toUpper} printText {"It''s cool!":toUpper}

    The last statement in the example above produces the string IT''S COOL!, which demonstrates that repeating a single quotation mark does not escape it if the quoted string is delimited with double quotation marks.

Note: Since this double quotation mark feature is restricted to the compiler, it does not affect command parsing, and the following command is still invalid:

RESET FUNCOPTS X"00"

As a rule, the double quotation mark character can be used to enclose, or bracket, a quoted region that begins a string literal, or to bracket a "continuation" of a string literal that begins with a double quotation mark, but it may not otherwise be used to bracket a quoted region.

The "continuation of a string literal" refers to the peculiar User Language concept that a quoted token does not end until it reaches a space or separator character after the closing quotation mark character. So, the following statement prints Hello:

print 'Hel'lo

You can also continue the quoted region:

print 'Hel'lo' World'

This prints Hello World. In addition, you can quote parts of unquoted tokens:

pr'int' 'Hello World'

This also prints Hello World.

User Language quoted string continuation and the new functionality of double quotation marks are shown in the following annotated request, which is valid in Sirius Mods version 7.8. The letter labels on the left are not part of the request but are for the commentary that follows:

Begin (A) %b'y' string len 255 %b'y' = 'abc' print %b'y' (B) print %by call foobar (C) subroutine foo'bar' (D) print "here I am" (E) print 'come and 'g"et" (F) print "say ""uncle""" (G) print "Bob's"Your"Uncle" end subroutine end

(A) %b'y' string len 255

'y' is a quoted region that is a continuation of the %variable name.

(B) print %by

The %variable %by is the same as the %variable %b'y'.

(C) subroutine foo'bar'

'bar' is a quoted region that is a continuation of the subroutine name; the name is the same as the name foobar.

(D) print "here I am"

The result is: here I am, because of the new feature. Prior to this version, this statement was invalid.

(E) print 'come and 'g"et"

The result is come and g"et", because the double quotation marks are ordinary characters (not brackets for a quoted region) in a string literal that starts with a single quotation mark. The string literal extends beyond the second single quotation mark until ended by a blank or the end of the string. Since this result also occurred prior to version 7.8, backward compatibility dictates the new rule that the opening quotation mark in a quoted string determines the quote bracketing character through the rest of the quoted string.

(F) print "say ""uncle"""

The result is: say "uncle", because within a quoted region started by a double quotation mark, two consecutive double quotation marks are folded into one.

(G) print "Bob's"Your"Uncle"

The result is: Bob'sYourUncle, because "Uncle" is a quoted region which continues the string literal that was started by the initial double quotation mark.

The following statement would produce a compilation error:

print 'say'Uncle" Bob"

" Bob" is not a quoted region that continues the string literal (because the string literal is started by the initial single quotation mark and not by an initial double quotation mark), so the blank before Bob" ends the quoted string and makes the final four characters extraneous and invalid for the Print statement.

A final note: in a string that does not start with a quotation mark, only a single quotation mark character is allowed to produce a quoted piece of the token. For example, the following statement is valid:

%x = foo'BAR'

This statement causes %x to be set to the value of field FOOBAR. However, the following statement results in %x being set to the value of field FOO"BAR":

%x = foo"BAR"

This is necessary to preserve backward compatibility.

Text/Html statement enhancements

These features are added in Sirius Mods 7.8.

Tilde directives

As of Sirius Mods 7.8, certain Text/Html statementdirectives can be placed after a tilde character (~) inside curly braces ({ }) in any of the targeted text statements (which include AuditText, PrintText, TraceText, and new in V7.8, SetText and ReturnText. For example, this statement sets %ls to the current time, embedded in hyphens:

setText %ls = {~nocont}---{$time}---

Because the ~nocont directive was specified, the terminating hyphen is not treated as a continuation character.

The tilde directives that are allowed in targeted text statements are:

~exprE Sets the expression end characters. This directive must be followed by a space and then the expression start characters.

For example, {~expre >} sets the expression end characters to a single greater-than sign (>). ~exprE can also be written as ~exprEnd.

Note: The ~exprE directive must be ended by the current expression end characters, that is, by the end characters that the ~expre directive is replacing.

~exprS Sets the expression start characters. This directive must be followed by a space and then the expression start characters. For example, {~exprs <} sets the expression start characters to a single less-than sign (<). ~exprS can also be written as ~exprStart.
~noCont Indicates that a trailing hyphen is not treated as a continuation character. ~noCont can also be written as ~noContinuations.
~noEll Indicates that a trailing ellipsis (...) is not treated as a partial-line indicator. Because it makes no sense to end a SetText or ReturnText with an ellipsis, this is the default for those two statements. So, while allowed, a ~noEll directive is completely unnecessary for SetText and ReturnText. ~noEll can also be written as ~noEllipses.
~noExpr Indicates that no expressions are to be processed after the directive, and that everything after the ~noExpr directive is treated as literal text. No further tilde directives will be processed after a ~noExpr. ~noExpr can also be written as ~noExpressions.
~raw Acts as if ~noCont, ~noEll, and ~noExpr are specified simultaneously.

Note: This is slightly different from the Raw directive on the Text/Html statement, which also implies NoDum/NoDummy. Because dummy string substitution applies to lines before they are parsed, dummy string substitution would already have happened in any single-line Text statement before the ~raw directive was processed.

~= directives

As of Sirius Mods version 7.8, you can use a ~= directive as a shorthand for {~}={expression}. For example,
printtext {~=%i}, {~=%j}, {~=(%i+%j):toPower(3)} displays:

%i=22, %j=33, (%i + %j):toPower(3)=166375

Note that in the directive, spaces are optional after the equal sign, and the output can produce spaces before or after the equal sign.

SetText statement

The SetText statement works much the same as AuditText, PrintText, and TraceText, but it is used to set a variable instead of outputting a string. That is, its primary intent is to use the text it sets in the current program.

The syntax of the SetText statement is:

setText %variable = string

Where:

%variable A simple variable, a class variable, a class property, or a collection member (which is really just a special kind of class property).

For example, the following statement sets the String property of a StringTokenizer object to the literal string "Once upon a time":

%toke is object stringTokenizer ... setText %toke:string = Once upon a time

A single blank after the equal sign following a SetText is not required and is ignored, though you can use it for readability. The following statements both set %str to Once a jolly swagman camped by a billabong:

setText %str =Once a jolly swagman camped by a billabong

and

setText %str = Once a jolly swagman camped by a billabong

Any additional blanks beyond the first one are treated as part of the literal source string.
string A literal string which may include expressions enclosed by curly braces, just as is used in the Text statement.

For example, the following statement sets %x to the literal string Patriotism is the last refuge of the scoundrel:

setText %x = Patriotism is the last refuge of the scoundrel

And the following sets %x to the literal string The sum of %x and %y is followed by the sum of %x and %y:

setText %x = The sum of %x and %y is {%x + %y}

Continuations are treated in the normal way: the text continues from the first non-blank character on the next line.
Tip: if you need to include blank characters from the next line, use {} (a null expression) to indicate the start of the continuation. For example:

setText %str = Once a jolly swagman camped by:- {} a billabong

The statement above sets %str to:

Once a jolly swagman camped by: a billabong

However, since trailing blanks before a continuation are not stripped, you can also include blank characters by putting extra blanks at the end of the first SetText line:

setText %str = Once a jolly swagman camped by: - a billabong

If you need to terminate the string with a hyphen, add the {} null expression to the end of a line. For example:

setText %str = ------------{}

The statement above sets %str to:

------------

You can also use the ~noCont directive to indicate that a trailing hyphen is not to be treated as a continuation character:

setText %str = {~nocont}------------

ReturnText statement

The ReturnText statement works much the same as AuditText, PrintText, and TraceText, but instead of outputting a string, it is used to return a string value in a User Language function or property Get method. The syntax of the ReturnText statement is:

ReturnText string

Where:

string A literal string which may include expressions enclosed by curly braces, just as in the Text statement.

For example, if the Aphorism local function is applied to the number 1 in the following fragment, the function returns the literal string Patriotism is the first refuge of the scoundrel:

local function (float):aphorism is longstring if %this eq 1 then returnText Patriotism is the first refuge of the scoundrel end if ... end function

The following function returns the literal string The sum of %x and %y is followed by the sum of the %x and %y parameters passed to the local function:

local function stringAdd(%x is float, %y is float) returnText The sum of %x and %y is {%x + %y} end function

Continuations are treated in the normal way: the text continues from the first non-blank character on the next line.
Tip: As shown above for SetText:

  • If you need to include blank characters from the next line, use {} (a null expression) to indicate the start of the continuation.
  • If you need to terminate the string with a hyphen, add the {} null expression to the end of a line.
  • You can also use the ~noCont directive to indicate that a trailing hyphen is not to be treated as a continuation character.

Addition to COMMLOG parameter

This version of the Sirius Mods implements the X'04' bit of the COMMLOG User 0 parameter. This activates support for daemon login improvements when used in conjunction with the X'02' bit.

Fast/Reload

The following sections contain new or changed features in Fast/Reload.

Warning messages for some DV, STORE-x, and repeatibility changes

V7R2 of Model 204 introduced several new field attributes. Reorganizing a file and changing some of these attributes may create differences in field processing which may not be obvious at first glance. To highlight this, Fast/Reload will issue a warning message (MSIR.1037) for each attribute change that may have some of these subtle effects. For the most part, applications using the reorganized file will continue to work as before.

One source of possible change in application behavior involves use of the following User Language constructs:

  • The Is Present test
  • The count returned by a Count Occurrences Of statement
  • The number of iterations of a For Each Occurrence Of loop

All three of the above constructs have equivalent exposure to the changes in field attributes, even though the examples below only use Is Present, for brevity.

The other source of possible change in behavior is:

  • The value returned when referencing a physically absent field occurrence that was AT-MOST-ONE prior to the reorganization

This is shown in the examples using the Print statement, although the change could be in any kind of reference to the field value.

When changing field attributes as part of reorganizing a file, you should understand the impact of the change. To aid this understanding, the conditions that cause warning messages are listed in the following subsections, along with a very brief example of a possible change in behavior.

Notes:

  • Other changes in these field attributes do not cause the kinds of problems discussed here. For example, you can change the DEFAULT-VALUE, STORE-DEFAULT, and STORE-NONE attributes of an EXACTLY-ONE field without any consequences for User Language application behavior.
  • Although the examples below all involve fields defined within fieldgroups, the potential problems, and the warning messages issued by Fast/Reload, apply equally to fields defined outside fieldgroups.

In these examples, assume you are reorganizing with UAI/LAI a file with the following “old” definitions:

DEFINE FIELD KEY WITH ORDERED DEFINE FIELDGROUP GRP DEFINE FIELD EXO.OLD (FG GRP) DEFINE FIELD REPT.OLD.MISS (REPT FG GRP) DEFINE FIELD REPT.OLD.XX (REPT FG GRP) DEFINE FIELD REPT.OLD.NUL (REPT FG GRP) DEFINE FIELD AMO.OLD.DF_YY (ONE DV 'YY' FG GRP) DEFINE FIELD AMO.OLD.SD_LIT (ONE DV 'AA' SD LIT FG GRP)

And assume that a record has been stored as follows:

Store Record KEY = 'Some unique value' Then Continue Add Fieldgroup GRP REPT.OLD.XX = 'xx' REPT.OLD.NUL = '' AMO.OLD.SD_LIT = 'AA' End Add End Store

Each example contains a field definition, used in the LAI step, to highlight one condition, and contains a User Language fragment which is assumed to be contained within the following:

FR Where KEY = 'Some unique value' For Fieldgroup GRP ... example fragment End For End For

The conditions are shown in the following subsections.

EXONE -> non-EXONE with STORE-x NONE

Case: Changing a field that was EXACTLY-ONE in the UAI to AT-MOST-ONE or REPEATABLE, with either STORE-DEFAULT NONE or STORE-NULL NONE.

Changed definition in LAI:

DEFINE FIELD EXO.OLD (REPT SN NONE FG GRP)

User Language fragment:

If EXO.OLD Is Present Then Print 'Present' Else Print 'Not Present'; End If

Result prior to reorg:

Present

Result after reorg:

Not Present

REPT -> EXONE

Case: Changing a field that was REPEATABLE in the UAI to EXACTLY-ONE.

There is one exception to this, which does not produce a warning: if the field was not a member of a fieldgroup in the UAI, and is a member of a fielgroup in the LAI. Note that the "out of sync" check of this "collecting loose fields" LAI feature ensures there is no exposure to a change in User Language behavior when using such a field.

Changed definition in LAI:

DEFINE FIELD REPT.OLD.MISS (EXONE FG GRP)

User Language fragment:

If REPT.OLD.MISS Is Present Then Print 'Present' Else Print 'Not Present'; End If

Result prior to reorg:

Not Present

Result after reorg:

Present

REPT -> ONE STORE-x NONE

Case: Changing a field that was REPEATABLE in the UAI to AT-MOST-ONE, with either STORE-DEFAULT NONE or STORE-NULL NONE.

Changed definition in LAI:

DEFINE FIELD REPT.OLD.XX (ONE DV 'xx' SD NONE FG GRP)

User Language fragment:

If REPT.OLD.XX Is Present Then Print 'Present' Else Print 'Not Present'; End If

Result prior to reorg:

Present

Result after reorg:

Not Present

ONE -> ONE with changed DV

Case: Changing a field that was AT-MOST-ONE in the UAI to a different DEFAULT-VALUE in the LAI.

Changed definition in LAI:

DEFINE FIELD AMO.OLD.DF_YY (ONE DV 'ZZ' FG GRP)

User Language fragment:

Print AMO.OLD.DF_YY

Result prior to reorg:

YY

Result after reorg:

ZZ

ONE -> EXONE

Case: Changing a field that was AT-MOST-ONE in the UAI to EXACTLY-ONE in the LAI.

Changed definition in LAI:

DEFINE FIELD AMO.OLD.DF_YY (EXONE FG GRP)

User Language fragment:

If AMO.OLD.DF_YY Is Present Then Print 'Present' Else Print 'Not Present'; End If

Result prior to reorg:

Not Present

Result after reorg:

Present

ONE with DV -> REPT

Case: Changing a field that was AT-MOST-ONE with DEFAULT-VALUE in the UAI to REPEATABLE in the LAI.

Changed definition in LAI:

DEFINE FIELD AMO.OLD.DF_YY (REPT FG GRP)

User Language fragment:

Print '>' With AMO.OLD.DF_YY With '<'

Result prior to reorg:

>YY<

Result after reorg:

><

ONE SD LIT/ALL -> SD NONE

Case: Changing a field that was AT-MOST-ONE with STORE-DEFAULT LIT or ALL in the UAI to STORE-DEFAULT NONE in the LAI.

Changed definition in LAI:

DEFINE FIELD AMO.OLD.SD_LIT (ONE DV 'AA' SD NONE FG GRP)

User Language fragment:

If AMO.OLD.SD_LIT Is Present Then Print 'Present' Else Print 'Not Present'; End If

Result prior to reorg:

Present

Result after reorg:

Not present

Non-EXONE SN LIT/ALL -> SN NONE

Case: Changing a field that was AT-MOST-ONE or REPEATABLE with STORE-NULL LIT or ALL in the UAI, to STORE-NULL NONE in the LAI.

There is one exception to this, which does not produce a warning: if the field was not a member of a fieldgroup in the UAI, and it is a member of a fielgroup in the LAI. Note that the "out of sync" check of this "collecting loose fields" LAI feature ensures there is no exposure to a change in User Language behavior when using such a field.

Changed definition in LAI:

DEFINE FIELD REPT.OLD.NUL (REPT SN NONE FG GRP)

User Language fragment:

If REPT.OLD.NUL Is Present Then Print 'Present' Else Print 'Not Present'; End If

Result prior to reorg:

Present

Result after reorg:

Not Present

Janus TCP/IP Base

The following features are new or changed in Janus TCP/IP Base.

DNS Retries

Prior to Sirius Mods Version 7.8, the JANUS NAMESERVER command had no facility to call for a retry of a DNS UDP packet for which no response is received. This meant that if Janus does a DNS lookup just when the target nameserver is down for an instant, or if the UDP packet gets lost on the network (IP networks don't have to guarantee delivery of IP packets), the DNS lookup could fail.

The version 7.8 "DNS Retries" feature is a RETRIES parameter for the JANUS NAMESERVER command. Setting RETRIES to a positive integer value, say 2, instructs Janus to retry as many as two times if no response was received to a DNS lookup. Setting RETRIES to 0, its default, means no retries are attempted.

On a swamped network, it is probably better to set a JANUS NAMESERVER TIMEOUT value of, say, 3 and a RETRIES setting of 2, rather than to set TIMEOUT to 10 with RETRIES at 0. This is so because:

  • If a packet gets dropped, there is no benefit to waiting 10 seconds instead of 3.
  • It is very unlikely that it would take a nameserver 3 seconds to respond to a received request (including packet turnaround time).

It probably does not make sense to set RETRIES to a value greater than 2: if packets are being dropped so frequently that three consecutive DNS requests are dropped, you have problems much more serious than the failed lookups.

Compatibility and fixes

Model 204 support

Sirius Mods version 7.8 supports Model 204 V6R1, V7R1, and V7R2.

Backwards compatibility with Sirius Mods 7.7 and Sirius Mods 7.8

This section lists any differences in processing that result from execution with Sirius Mods version 7.8, as compared with the same inputs to Sirius Mods version 7.7 at current maintenance levels. In some cases zaps have been delivered to change the behavior to be the same as the version 7.8 behavior; these cases are explicitly listed.

In general, backward incompatibility means that an operation which was previously performed without any indication of error, now operates, given the same inputs and conditions, in a different manner. We may not list as backwards incompatibilities those cases in which the previous behaviour, although not indicating an error, was “clearly and obviously” incorrect, and which are introduced as normal bug fixes (whether or not they had been fixed with previous maintenance).

Backwards incompatibilities are described per product in the following sections.

Janus SOAP XmlDoc API

The following backwards compatibility issues have been introduced in the Janus SOAP XmlDoc API.

AddToRecord constraint on "number" attribute

As described in "Structure of XmlDoc for AddToRecord", if the "number" attribute of the "Record" element in the input XmlDoc of the AddToRecord subroutine is present, it must be an integer greater than or equal to -1.

Previously, this attribute was ignored.

DefaultURI argument of AddSubtree

In some cases, an Element in a default namespace, which was added to the XmlDoc by a deserialization method, will not get the correct namespace URI when it is copied using the DefaultURI argument of the AddNamespace subroutine.

Note that this problem was also fixed (with the resulting incompatibility) in the version 7.7 Sirius Mods by maintenance supplied by ZAP77A4 on 17 August, 2010.

For example:

Text To %sl <a:a xmlns:a="http://aaa" xmlns="http://ddd"> <b:b xmlns:b="http://bbb"> <c>123</c> </b:b> </a:a> End Text %in:LoadXml(%sl) %n Object XmlNode %n = %in:SelectSingleNode('/*/*') %out:AddSubtree(%n, DefaultURI='u:who')

Prior to fixing this problem, the above results in:

<b:b xmlns:b="http://bbb"> <c xmlns="http://ddd"> 123 </c> </b:b>

The correct result, as produced by version 7.8 of the Sirius Mods or version 7.7 with with ZAP77A4 applied, is as follows (note the namespace for element c):

<b:b xmlns:b="http://bbb"> <c xmlns="u:who"> 123 </c> </b:b>

Deserialization prohibits default namespace declaration with Namespace=None

With the XmlDoc Namespace property set to None, namespace declarations that bind a prefix are not allowed. For example:

<foo xmlns:p="http://p.com/>

The above has never been allowed, due to the prohibition against colons in XML names when Namespace is None.

However, previous versions of the Sirius Mods allowed deserialization of a default namespace declaration. For example:

<foo xmlns="http://p.com/>

The above was erroneously treated as if xmlns were an attribute.

Deserialization of default namespace declarations is no longer allowed.

This fix was also introduced in version 7.7 of the Sirius Mods, via ZAP77B2.

Janus SOAP ULI

Unspace method now converts all-whitespace string to null

Prior to Version 7.8 of the Sirius Mods, the intrinsic String Unspace method compressed a string consisting entirely of whitespace characters to a single whitespace character. For example, note the single blank in the result of PrintText {~} = X{' ':unspace}X:

' ':unspace = X X

In version 7.8 (and also in Sirius Mods version 7.7 via ZAP7761), Unspace converts a string of whitespace characters to the null string. After this fix is in effect, the PrintText statement above produces a null string:

' ':unspace = XX

Fixes in Sirius Mods 7.8 but not in 7.7

This section lists fixes to functionality existing in the Sirius Mods version 7.7 but which, due to the absence of customer problems, have not, as of the date of the release, been fixed in that version.

LoadSystemMethodInfo returning Unicode methods

The LoadSystemMethodInfo now returns information for Unicode intrinsic methods.

Fast/Reload LAI with various UAI SORT cases

The following two bugs have been fixed:

  • Possible use of UAI SORT key as hashed file sort key.

    For example, the following code (incorrectly) completes without any indication of error in Sirius Mods 7.7, but in 7.8 it is flagged as an error:

    * Fast/Unload step: UAI SORT FOO LENGTH 3 TRUNC ... * Fast/Reload step: CREATE FILE (NOFORMAT) QAWORK PARAMETER FILEORG 8 END OPEN QAWORK *UPDATE IN QAWORK INITIALIZE HASH FOO FILELOAD -1,-1,0,3000000,10000,10000,10000,32 LAI

  • A spurious error ("TAPEI format error" or unkown field) is issued if the first UAI SORT item is a FUEL %variable, and the subsequent LAI is loaded into a non-sort, non-hash file. Note that the Fast/Unload UAI output file must also contain the correct value to fix this bug; with version 4.4 of Fast/Unload, ZAP4414 is required, with version 4.5, ZAP4518 is required.


Documentation

Sirius is in the process of transferring its product documentation from PDF format manuals accessible from the company website (http://www.sirius-software.com) to HTML articles in this Sirwiki wiki (http://wiki.sirius-software.com). As of this writing, most of the documentation remains in the PDF manuals. However, the most recent product updates are documented in the wiki, and the PDF manuals are being converted and transferred to the wiki. Sirius product users should look first in the wiki for Version 7.8 and later information, following the links contained there for more information. If the wiki information is incomplete or missing, the PDFs remain available.