jBASE Structure

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 42

jBASE Structure

Objective
To understand
• jBASE Directory Structure
• Environmental Variables In jBASE
• File Types In jBASE
• jBASE File Resizing Commands
INTRODUCTION TO JBASE
• jBASE is an application development and database management
system.
• Uses the ‘C’ compiler to compile
T24 Architecture – An Overview
User

T24 (Application)

jBASE (Database)

(Operating
System)
Logging Onto jBASE
• Log on to jbase

• User name and password are verified


• remote.cmd is executed from RUN directory.
jBASE Directory Structure

/jBASE

bin config spooler lib tmp


jBASE Directory Structure
• bin
Contains all the binary executables that make up the jBASE
system including the compilers.
jBASE Directory Structure
• config
Contains various configuration files relating to the jPML daemon,
the configuration file for the creation of library files and other
configuration files.
jBASE Directory Structure
• lib
Contains all the jBASE library files which are required for the
working of jBASE.
Library files are like the windows ‘.dll’ files.
jBASE Directory Structure
• tmp
This is a general purpose temporary directory for runtime use
jBASE Directory Structure
• jspooler
Contains the spool files of jBASE which are required to enable
printing in jBASE
Jbase licence in R8
• Jbase licence code must be put in a file called system.properties.
• Example path - C:\jbase5\5.0\config\system.properities
• This is responsible for managing and licensing jBASE processes
and ports.
Environment variables
• There are certain *entries* which are responsible for the successful
running of the jBASE.
• To reach there:
a. Right click on ‘My Computer’ icon on the desktop
b. Select ‘Properties’, once ‘System Properties’ window is open,
click on ‘Advaced’ tab
c. In the ‘Advanced’ tab click on ‘Environment Variables’
Environment variables
jBASE Environmental Variables
• JBCGLOBALDIR
Contains the path of the config directory of jBASE that contains the
jBASE configuration files
JBCGLOBALDIR = C:\jbase5\5.0
JBCJREDIR
• JBCJREDIR = C:\jbase5\5.0\java\jre
This Variable refers to the java runtime environment.
JBCJRELIB
• JBCJRELIB = C:\jbase5\5.0\java\jre\bin\client;C:\jbase5\5.0\java\
jre\lib

This Variable refers to the lib and bin of java runtime environment.
jBASE Environmental Variables
• JBCRELEASEDIR

Contains the directory where jBASE has been installed


JBCRELEASEDIR = C:\jbase5\5.0
jBASE Environmental Variables
• PATH

Contains the path executables files of jBase


PATH = %JBCRELEASEDIR%\bin;%JBCJRELIB%; (*DO NOT* delete/modify other entries)
jBASE File Types
• Every file in jBASE has 2 portions

Data Portion Dict Portion


1 xxx yyy S.NO -- properties
2 xxx yyy NAME -- properties
3 xxx yyy ADDRESS-- properties

• Data File : Contains the records


• Dict File : Contains the field names and the field definitions
jBASE File Types
jBASE supports 2 different types of files

• Non-hashed file
• Hashed file
jBASE File Types
• Non-Hashed Files
• Sequential files
• Used to store programs
• Type = UD
jBASE File Types
• Hashed Files
• Store and retrieve data randomly
• Improve performance
• Used for data and dict files
• Type = J3 or J4
• Have modulo and separation and secondary buffer
• Modulo – Number of frames
• Separation – Size of a frame
• Secondary Buffer – Size of the secondary buffer size.
• Default size of secondary buffer : Size of 1 modulo * 2
jBASE File Types
• J3 Hashed File with Modulo 4 and Separation 4
• Default size of 1 frame is 1024 byte

4*1024 4*1024 4*1024 4*1024 4*1024 4*1024 4*1024


4*1024
4096 4096 4096 4096 4096 4096 4096
4096
Bytes Bytes Bytes Bytes Bytes Bytes Bytes
Bytes Modulo 1 Modulo 2 Modulo 3 Modulo 4
Modulo 1 Modulo 2 Modulo 3 Modulo 4

Data File Dict File


jBASE File Types
• J4 Hashed File with Modulo 4 and Separation 4
• Default size of 1 frame is 4096 byte

4*4096 4*4096 4*4096 4*4096 4*4096 4*4096 4*4096 4*4096


16384 16384 16384 16384 16384 16384 16384
Bytes Bytes
16384
Bytes Bytes
Bytes Bytes Bytes Bytes
Modulo 1 Modulo Modulo 3 Modulo 4 Modulo 2 Modulo 3 Modulo 4
Modulo 1
2
jBASE File Types
• Example 1
Create a hashed file TEMENOS of type J4 with the following values:
• Dict Modulo : 1
• Dict Separation : 2
• Dict Secondary Buffer Size : Default
• Data Modulo : 3
• Data Separation : 2
• Data Secondary Buffer Size : 2
jBASE File Types
• Solution 1
• CREATE.FILE TEMENOS TYPE=J4 1,2 3,2,2
• File TEMENOS]D created , type = J4
• File TEMENOS created , type = J4
jBASE File Types
• Solution 1 Dictionary File Data File

2*4096 2*4096 2*4096 2*4096


8192 8192 8192 8192
Bytes Bytes Bytes Bytes
Modulo 1 Modulo 1 Modulo 2 Modulo 3

8192 8192 8192


*2
*2 *2
Secondary
Buffer Size
jBASE File Types
• Example 2
Create a non-hashed file TEMENOS1
jBASE File Types
• Example 2
Create a non-hashed file TEMENOS1
jBASE File Types
• Solution 2

• CREATE.FILE TEMENOS1 TYPE=UD


• File TEMENOS1]D created , type = UD
• File TEMENOS1 created , type = UD
File Maintenance In jBASE
• A badly sized file will result in low performance of the
system. Therefore it is absolutely necessary to resize files
periodically
File Maintenance In jBASE
• jstat
jstat is the command in jBASE that is used to determine the
statistics of a hashed file.
File Maintenance In jBASE
• Example 1
jstat FBNK.ACCOUNT

Output
File Maintenance In jBASE
• Options with jstat

• f - free space display


• r - record display
• s - short summary display
• v - verbose
• w - do not wait on locked records
File Maintenance In jBASE
• Example 2
• jstat -r FBNK.ACCOUNT
File Maintenance In jBASE
• Resize the file FBNK.ACCOUNT
• New Modulo = Total Number Of Bytes/Size Of 1 Frame
• jrf is the command to resize files
• jrf –S195 ../mbdemo.data/ac/FBNK.ACCOUNT
File Maintenance In jBASE
• Options with jrf

• H# - Changes hash type to # (1-4)


• D - Allows downsize
• E - Resize empty files
• I - Ignore empty files
• R - Suggest modulo
• V, -V1 - Verbose and very verbose mode
• S# - Resize to modulo #
Summary
• jBASE is a multivalue database
• Has a similar directory structure to that of Unix
• The bin directory contains all the jBASE executables
• The lib directory contains all the jBASE library files
• The config directory contains the configuration files of jBASE
• The tmp directory contains the temporary data that the database
wishes to store
Summary
• The jspooler directory contains the jBASE spool files
• JBCRELEASEDIR contains the path where jBASE has been installed
• JBCGLOBALDIR contains the path of the jBASE config directory
• PATH contains the path of the jBASE executables
($JBCRELEASEDIR/bin)
• LIBPATH for AIX SHLIB_PATH for HP and LD_LIBRARAY_PATH are
the variables that will hold the path of the jBASE library
files($JBCRELEASEDIR/lib)
Summary
• JBCSPOOLER contains the path of the jBASE spooler files
• JBCBASETMP contains the path of the jBASE tmp directory
• J4 files are hashed files and the default size of 1 modulo is 4096 bytes
• J3 file are hashed files and the default size of 1 modulo is 1024 bytes
• UD files are non hashed files
• jstat is the command that is used to determine the statistics of a hashed file in
jBASE
• jrf is the command that is used to resize hashed files in jBASE
THANK YOU

You might also like