Hi Please follow below procedure to calculate file modulo.

 MAGIC.NUMBER  = 3500

 EXECUTE "COUNT ":FILE.NAME CAPTURING OUT.PUT

 NO.OF.RECS = FIELD(OUT.PUT, ' ',2)


 EXECUTE "SELECT ":FILE.NAME:" SAMPLE 10" CAPTURING SAMPLE.OUT

 READLIST SAMPLESIDLIST ELSE SAMPLESIDLIST = ""

 NO.OF.IDS = DCOUNT(SAMPLESIDLIST,@FM)

 LOOP.CTR = 0
 LOOP
     SAMPLE.ID = SAMPLESIDLIST<LOOP.CTR>
 WHILE SAMPLE.ID

     READ R.REC FROM F.FILE.NAME,SAMPLE.ID ELSE R.REC = ""

     TOT.LEN += LEN(R.REC) + LEN(SAMPLE.ID)

     SAMPLE.ID.CTR += 1

 REPEAT

 IF SAMPLE.ID.CTR AND TOT.LEN THEN
     AVRAGE.SIZE = TOT.LEN / SAMPLE.ID.CTR
     TEMP.FILE.MODULO = NO.OF.IDS * AVERAGE.SIZE / MAGIC.NUMBER

     FILE.MODULO = FIELD(TEMP.FILE.MODULO,".",1)

     IF FILE.MODULO = 0 THEN
         FILE.MODULO = 1
     END
 END

regards,
Mohan

On Wed, Jul 21, 2010 at 11:20 AM, VK <[email protected]> wrote:

> Hi,
> it depends of file population. Create your file with default settings
> and then use jrf to resize it.
>
> VK
>
> On Jul 19, 12:29 pm, Vorleak <[email protected]> wrote:
> > Hi all,
> > When create a file, there are 2 variable : modulo, seperation, and
> > secondary buffer.
> > Can u help me to define these 3 terms ?
> > And can u explain me the process of this and how to calculate modulo
> > so that file will not be a bad size file ?
> >
> > Thanks in advance.
> >
> > jBase 5.0.23
> > t24 R8.005
> > AIX5.3
>
> --
> Please read the posting guidelines at:
> http://groups.google.com/group/jBASE/web/Posting%20Guidelines
>
> IMPORTANT: Type T24: at the start of the subject line for questions
> specific to Globus/T24
>
> To post, send email to [email protected]
> To unsubscribe, send email to [email protected]
> For more options, visit this group at
> http://groups.google.com/group/jBASE?hl=en
>

-- 
Please read the posting guidelines at: 
http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to 
Globus/T24

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

Reply via email to