The class %SYSTEM.MV provides access to MV system level functions and elements for COS and MVBASIC programmers.
This class should always be used in preference to direct access to the internals of the MV implementation, as it is guranteed to be in sync with any underlying structural changes.
NEVER try to access MV elements at their base system level as upward compatiblity is not guranteed and this can in fact be dangerous.
COS language methods and programs should access this class using the special $System object:
Set cosName = $System.MV.validCacheName("MVFILE.$TRANGEN4M3")
MVBASIC programmers should access this class using the "%SYSTEM.MV" method:
cosName = "%SYSTEM.MV"->validCacheName("MVFILE.$TRANGEN4M3")
The method passes a string to the conversion code compiler, checks for errors and returns a string of information. The returned string is a series of comma separated numbers:
1. Status code:
Negative value is a negated errmsg number.
Positive value is data type of result.
2. Bit values that show the types of computational codes found.
1 Contains an A correlative
2 Contains an F correlative
4 Contains a Concatenate Correlative
8 Contains a Substitute Correlative
16 Contains a Call or B; Correlative invoked for each value
32 Contains a Call or B: Correlative invoked once for an attribute
3+. If present, shows attributes referenced in the conversion code.
This method sets or clears a flag that controls whether INPUT commands will read only stacked DATA or will also read from the input device. The argument is a boolean value 0 or 1. If DataOnlyFlag is 1, only stacked DATA will be available to INPUT commands. An attempt to read beyond the stacked DATA will result in an ABORT. If DataOnlyFlag is 0, the Data Only flag is cleared and INPUT commands will return to the default state of reading both stacked DATA and directly from the input device.
The return value is the previous state of the flag. If no argument is given, the current state of the flag is returned without changing it.
The method gets contents of the specified attribute, current value, current subvalue from @Record. Use to Iterate through all the (sub)values in conjunction with A or F correlatives. If the specific attr,val,subval does not exist then the funtion will return an empty string.
The Initializer for iterating through values and subvalues in conjunction with A and F correlatives. This clears the moreValues and moreSubValues flags and sets the current value and current subvalue counters to 1.
The method tests to see if there are more values to process as indicated by the moreValues and moreSubValues flags and sets the current value and current subvalue counters accordingly. These flags and counters are used by the Conversion Processor to handle multi-values in A and F correlatives.
Get the COS shell recall stack
Get the MV shell recall stack
Set the passed string as the COS shell recall stack
Set the passed string as the MV shell recall stack
Call this method to get the next Item ID from the TCL II processed command line.
Note that you can enable TCL II (list, vs *, vs itemidlist) processing for an MVBASIC cataloged program by editing the CATALOG pointer for the program and adding '2' to Attribute 5:
You can additionaly add the the following letters to attribute 5:MYNEWVERB 0001 V 0002 MVB.3ý%SYS 0003 B 0004 0005 2 0006 0007 L 0008 MYNEWVERB 0009 BP 0010 SYSPROG
'C' - will cause the item body to be copied into @RECORD.
'N' - will allow new items and not check for an item's existence.
'D' - will force an open of the DICT rather than DATA section.
1 - Success. The next Item Id has been placed in @ID and optionally the body has been copied into @RECORD
0 - End of Items or failure.
Build a cross reference of a MV class for maintenence purposes.
Given an MV identifier name of some sort in input, such as a file name this method will return a name that is valid as a class or property name using Camel Case.
Method designed for use in PROTOCLASS to generate a property defined by the MV DICT item that has been parsed and stored in %dictionary(pord)
If an error occurred in a call to an object or class, you can call this method and it will PRINT the error messages to the terminal.
Method designed for use in PROTOCLASS to delete a property and maintain the cross reference.
Given an open file descriptor in fdsc, this method will suggest a valid name for a class or other ObjectScript identifier that can be used to name it outside the MV environment.
Given an open file descriptor, this method will return the fully qualified name of the global that stores the data.
Fully qualified means that it includes the NAMESPACE (account) within it such as ^|"TESTACCOUNT"|JIM.DATA
This method will search a class for properties that are defined as itypes and add implementations of the calc and calcsql metods for those itypes to the class
Given an open file descriptor, this method will return the class associated with that file.
If createFlg is set then the class will be created if it doesn't exist.
If NewName is specified then that name willl be used to create the class.
Supplies the next avaiable unique global name using the same mechanisms as CREATE-FILE. Calling this will reserve a global name for you that is guranteed to be exclusive for your use. Note that the name returned does not include any namespace information and is unique across namespaces too. It is up to you to decide where (namespace wise) the global will exist.
Parses the supplied DICT entry record as element name into the public variable %dictionary using the open dict file variable if it needs to reference other elements in the DICT. If the method returns 0, then you can just exit your program and the MV shell will display any ERRMSG that has occurred.
Returns: nnn - Ordinal entry number in %dictionary 0 - Could not open DICTionary or other error
Given a port number supplied by the caller, this function will set the current port number for this process. Should be called early on in the start up of the process for predictability, but can be called any time in practice.
Given an MV identifier name of some sort in input, such as a file name this method will return a name that is valid as a class or property name.