A typical IRS Job has a number of steps for example Set #1 - ALC #2 - COBOL #3 - AlC etc. The IRS is moving away from ALC and COBOL this means they are converting a single step with a job at a time this mean the new Java appl to replace the ACL or COBOL step MUST read/write files create/consumed by ACL or COBOL for example the previous COBOL step wrote this binary file: * COPYBOOK FOR THE VEHICLE ORDER RECORDS 01 Order. 05 ID PIC 9(04). 05 DEALER-ID PIC 9(06) COMP. <- this is a BINARY number value 05 ORDER-DATE. 10 ORDER-DAY PIC 9(02). 10 ORDER-MONTH PIC 9(02). 10 ORDER-YEAR PIC 9(04). 05 MAKE PIC X(20). 05 MODEL PIC X(25). 05 VIN PIC X(17). 05 YEAR PIC 9(04). 05 BASE-COST PIC S9(07)V99 COMP-3. <- this a a PACKED-DECIMAL number value 05 TAX-RATE PIC 9V99. <- this has an implied decimal place 05 TOTAL-COST PIC S9(07)V99 COMP-3. so... My Java code MUST be able to deal with these file formats ibmjzos.jar to the rescue the steps to access a COBOL dataset from Java are: 1) get a copy of the COBOL Copybook that defines the file layout 2) I write a Java Class to act as a converter, I will have methods to get/set each field in the file This is the ONLY place the Java code deals with the feilds In this class I create a IBM Datatype field for EACH COBOL field // 05 ID PIC 9(04). <- the COBOL field as a comment private static final ExternalDecimalAsIntField id = <- the IBM Datatype factory.getExternalDecimalAsIntField(4, false); <- invoke the factory // 05 DEALER-ID PIC 9(06) COMP. private static final BinaryAsIntField dealerId = factory.getBinaryAsIntField(6, false); after I define the fields I add get/set method for the Java code to call public int getId() { return id.getInt(bytes); <- note the COBOL file is binary so I need an array } of bytes public void setId(int idValue) <- the get/set method deal ONLY w/ Java datatypes { id.putInt(idValue, bytes); } 3) In my Java code I call the converter to read a line from the Cobol file and pass the byte[] to the converter the call the get methods to extract teh Java values fro the Cobol filed or I create a empty converter to write out a Cobol file, I call teh set methods to load the fields from the Java fields and get the byte[] I can use to write out a binaly line into the new Conol file