Datatek --  Expanding the Possibilities
 
Vendor-Specific Issues   home > services > remediation services > switching vendors > issues  
The following three examples illustrate some types of problems that are encountered only at runtime. These examples are given in the COBOL language.
  • Differing Algorithms
    The following example illustrates the differing results of using a simple MOVE statement with a new compiler that uses a different algorithm for moving COMP data. The source code defines two COMP variables of differing sizes and moves data between them.


    01 NUMBER1 PIC 9(9) USAGE COMP.
    01 NUMBER2 PIC 9(4) USAGE COMP.
    MOVE 65828 TO NUMBER1.
    MOVE NUMBER1 TO NUMBER2.


    The previous compiler performs the move based on the picture clause (e.g., the 4 rightmost digits are moved), resulting in a value of 5828 in the variable NUMBER2. The new compiler performs the move based on the number of storage bytes used (e.g., the 2 rightmost bytes are moved), resulting in a value of 292 in the variable NUMBER2.

    This type of issue can be extremely difficult to track down, especially if the results of a calculation cascade down into other calculations. Programmers would have to analyze the code, looking for data movement between differing sized COMP variables to determine if modification was required. This search would be more labor intensive since variables can be contained in one file, spread across multiple copy files, or passed to other code. To compound this even further, data movement could be the result of other COBOL verbs, e.g., COMPUTE, ADD, SUBTRACT, etc.
  • Differing Error Codes
    Vendors often produce different error codes. If your source code relies on a specific error that is not generated by the new vendor, your program's execution path may be impacted. For example, you may use a vendor that errors when performing an OPEN EXTEND on a file that does not exist. Because of this, your source code may depend on this error. If you then change to a vendor that creates the file if it is not found, your processing check becomes nonexistent.
  • Differing Operating Systems
    You are switching vendors because you are switching to a different operating system. Your current code has operating system specific functionality: file pathnames, script/macro generation, system calls, etc. Your programmers must now search for and modify potentially thousands of lines of both vendor-specific and operating system specific code. This can be an especially arduous task if your programmers are just becoming familiar with the new operating system environment.

Copyright © Datatek, Inc. 2011