cobconv

Top  Previous  Next

cobconv (former host2unix) is a command line tools that perform several changes on a COBOL source (program or copybook) to let it work on the Unix, Linux or Windows platform.

Each transformation supported may be singularly activated with the corresponding command line option.

Syntax

cobconv [options] <source> <target>

Commands

-p

suppress COBOL (pre)compiler instructions (SKIP, EJECT, XOPTS, etc.)

-s

updates SELECT clauses

-c

updates CURRENT-DATE

-r

remarks REMARK paragraph.

-D

remarks DECLARATIVES.

-d

inserts COPY DFHRESP (obsolete)

-R

use external HT-EXTERNAL-RETURN-CODE

-A <copybook>

inserts COPY of specified copybook

-I <include>

inserts EXEC SQL INCLUDE of specified include

-i

changes librarian -INC into COPY

-u

fix up user errors (lenGHT, etc.)

-f <filter>

filters input through <filter>

-g

changes STOP RUN into GOBACK.

-h

show help

-P

act as pipe (uses STDIN/STDOUT)

-L

COBOL Level 1 handling (to COBOL2)

-S

SQL fix up (OPTIMIZE FOR) (obsolete)

-C <path>

looks for copybook in path (only for COBOL Level 1)

default is $COBCPY

-x

sostituisce TEST con XPRETEST

-X

enables EXEC SQL check when looking for file SELECT clause

-T

inserts HT-PROGRAM-TYPE

-a

special behaviour for SYSREADER recognization

-l

suppress 01 level as ( 01 COPY COPYNAME ) becames ( COPY COPYNAME )

A sample ANT target

       <target name="ol_h2x">
               <apply executable="cobconv" dest="src/tp">
                       <arg value="-DXijcRpgrsS"/>
                       <srcfile/>
                       <targetfile/>
                       <fileset dir="src/tp" includes="*.COB"/>
                       <mapper type="glob" from="*.COB" to="*.pre"/>
               </apply>
       </target>