[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ilbbak::ibi_focus

Title:FOCUS, from INFORMATION BUILDERS
Moderator:ZAYIUS::BROUILLETTE
Created:Thu Feb 19 1987
Last Modified:Mon May 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:615
Total number of notes:1779

208.0. "OCCURS field sizes" by FIELD::HILL () Wed May 03 1989 08:13

        Hi,

        Can anyone help me?  I'm a novice FOCUS user so I may be
        doing something very stupid.

        I am trying to define a simple name and address master file
        for an external data file.  My definition is :-


        ---------------------------------------------------------------

        FILENAME = NAMES, SUFFIX = FIX, $

        SEGNAME = ROOT, $

        FIELDNAME = NAME, ALIAS=, USAGE = A40, ACTUAL = A40, $
        FIELDNAME = AGE,  ALIAS=, USAGE = I2,  ACTUAL = I4,  $
    
        SEGNAME = ADDRESS, PARENT = ROOT, OCCURS = 4, $
        FIELDNAME = ADDRESS_LINE, ALIAS=, USAGE = A40, ACTUAL = A40, $

        ---------------------------------------------------------------


        The problem occurs when I use the CHECK FILE NAMES command.
        I am told that, for 3 fields, the total field length is 84.

        I don't understand this.


        Thanks in advance, Kim Hill


        P.S.  Just a quick gripe.  Why is FOCUS, a 4GL system,
        constrained to upper case only ?  This seems very primitive.
    
T.RTitleUserPersonal
Name
DateLines
208.1Count of Field Length, Not OccurrencesNRPUR::CUSACKWed May 03 1989 12:363
    Focus is counting just the field length, not the occurrences of
    the address_line field, hence you get the total of 84.  This shouldn't
    be a problem, unless I'm missing something.
208.2OK Problem SolvedFIELD::HILLThu May 04 1989 05:2012
    
    OK.  Further experimentation, with some actual data, has revealed that
    FOCUS successfully reads the external file for the example in .0

    I guess my only problem then is that the manual states quite
    categorically, in more than one place, that if the total size shown
    by the CHECK FILE command does not match the physical record size of
    the external file then there is an error.  This is not actually the
    case.  Oh well never mind...
    
    Regards, Kim Hill
    
208.3Documentation Not the GreatestNRPUR::CUSACKThu May 04 1989 15:3310
    Don't always trust the FOCUS documentation.  Lots of times you have
    to read between the lines.  Anyways, I'll agree the documentation
    is somewhat misleading here, but if you think about it, there is
    no way that the CHECK command could include the number of occurrences
    when counting field length because what would it do when you specify
    OCCURS=VARIABLE.  
    
    Focus has its problems, but for the most part it works o.k.
    
    Mike