AppendJournalData (Stringlist function): Difference between revisions
m (Use Included template) |
|||
Line 10: | Line 10: | ||
==AppendJournalData Syntax== | ==AppendJournalData Syntax== | ||
{{Syntax.Stringlist.AppendJournalData}} | {{Syntax.Stringlist.AppendJournalData}} | ||
===Syntax | ===Syntax terms=== | ||
<dl> | <dl> | ||
<dt>%rc<dd>A numeric variable to contain the returned indicator of the success of the function. It will be one of the following return values:<dl> | <dt>%rc<dd>A numeric variable to contain the returned indicator of the success of the function. It will be one of the following return values:<dl> |
Revision as of 20:57, 12 January 2011
Add lines from journal to Stringlist
This callable method adds lines to the end of a Stringlist from the current, or a specified, Model 204 journal. The AppendJournalData method, available in Sirius Mods Version 6.7 and later, is only available to customers licensed for SirScan.
AppendJournalData is a member of the Stringlist class.
The AppendJournalData function has five NameAllowed parameters, and it returns a numeric result.
AppendJournalData Syntax
[%rc =] %sl:AppendJournalData( [StartTime=] startTime - [, [EndTime=] endTime] - [, [Threads=] threadSel] - [, [Options=] options] - [, [Journal=] journal] )
Syntax terms
- %rc
- A numeric variable to contain the returned indicator of the success of the function. It will be one of the following return values:
- 0
- No problems.
- 1
- MAXREC exceeded (%sl might contain new items).
- 2
- MAXIO exceeded (%sl might contain new items).
- %sl
- A Stringlist object.
- [StartTime=] startTime
- The first positional parameter, alternatively named .StartTime, is a string containing the time of the first journal entry to be processed. The time in the string should be in YYDDDHHMISSXX format (YY = year, DDD = Julian day number, HH = hour, MI = minutes, SS = seconds, XX = hundredths of seconds). This start time is inclusive, so any audit trail entry matching the specified start time is considered to be in the range. Specifying this parameter is optional; if it is not specified, the start time is considered to be the time that the Model 204 region was brought up.
- [EndTime=] endTime
- The second positional parameter, alternatively named .EndTime, is a string containing the end time of the first journal entry to be processed. The time in the string should be in YYDDDHHMISSXX format (YY = year, DDD = Julian day number, HH = hour, MI = minutes, SS = seconds, XX = hundredths of seconds). This end time is exclusive, so any audit trail entry matching the specified end time is considered to be out of the range and is not formatted. Specifying this parameter is optional; if it is not specified, the end time is considered to be the current time.
- [Threads=] threadSel
- The third positional parameter, alternatively named .Threads, is a string that contains selection criteria for users for which audit trail data is to be formatted. .im scansel
- [Options=] options
- The fourth positional parameter, alternatively named .Options, is a non-optional, case-sensitive string that contains a list of blank-delimited keywords that come from the following list. Your specification must include one or more audit trail types (ST, AA, AD, etc.). .sr list = Stringlist .im scanfmt
- [Journal=] %journal
- The fifth positional parameter, alternatively named .Journal, is a Journal class object variable (:hdref refid=journal.), which lets you access a Model 204 journal other than the current journal. If %journal is a Null object or is not specified, AppendJournalData uses the current Model 204 journal. This parameter is available as of Version 7.7 of the Sirius Mods.
Usage Notes
- If the caller of AppendJournalData is not a System Administrator, an implicit selection filter is applied so that the caller will only see entries that were produced by a thread with the same userid as the caller. This condition is ANDed with any other filtering conditions.
In the case of a historical journal (that is, a journal produced by a run other than the current run), the user must instantiate a Journal object that references a stream. When that stream is opened, Model 204 ensures that the current user has Read access to the dataset(s) comprising the stream. A user whose ACF2 profile does not allow Read access is not allowed to issue the AppendJournalData method using the journal. - If you want to use a journal other than the current one, its dataset(s) have to be allocated to your Online. You may need to use the Model 204 ALLOCATE or DEFINE STREAM command, both of which are described in the "Model 204 System Manager's Guide" and "Model 204 Command Reference Manual".
- Under Sirius Mods Version 7.7, if you specify a journal other than the current one, it must be a journal created with the same Model 204 release as your current Online. If the releases are different, an AppendJournalData method call will silently fail to add any data to its output Stringlist. In Sirius Mods Version 7.8, an attempt to instantiate a Journal object variable that references a journal from a different version than the Online produces a BadJournal exception.
Examples
The following method invocation formats all non-stat audit trail entries for IODEV3 types between 10 a.m. and 2 p.m. on August 10, 2009 from the OLDJRNL historical journal:
%list is object stringList ... %list = new %list:appendJournalData(startTime = '0922210000000', - endTime = '0922214000000', - threads = 'IODEV3', - options = 'AA', - journal = 'OLDJRNL')
The same result can be achieved without named parameters:
%list is object stringList ... %list = new %list:appendJournalData( - '0922210000000', '0922214000000', - 'IODEV3', 'AA', 'OLDJRNL')