Journal record related API. More...
Public Member Functions | |
_.Library.Status | Restore (_.Library.Integer Detail) |
a place holder | |
Static Public Member Functions | |
_.Library.Status | Count (_.Library.String File, _.Library.String Sort) |
Provides an analysis of the activity for global records in a journal file. More... | |
_.Library.Integer | GetAddressNear (_.Library.Integer Offset, _.Library.Boolean Before) |
Return the address of a valid record that is nearest to and >= (or <= if Before=1) the given offset; 0 if no such a record. | |
_.Library.Status | GetPhysicalLocation (_.Library.Integer Offset, _.Library.String FileName) |
Return the physical location of a record, given by Offset and Filename, in Offset and FileName. More... | |
_.Library.String | GetRealPIDSYSinFilter (_.Library.String jidsys, _.Library.Integer ecpsysid) |
[For use in a journal restore filter or shadow filter (^ZJRNFILT) only] Given a comma-delimited string of jid (job id) and remsysid that is passed to the user-specified filter, return the real pid (if available) and ECP system id (if any). More... | |
_.Library.String | PIDLookup (_.Library.String Offset) |
Given an address in the currently open journal file, read the. More... | |
Public Attributes | |
Address | |
Location of the record in the journal file. More... | |
ECPSystemID | |
ECPSystemID is <property>RemoteSystemID</property> with the top. More... | |
InTransaction | |
Whether the record is part of a transaction. More... | |
JobID | |
Internal jobid stored with each journal record in the journal file. More... | |
Next | |
Reference to next record or NULLOREF if this is the last record in the file. More... | |
NextAddress | |
Location of next record or 0 if this is the last record in the file. More... | |
Prev | |
Reference to previous record or NULLOREF if this is the first record in the file. More... | |
PrevAddress | |
Location of previous record or 0 if this is the first record in the file. More... | |
ProcessID | |
Operating system process id for the process which created the journal record. More... | |
RemoteSystemID | |
Use RemoteSystemID if you're comparing records to ensure that two. More... | |
TimeStamp | |
Time stamp of the record (not necessarily the creation time of the record) More... | |
Type | |
Type of the record in numeric form. More... | |
TypeName | |
Type of the record in string form. More... | |
Static Public Attributes | |
DOMAIN = None | |
Default Localization Domain. | |
Journal record related API.
To retrieve a record, first open the journal file containing the record if it is not already open:
Set jrnforef = ##class(SYS.Journal.File).OpenId(FilePath)
where FilePath is the path of the journal file. Then get the record by specifying its location (<parameter>Address</parameter>) in the journal file
Set jrecoref = jrnforef.GetRecordAt(Address)
or
Set jrecoref = ##class(SYS.Journal.Record).OpenId(Address)
Records are polymorphic – for example, the reference returned above would be one to a <class>SetKillRecord</class> object if the record is a SET or KILL.
|
static |
Provides an analysis of the activity for global records in a journal file.
Records are counted by type and the amount of activity for each global is calculated as a percentage of the total for that record type.
The output is written to the current device.
Parameters are:
File - Journal file to count (by default the current journal file)
Sort - By default the counts for all types of global journal records are kept individually. You may have the counts grouped as general SET or KILL records by entering the 'Sort' parameter as 'GROUP'.
|
static |
Return the physical location of a record, given by Offset and Filename, in Offset and FileName.
The virtual and physical locations of a record may differ due to a journal switch. The API assumes a SYS.Journal.System.Sync() has been issued to commit the journal record in question to disk
|
static |
[For use in a journal restore filter or shadow filter (^ZJRNFILT) only] Given a comma-delimited string of jid (job id) and remsysid that is passed to the user-specified filter, return the real pid (if available) and ECP system id (if any).
jidsys = jid,remsysid </li><li> ecpsysid = a real ECP system ID <li><li> return: a real PID or "" </li></ul>
|
static |
Given an address in the currently open journal file, read the.
jobid from the journal record and translate this to an operating system process id using the jobid->pid translation table. Returns the corresponding pid or "<jobid>(jid)" if the pid cannot be determined.
Address |
Location of the record in the journal file.
ECPSystemID |
ECPSystemID is <property>RemoteSystemID</property> with the top.
bits masked off.
Use ECPSystemID if the only thing of interest is whether it came from an ECP client, etc.
InTransaction |
Whether the record is part of a transaction.
JobID |
Internal jobid stored with each journal record in the journal file.
Next |
Reference to next record or NULLOREF if this is the last record in the file.
NextAddress |
Location of next record or 0 if this is the last record in the file.
Prev |
Reference to previous record or NULLOREF if this is the first record in the file.
PrevAddress |
Location of previous record or 0 if this is the first record in the file.
ProcessID |
Operating system process id for the process which created the journal record.
This is calculated by taking the jobid stored in the journal record and looking up the corresponding process id in a translation table maintained by the system. If the process id cannot be calculated, the jobid with the string "(jid") appended is returned.
RemoteSystemID |
Use RemoteSystemID if you're comparing records to ensure that two.
identical process IDs refer to the same real process/transaction.
TimeStamp |
Time stamp of the record (not necessarily the creation time of the record)
Type |
Type of the record in numeric form.
TypeName |
Type of the record in string form.