(Last Update 2/10/2005)
CIM generates transaction data in a variety of formats. These formats are well documented and published in the CV1 Integration Module Programmer's Guide and Reference. Using this reference, a programmer can easily determine what data is available. On the other hand, a challenge that programmers often face is determining what specification a known unit of data corresponds to. For example, if a programmer has opened a text file that was generated from CIM (using some utility such as Windows notepad) it may not be immediately apparent what format the data is in. The purpose of this document is to provide a procedure for making that determination.
Note: This procedure does not apply to third-party native specifications. It is only suitable for PIDF-based data.
Step 1.) Understand CIM Messages
Visit the following link: Data Specifics
Read and understand the concept of a "CIM Message". The most important thing to remember is that CIM Messages are actually comprised of two independent constructs.
Step 2.) Observe the data
This procedure assumes you are working with CIM Messages in an ASCII "flat file". Open the file using a text editor (Such as Windows Notepad). If possible, use an editor that shows the numerical position of the text cursor. Be aware that flat files generated from CIM may contain numerous types of data in differing formats all within the same file. Choose a single record from the file to work with.
Step 3.) Determine which CETE is being used.
As you now know from Step 1, a CIM Message is comprised of a CETE and a CIM Transaction. Because CETEs and CIM Transactions come in a variety of formats, CIM Messages will vary in length. To determine which CETE is being used, you must examine the first 7 characters of the message. If the value is "CETE200", you are using CETE version 2.00. If the value is "CETE300", you are using CETE version 3.00 and so on... If the first 4 characters do not equal "CETE", you are using version 1.00. Version 1.00 does not include a CETE version identifier.
Step 4.) Locate the specification for the CETE.
Now that you know which CETE is being used, you can make use of it. Each type of CETE is independently documented in tables located at Data Specifics A header for each table contains a version#, a description of the purpose and usage of the CETE, and general comments. CETEs contains numerous fields-- however, for the purpose of determining what specification your CIM Transaction is based on, you need only be concerned with three of them:
- Total Length
Step 5.) Determine your transaction
A.) Locate the "Topic" field in the CETE description. This two-byte field is used to identify which transaction is present in the CIM Message. Observe the "Starts At" value for this field and use it to find its physical starting position in your text file by positioning your cursor to this value. For example, for CETE Version 1.00, the topic is physically located starting in position 58. For CETE Version 2.00, it's physically located starting at position 65.
B.) Use the two-byte topic code to lookup your transaction from the transaction index located at Transaction Index.
C.) Locate the "Version" field in the CETE description. This three-byte field is used to identify which version of transaction is present in the CIM Message. Observe the "Starts At" value for this field and use it to find its physical starting position in your text file by positioning your cursor to this value. For example, for CETE Version 1.00, the version field is physically located starting in position 60. For CETE Version 2.00, it's physically located starting at position 68. For each transaction topic, several versions may be available. Use this value to determine exactly which version is represented.
D.) Locate the "Total Length" field at the bottom of the CETE description. This field indicates the length of the CETE. Add one to this number to determine what physical position the transaction data starts at in your text file. For example, for CETE Version 1.00, the transaction data would physically start in position 65.