Skip to content
This repository has been archived by the owner on Jun 30, 2020. It is now read-only.

Latest commit

 

History

History
56 lines (43 loc) · 3.33 KB

README.md

File metadata and controls

56 lines (43 loc) · 3.33 KB

beast-name

This is a training COBOL program to look for a sequence of Hebrew words in Bible which numerical value sums to 666, 616, 646, 665

The purpose of thi sprogram is to scan Genesis chapter of Holy Bible (the Hebrew version) to look for sequences of words which numerical value sums to one of the supposed values of the beast name. They are 666, 616, 646, 665. Among others, 666 is the most popular but others exists as a result of copist mistake over centuries. Today we do not know which one is the oruiginal one however 666 seems be the best candidate. Nevertheless the program searches for all these values.

The Process

The process requires 3 steps:

  1. Create a sequential VB data set 'genesis'.
    The one used in this exercise has the following characteristics:
    Organization: PS
    Record format: VB
    Record length: 270

    Each record in this data set will contain one verse from the Bible coded in the following way.

    CCCVVV--------------------- UTF-8 -----------------------
    Where:
    CCC - the chapter number - 3 characters
    VVV - the verse number - 3 characters
    UTF-8 - the Hebrew text of the verse coded as UTF-8, 2 bytes per character (mostly as blanks as coded as ASCII X'20' and take one byte)
    All Hebrew UTF-8 characters belong to the range: (D790 - D7AA).

  2. Feed 'genesis' dataset with a content.
    The source data is a UTF-8 text file genesis.txt which format is:

    RTLRTLCC:VV ---------- UTF-8 --------------------
    Where:

    • each row contains one verse
    • first 6 bytes contain the information about Right-To-Left read direction
    • next there is a chapter and verse number formed as 99:99
    • the blank indicating the end of the row header
    • the Hebrew text coded as UTF-8
    • the file is not perfectly well formed. It contains blank new lines which should be stripped

    The genesis.txt file has to be uploded as a USS file (as a binary file to avoid conversion).

    The program rgen.c converts the genesis.txt file to genesis data set. It strips the RTL header from each row, reformats Chapter and Verse nd finally copies the rest of UTF-8 text intact.

  3. Scan for desired numbers.
    The cblgen.cbl program whitten in Enterprise COBOL scans the genesis dataset looking for desired values. The efficient double-progessive algorithm helps to reduce the number of calculations.
    For each searched value the program lists the sequence of words which total value perfectly matches the searched value. Each word is listed as a sequence of Hebrew character names (as Mainframe text terminal demonstrates difficulties in displaying UTF-8 encoded Hebrew characters).
    The result can be seen in the out.txt file.

Files

genesis.txt - the source text file containing the Hebrew text of Genesis from The Holy Bible
genesis.data - the z/OS dataset containing the Hebrew text of Genesis from The Holy Bible ready for scanning by a COBOL program

rgen.c - the C program converting genesis.txt to genesis.data dataset
rgenj.jcl - the JCL compiling and launching rgen.c

cblgen.cbl - the COBOL program scanning the genesis.data for desired values
rgencobj.jcl - the JCL compiling and launching cblgen.cbl

out.txt - the text file containing the output generated by the cblgen.cbl