jbase question or two

120 views
Skip to first unread message

David Grenfell

unread,
May 25, 2012, 12:42:36 PM5/25/12
to jb...@googlegroups.com
Good Day to you all:
 
I am about to set up a new account and have a couple of questions regarding file sizing.
 
1/  Is there a dict item I can use to see the size of my items in a file ?  For example.... "LIST FILENAME size"  which would show me the item ID and the size of the item.
 
2/Once I have a look at the items sizes, I assume I can do the following to create a file with the approximate size.
 
For now, lets assume that there are 1000 bytes per item.  Each bucket holds 4096 bytes, so approximately 5 items per bucket.
 
67000 items/5 indicates 13200 buckets
 
so.... CREATE-FILE FILENAME 3 13200  should do it.
 
Am I correct ? or is 13200 too much?
 
Dave.

Simon Verona

unread,
May 25, 2012, 12:51:27 PM5/25/12
to jb...@googlegroups.com
See inline below


On 25/05/2012 17:42, David Grenfell wrote:
Good Day to you all:
 
I am about to set up a new account and have a couple of questions regarding file sizing.
 
1/  Is there a dict item I can use to see the size of my items in a file ?  For example.... "LIST FILENAME size"  which would show me the item ID and the size of the item.
 
LIST FILENAME *A9999     will work.

2/Once I have a look at the items sizes, I assume I can do the following to create a file with the approximate size.
 
For now, lets assume that there are 1000 bytes per item.  Each bucket holds 4096 bytes, so approximately 5 items per bucket.
 
67000 items/5 indicates 13200 buckets
 
so.... CREATE-FILE FILENAME 3 13200  should do it.
 
Am I correct ? or is 13200 too much?
 
It sounds reasonable.   Fill it with data and then use jrf FILENAME   to resize it.
Dave.
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.
 
To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

David Grenfell

unread,
May 25, 2012, 1:57:29 PM5/25/12
to jb...@googlegroups.com
Thank-you Simon.   I just checked my  file, and from just eye-balling it, I figure about 250 bytes per item, so I can lower my size by about 75%.
 
I tried the "jrf FILENAME -R" but didn't get any report.  Using vers. 4.3.10 on xp-pro  I was in the folder where the file exists.
 
Dave.
 

Date: Fri, 25 May 2012 17:51:27 +0100
From: si...@dmservices.co.uk
To: jb...@googlegroups.com
Subject: Re: jbase question or two

Simon Verona

unread,
May 25, 2012, 2:01:34 PM5/25/12
to jb...@googlegroups.com
Try "jrf -R FILENAME"   .. The order seems to matter...

Regards
Simon

David Grenfell

unread,
May 25, 2012, 2:06:08 PM5/25/12
to jb...@googlegroups.com

 
Yep, you're right
 
Dave

Date: Fri, 25 May 2012 19:01:34 +0100

Simon Verona

unread,
May 25, 2012, 2:17:21 PM5/25/12
to jb...@googlegroups.com
Out of interest, there is a command called jstat FILENAME which is
like the old PICK ISTAT command (I think that was what it was called).
It gives out some useful file stats .

eg from one of my systems :-

JSTAT PARTS.MFR.DATA
File .\PARTS.MFR.DATA
Type=J4 , Hash method = 4
Groups = 10379 , Frame size = 4096 bytes , Secondary Record Size = 8192
bytes


Record Count = 500303 , Record Bytes = 40954687
Bytes/Record = 81 , Bytes/Group = 3945
Primary file space: Total Frames = 14728 , Total Bytes = 40954687
Secondary file space: Total Frames = 0 , Total Bytes = 0
>

On 25/05/2012 18:57, David Grenfell wrote:

Charlie Noah

unread,
May 25, 2012, 2:32:04 PM5/25/12
to jb...@googlegroups.com
Hi Dave,

On version 3.4.7 I get:

jrf -R CONTROL
CONTROL Type J4, 28 records at size 2957, Downsizing skipped from modulo 101 to 31.

jrf -Rv CONTROL
CONTROL Type J4, 28 records at size 2957, Downsizing skipped from modulo 101 to 31.
File skipped
-------------------------------------------------------------------------------

===============================================================================

*A9999 doesn't take into account the ID length or overhead. I use an MD I-descriptor so it can be used with any file. An MD I-descriptor can be made functional by creating it in DICT MD, ICOMPing it, then copying it to the DATA portion of MD.

MD SIZE
001: I Size of item, ID and overhead in bytes
002: LEN(@ID) + LEN(@RECORD) + 18
003: MD0,
004:             }Bytes       }************
005: 12R
006: S
007:

Regards,
Charlie Noah

Tiny Bear's Wild Bird Store
"Everything For The Backyard Bird Enthusiast, Except For The Birds"
Info, Forum:  http://www.TinyBearMarketing.com
Store:            http://Stores.TinyBearMarketing.com
Toll Free:       1-855-TinyBear (855-846-9232)

Richard Kann

unread,
May 25, 2012, 2:43:51 PM5/25/12
to jb...@googlegroups.com
I thought it had to be a lower case r as in jrf -r FILENAME

Richard Kann
Comp-Ware

Simon Verona

unread,
May 25, 2012, 2:58:18 PM5/25/12
to jb...@googlegroups.com
It accepts upper or lower case arguments by the looks of it.  The documentation for the command shows the options in upper case though :-

Usage:

jrf {-options} {filename {,...} }

Where options can be:

        -H1 Force to HASH1 file type
        -H2 Force to HASH2 file type
        -H3 Force to HASH3 file type
        -H4 Force to HASH4 file type
        -B  Keep original bucket/frame size
        -C  Change restore specification
        -D  Allow downsize of file
        -E  Resize empty files
        -I  Ignore empty files
        -Mn Override default Hash Method, set to method n
        -R  Reporting only (do not actually resize)
        -V  Verbose mode
        -V1 Very verbose mode
        -Sm,f Size to parameter, where m is modulo, f is frame size
Reply all
Reply to author
Forward
0 new messages