Skip to content

Commit

Permalink
Changed the documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
thospfuller committed Apr 7, 2020
1 parent 9e4cff7 commit 8f1d0c0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
23 changes: 17 additions & 6 deletions DOCKER_EXAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,37 @@ The Dockerfile in this example is based on Rocker / RStudio and will be running

Step 1.) Build the image (this can take up to 20 minutes).

```
docker build -t rcoboldi/rocker-rstudio:1.0.1 https://raw.githubusercontent.com/thospfuller/rcoboldi/master/docker/rocker/rstudio/Dockerfile

[some image id]
```

![Build the Docker image from the R COBOL Data Integration package Dockerfile."](https://github.com/thospfuller/rcoboldi/tree/master/images/RCOBOLDI_StepOneBuildDockerImage.png "Build the Docker image from the R COBOL Data Integration package Dockerfile.")

Step 2.) Launch a container based on this image.

```
docker run -d -p 8787:8787 -e PASSWORD=password --name rstudio -i -t [some image id]

[some container id]
```

Step 3.) Browse to http://localhost:8787 and enter the username & password combination rstudio & password.

The next three steps appear in the video.

Step 4.) library(RCOBOLDI)
Steps 4-7.) From the R CLI execute:
```
# Step 4.)
library(RCOBOLDI)
# Step 5.)
RCOBOLDI::Initialize()
Step 5.) RCOBOLDI::Initialize()
# Step 6.)
result <- RCOBOLDI::ReadCopyBookAsDataFrame("DTAR020.cbl", "DTAR020.bin", "Fixed Length Binary", "cp037")
Step 6.) result <- RCOBOLDI::ReadCopyBookAsDataFrame("DTAR020.cbl", "DTAR020.bin", "Fixed Length Binary", "cp037")
# Step 7.)
head(result)
```

Step 7.) head(result)
![An example of the R COBOL 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."](images/RCOBOLDI-RockerRStudio.png "An example of the R COBOL 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.")
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ Load the RCOBOLDI package locally and use it to convert COBOL data files into da

This example also includes a call to ```CobolToCSV```.

##
## [Docker Example](DOCKER_EXAMPLE.md) : 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.
The Java API uses Log4J and writes files to the ~/rcoboldi-package-logs/ directory. This file can be found [here](java/rcoboldi-core/src/main/resources).

# See Also

Expand Down

0 comments on commit 8f1d0c0

Please sign in to comment.