Skip to content

R COBOL DI (Data Integration) Package : Import COBOL CopyBook data files directly into R as properly structured data frames.

License

Notifications You must be signed in to change notification settings

thospfuller/rcoboldi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RCOBOLDI

R COBOL DI (Data Integration) Package: An R package that facilitates the importation of COBOL CopyBook data directly into the R Project for Statistical Computing as properly structured data frames.

Note that not all copybook files can be converted into CSV -- for example single-record type files can be converted to CSV however complicated multi-record type files will NOT map to CSV.

Examples

Example One : Local package installation and then convert a COBOL data files into data frames.

Load the RCOBOLDI package locally and use it to convert COBOL data files into data frames.

This example also includes a call to CobolToCSV.

Docker Example : If you just want to try the package on some test data, start here.

All you'll need to run this example is Docker and an Internet connection.

Logging

The Java API uses Log4J and writes files to the ~/rcoboldi-package-logs/ directory. This file can be found here.

See Also

Further Examples

An example of the R COBOL DI (Data Integration) Package loading DTAR107 files (example 2) with the inputFileStructure set to "Fixed Length Binary" and the font set to "cp037". An example of the R COBOL DI (Data Integration) Package loading a file with the inputFileStructure set to "Text" and the font set to "cp1252".

Docker (rcoboldi:rocker-rstudio)

Follow this link for instructions pertaining to setting up a Docker image and running a container using the R COBOL DI package.

result <- RCOBOLDI::ReadCopyBookAsDataFrame("/home/rstudio/rcoboldi/java/rcoboldi-core/src/test/resources/example1/DTAR020.cbl", "/home/rstudio/rcoboldi/java/rcoboldi-core/src/test/resources/example1/DTAR020.bin", "Fixed Length Binary", "cp037")

An example of the R COBOL DI (Data Integration) Package loading a file with the inputFileStructure set to "Fixed Length Binary" and the font set to "cp037". This should work out-of-the-box with a container built from the rcoboldi:rocker-rstudio image."