What's new in KCML 6.60
Compiler and language
- The kc compiler can be used to compile programs and libraries and to enforce strict syntax and type checking.
- Libraries compiled with kc6 now support 64k symbols. Foreground programs still limited to 32k symbols.
- Scope rules are now more intuitive and in line with the KCML7 rules. Local variables in libraries are now private to their defining routine and not visible from child routines.
- The kviewinfo utility suggests the best database views by analysing all possible code paths. Views are important for SQL databases like Oracle.
- CONST can be used to modify BYREF if the variable is not changeable. It is only checked by the compiler, not at runtime
- Both DIM and the arguments of a DEFSUB can now use an AS clause to specify types for the symbols. These types are only checked at compile time by the kc compiler. and have no effect at runtime.
- PROTOTYPE and CALLBACK are used to help the compiler match callback functions.
- DEF VIEW is a variant of DEF RECORD that specifies a record type with a subset of the fields from the original type.
- DEF DATABASE ROW is a variant of DEFRECORD that helps the kviewinfo utility distinguish records that have views.
- DEF LINKED VIEW is a variant of DEF VIEW that tells the kviewinfo utility that particular views may be omitted from view analysis.
- FOR ... END FOR replaces FOR .. NEXT. The loop will not be executed if the loop condition is not true on entry.
- LIBRARY USE can be used to load a library when a program is being resolved.
- WHILE TRANS ... END TRANS is used to mark code that makes up a database transaction. It can handle deadlock detection and retry transparently.
- The FINALLY clause in a DEFSUB can specify tidy up code that must be executed as the stack is being unwound following a ROLLBACK
- DEF ENUM can be used to define an enumerated type for constants.
- Bitwise numeric operators
- Partial support for DIM AS to specify enumerated types
Database
Oracle
- Transactions should be specified using WHILE TRANS ... END TRANS. KI_BEGIN is now deprecated.
- KI_PARTITIONS creates a pseudotable of partitions in a table.
- KI_SESSIONS creates a pseudotable of currently open Oracle sessions
- Temporary views can be set with KI_SET_COL_LIST.
- KI_START and its variants can now optionally take a transactional lock on the result set.
- The generation of the result set from a KI_START is now deferred to the point of the first KI_READ_NEXT. Any view row passed in the KI_READ_NEXT will determine the columns in the result set. Result sets should be freed up with a KI_END.
- DEFQUERY can be used to specify complex SQL and return result sets
- Support for caching random cursors per handle. The number cached is determined by a handle attribute inherited from a connection attribute. The default is 5. The cache can be flushed with KI_END.
- KI_READ_PTR can take a lock parameter _KDB_LOCK_REFRESH which will only refresh the row buffer if the row has changed since it was last loaded. KCML maintains a change number or RCN on each row and the last RCN for a handle is available as a string handle attribute.
- Support for bitmap and virtual indexes as well as key compression in CREATE INDEX.
- ALTER TABLE can be used to add, delete or modify columns in place in a table or to change attributes of the table schema.
- Support for Oracle RAC clustered database servers with transparent failover on most database operations.
- Better support for VARCHAR columns which can now be indexed provided they are NOT NULL.
- KI_WRITE_RAW can be used to populate a table using the OCI direct path loader for a significant performance boost over simple KI_WRITE.
Workbench
Client
- Support for IPv6
- Support for SSL encryption
- Support for application server discovery
- Support for 64 bit operating systems such as Vista64. The client remains a 32 bit application for efficiency but it can integrate with the 64 bit desktop.
Connection Manager
Miscellaneous
- The SOAP server support has been rewritten around an object model.
- The SOAP client support now has better WSDL parsing and support for Document Literal as well as RPC usage.
- Xalan XSL transform engine object
- The memory manager handles large allocations more effectively and can also release pages more easily resulting in a smaller heap size
- New sorting and searching functions for records.
- New encoding and decoding functions for bulk converting from and to UFT8 and Microsoft code pages.
- A new AES-256 encryption and decryption functions.
- The 'KCML_poll() function can be used to replace $IF when testing an array of sockets for writability as well as readability.