isCOBOL Evolve : SDK User's Guide : Utilities : JUTIL : JIsam file generation
JIsam file generation
In order to create a new empty JIsam file from scratch, use either the command command:
jutil –gen [filelist directory]
or the command:
iscrun -utility jutil –gen [filelist directory]
The –gen option of JUTIL is used to create an empty JISAM indexed file. The file structure is defined from user responses to prompts for information. These responses can be saved in a session file that can later be used in batch mode; i.e. (JUTIL –gen filelist directory). The session file has one line with the JISAM file name to be created, along with other properties of the file, such as key positions, lengths, etc. This file can have multiple lines, one for each file to be created, making this a filelist. The directory parameter specifies the target directory for the created JISAM indexed file. The directory can be left blank, or can be specified with a dot (.) to indicate the current directory. Both have the same meaning. If a directory is used, it must first exist.
To make a session file for later use, run JUTIL –gen without the filelist parameter:
For example to run JUTIL in an interactive mode to create an empty JISAM indexed file, type:
jutil –gen
The following prompts are displayed:
Save this session [Y]?
Default answers are in-between the brackets, just press ENTER to accept.
Enter session filename:
Type the session filelist name to save and press ENTER.
Enter JISAM filename:
Type the filename of the empty JISAM file to be created from the session filename and press ENTER.
Enter the maximum record size:
Type the maximum record size and press ENTER.
Enter the # of keys [1]:
Type the number of keys (Primary and Alternate) and press ENTER. The default number is 1.
-- Primary key --
Enter number of segments (1-16):
Type the number of segments for Primary key and press ENTER.
Enter segment size:
Enter segment offset:[0]
For each segment, type in the size and offset and press ENTER. The default offset value is zero. Any other value for offset should be counted as zero-based.
-- Alternate key 1 --
Enter number of segments (1-16):
Type the number of segments for Alternate key and press ENTER.
Duplicates allowed [N]?
For each Alternate key, specify whether duplicates will be allowed and press ENTER. The default value is ‘N’.
Enter segment size:
Enter segment offset:[0]
For each segment, type in the size and offset and press ENTER. The default offset value is zero. Any other value for offset should be counted as zero-based.
JISAM file {MyFile} created.
This new file, MyFile can be used as input to JUTIL –gen for non-interactive file creation. For example, to create the JISAM indexed file named in MyFile with its defined properties, type:
jutil –gen MyFile TargetDirectory
or
iscrun -utility jutil –gen MyFile TargetDirectory