For information on converting to InterSystems IRIS,
see the InterSystems IRIS Adoption Guide
and the InterSystems IRIS In-Place Conversion Guide,
both available on the WRC Distributions page (login required).
Sample script that initiates a connection to an archive server
Set SessionOref = ##class(%Archive.Session).%New()
Set SessionOref.Host = 220.127.116.11 // IP address of the archive server
Set SessionOref.AuthFile = AuthFilePath // path of the .pea file (for Centera)
Set Status = SessionOref.Connect()
Once connected, here is a sample script that stores a content (cf. %Archive.Content):
// create a content object as source, whose handle is ContentOref (see %Archive.Content)
Set Status = SessionOref.Store(ContentOref, .ContentUID)
After Store() returns successfully, you need to save the ContentUID value somewhere (say, in a Cache database) for future retrieval purpose.
Here is a sample script to retrieve the file from the archive server, using the ContentUID and open connection above:
// create a content object as target, whose handle is ContentOref (see %Archive.Content)
Set Status = SessionOref.Retrieve(ContentOref, ContentUID)
Only EMC Centera server is supported as an archive server
The source of storing and the target of retrieval must be files
Only one open connection per Cache process. Attempt to open additional connections (whether to the same server as the existing connection or not) would get an error.
Retrieving selected files from a content containing multiple files ("blobs") is not supported.
The maximum data size, in bytes, for data to be embedded in the CDF instead of being stored as separate blobs.
The SDK default value is 0 bytes, meaning data is never embedded in the CDF.
The maximum value is 102400 bytes (100 KB), which is the default value we use here.
The value for the embedded data threshold can be set to less than or equal to 102400 bytes.
Read the blob associated with the tag by the name 'TagName' to the file given by 'Path'
If TagName is not specified, use the current tag (either the first tag or the tag pointed to by GetNextTag())
If TagName is not unique in the content, use the first matching tag.
May generate error
Create a tag with a 'TagName' and stream the given file to the blob associated with the tag
Acceptable characters for a TagName are ASCII characters in the Set [a-zA-Z0-9_-.]. [No restriction in Unicode version]
The first character must be a letter or an underscore "_".
The name must be XML compliant and cannot start with the prefix "xml" or "eclip".
May generate error