Cobol Products
  
Home
Download
Buy
About
Contact Us
 

Summary
Technical White Paper
Try Cobol Transformer
License CobolTransformer
Success Stories
Contact Us

CobolTransformer . ToolKit .
Try CobolTransformer ToolKit

Evaluation Terms and Conditions

  • I agree to use these files only for evaluation purposes and not for any commercial work.
  • I agree not to reverse-engineer the library and executable files from this distribution and not to remove the embedded restrictions.
  • I authorize Siber Systems to send me product update info by e-mail.
  • By clicking the "Submit" button I agree to be bound by the terms of this Evaluation License Agreement.

If you agree with these terms, proceed to Download Page.

Questions? Call +1-877-762-6367 (int. +1-703-218-1851)

Evaluation Package limitations are listed here.


How to Use Evaluation Package

The Evaluation package, once unzipped, consists of the following directories:

lbase
CobolTransformer base services library. This library contains service classes and functions used for platform neutralization.

sct
CobolTransformer files: header files *.h, thin library file sct_sql_xcl.lib, CobolTransformer trial executables parser.exe and pprinter.exe.

translib
Transformation Library. This directory contains transformations. Transformation is specially packaged class that transforms the Program Tree. Transformations can be run both from command line and visual environment.

cbl-grep
Cobol Grep. Sample tool that Searches Cobol program for tree-based program structure patterns.

cbl-report
Cobol Reporter. Sample tool that Reports various statistical and memory/record layout data for a given Cobol program.

smp-ibm2fsc
IBM Cobol to Fujitsu Cobol converter. This is a sample client that uses CobolTransformer.
This is not a complete converter. Complete converter is called ibm2fsc and it can be downloaded from the Specific Tools Evaluation page.

smp-gen-prog
This tool generates a complete Cobol program from scratch. Its purpose is to give you a feel of how to build new CobolTransformer Program Trees and how to pretty-print them.

y2k-fix
Y2K Windowing Tool. This is a sample client that uses CobolTransformer to apply windowing technique used for Y2K remediation to Cobol programs. This is more advanced example of CobolTransformer use.

Running the Sample CobolTransformer Clients

smp-ibm2fsc

Go the sample client directory smp-ibm2fsc and type smp-ibm2fsc-xcl. It would print a list of command line options available.

Now try to run the converter executable smp-ibm2fsc-xcl.exe on live IBM Cobol files. If you do not have any IBM Cobol files on your own, then use our OSVS Cobol sample file example.cbl, enclosed in the distribution.

First, convert OSVS Cobol to Fujitsu Cobol with beautification of the code by typing:
smp-ibm2fsc-xcl -no-gen-src example.cbl
The converted program is stored to file example.fsc.

Next, try the same conversion in SourcePrint mode by typing:
smp-ibm2fsc-xcl -gen-src example.cbl

Notice that only the converted lines are affected.
It can be verified by running:
diff example.cbl example.fsc

Finally, try SourcePrint with copybooks restoration. First move a fragment of the example.cbl to copybook example.cpy and replace this fragment with COPY example. statement in example.cbl. Also create a directory copy in smp-ibm2fsc.

Then type:

smp-ibm2fsc-xcl -gen-main-dir=copy -gen-src -gen-copy-dir=copy example.cbl Converted main file and copybooks appear in directory copy with unchanged extensions.

smp-gen-prog

Go the sample client directory smp-gen-prog and type smp-gen-prog-xcl. It would generate a Program Tree for Cobol Program that prints current time and date. Then the Program Tree is pretty-printed to file _gend_.cbl.

Please note that all trial CobolTransformer clients are compiled with debugging info, so you can use your favorite debugger to walk through the steps of creating and pretty-printing the Program Tree.

y2k-fix

Introduction. Year2000 FixUp Tool y2k-fix fixes Year2000 bug in Cobol programs using the Windowing Approach. It is a more advanced sample of CobolTransformer technology use.

You supply y2k-fix tool with a list of data items that need to be "windowed". It can be an explicit list of data items mentioned by the name, or a search criterion. For every data item from this list the tool adds Windowing Logic before the Year2000-affected operations.

Specifically, if a comparison operation has arguments such that one of them is date data-item, then both arguments of this comparison operation are replaced with temporary data-items, which are assigned Y2K-expanded date values. Statements that compute the expanded values are inserted before the statement that contains this comparison operation.

Evaluation. Start by typing y2k-fix in Command Line prompt. It will print a list of command line options available.

Now try to run the converter executable y2k-fix.exe on live Cobol files that have Year2000 problem. If you do not have any live files, then use our example.cbl sample file, enclosed in the distribution.

First, remediate Y2K problem while beautifying the code by typing:
y2k-fix -no-gen-src -date-pic=9(6) example.cbl
The converted program is stored to file example.yfx. Note: on UNIX you need to enclose 9(6) in quotes, so that parenthese are not interpreted by UNIX shell.

Now compile program example.yfx together with supplied program y2kxpnd.cbl and -- whoa! -- you have a working application that has all date data items windowed.

Next, try out Y2K remediation in SourcePrint mode by typing:
y2k-fix -gen-src -date-pic=9(6) example.cbl
Notice that only the converted lines are affected. It can be verified by running:
diff example.cbl example.yfx

Finally, try SourcePrint with copybooks restoration you need to cut/paste a piece of example.cbl code into a copybook):


y2k-fix -gen-src -date-pic=9(6) -gen-main-dir=cy2k 
        -gen-copy-dir=cy2k example.cbl
Converted main file and copybooks appear in directory cy2k.

How the Client-Server Setup Works

Free Evaluation Package uses client-server model. That is, all important functions (parsing and pretty-printing) are performed not in the CobolTransformer library client process space, but rather in a separate executables automatically called for you by the CobolTransformer thin client.

To the user of CobolTransformer it looks like a regular C++ function call. But instead of performing the processing in the CobolTransformer library linked in with your application, you link in only a thin proxy library that makes calls to the CobolTransformer executable parser and pprinter.

Your CobolTransformer client (in this case smp-ibm2fsc) calls SctParser.Parse() function. The proxy for this function is a part of library sct_sql_xcl.lib. This proxy does not perform any actual parsing, it just calls parser.exe and passes all the call arguments to it.

The parser parses the specified Cobol file and writes Program Tree for this file to the temporary file in externalized form. Once the parsing is finished, the smp-ibm2fsc client reads the externalized tree from the file and restores it in its address space.

Then the C++ code performs the actual tree transformations as specified in the file SPEC.txt.

Finally the converted tree is passed to SctPrettyPrinter.PrettyPrint() function that calls pprinter.exe to perform the actual pretty-printing.

Programming Your Own Conversions

Now the real interesting stuff begins. Try to change some aspects of the conversion process and see that your changes really affect the conversion.

For instance, try to remove code that creates one of the MOVE statements in CURRENT-DATE conversion (lines 295 to 303), compile the code and check that the MOVE statement that moved to FSC-SYS-MONTH now is not added.

Compiling the Sample Converters

Use nmake to compile the sample clients on WIN32 systems (Windows 95, Windows NT). Type nmake in the following directories:
lbase
sct
translib
smp-ibm2fsc
smp-gen-prog.

For compilation you need to have Microsoft Visual C++ ver. 5.0 or 6.0 compiler and linker.
The enclosed sct_sql_xcl.lib library will not work with Microsoft Visual C++ Version 4.0 because it has bugs that interfere with correct operation of CobolTransformer library. Please upgrade to VC++ 5.0 or 6.0.

You also can download a version of CobolTransformer Evaluation Package that works with Borland C++ Builder 5.

When you license CobolTransformer (including Executable License), you will get a complete source for the client part of the CobolTransformer library, so that you can compile CobolTransformer client library using any compiler you like.

Requesting the Manual

To start writing your own code for CobolTransformer you would need to obtain CobolTransformer manual. It is included with the Trial Package of CobolTransformer Toolkit.

Buy It

Please proceed to Licensing & Pricing Page.

Siber Systems
Copyright © 1997-2010 by Siber Systems Inc.