Class PopulateDbTableFromSequentialFile

java.lang.Object
com.softwaremining.jcl.PopulateDbTableFromSequentialFile

public class PopulateDbTableFromSequentialFile extends Object
This class facilitates populating a database table using a translated class and a data-file It can also perform EBCDIC to ASCI conversion . This class provides equivalent functionality to JCL's IDCAMS command, It will generate a sequential (or line sequential) file for a VSAM KSDS structures which have already been translated to an Object-Relational class (ie subclasses of SQLWrapper, CICSPersistence, ILEPersistence ... .

Usage
  java com.softwaremining.jcl.PopulateDbTableFromSequentialFile -class=fully.qualified.classname -datafile=dataFile -tableName=tableName [optional -delimiter=xxxx]  [optional -conversion=conversion]
  dataFile : - e.g c:/temp/file1.txt or c:/temp/ (when only a dir name is provided, the system will use default filename for the Persistent class)
  tableName   : Name of table-name to populate
  [Optional] delimiter   : e.g. \\n or BLANK (for SequentialFiles). Enter \\n (or \\r\\n) for Line-Sequential, enter BLANK or leave blank for sequential files 
  [Optional] conversion  : E2A or A2E for EBCDIC->ASCII or ASCII->EBCDIC
  [Optional] removenonascii=true - replaces all non ascii chars with spaces. DO NOT USE with Ebcdic to Asci options
  
  • Constructor Details

    • PopulateDbTableFromSequentialFile

      public PopulateDbTableFromSequentialFile()
  • Method Details

    • main

      public static void main(String[] args)
      main entry point
    • populateTable

      public static int populateTable(ISMBean bean, String fileName, Boolean ebcdicToAscii, Boolean removeNonASCII)