|  |     Hi Joel,
    
    No doubt you've solved the problem. The Focus User Manuals arn't very
    helpful are they. Anyway I had a number of problems converting a 
    RMS indexed variable record file. But I think I've succeeded(??)
    The file I converted is Indexed Sequential Hence the need for the ISAM
    suffix and the SEGMENT=ROOT.
    The GROUP clause designates the Primary key as DATE_REC, I think you
    can use the GROUP clause even if the primary key is not in sequence
    (i.e the primary key comes after some other fields)as long as the
    field sequence mirrors that of the RMS file. The size of the GROUP
    field matches that of the field/s to be used as a key, hence if your
    key is made up of other fields then ACTUAL = sizes of other fields
    added up. 
    
    The MAPFIELD clause designates that the EVENT field be used to select
    the various remaing segments to make up the whole record, in this case
    the actual is I1 which can be 0,3,5 etc But I think alphabetics can be
    used.   
    
    It's necessary to use SEGMENT=ROOT in the header segment and it's also
    neccessary to use OCCURS=1 in the Various segments, I don't know why
    but only that it works :-)
    
    Anyway I hope this helps:
    
FILE=AUDIT, SUFFIX=ISAM,$
SEGMENT=ROOT ,SEGTYPE=S0 ,$
GROUP=PRIM_KEY ,ALIAS=KEY ,USAGE=A8 ,A8 ,$
   FIELD=DATE_REC ,ALIAS= ,USAGE=A8 ,A8 ,FIELDTYPE=I ,$
  FIELD=PART     ,ALIAS=KEY1     ,USAGE=A9  ,A9  ,FIELDTYPE=I ,$
  FIELD=USERNAME ,ALIAS=         ,USAGE=A12 ,A12 ,$
  FIELD=EVENT    ,ALIAS=MAPFIELD ,USAGE=I1  ,I1  ,$
  DEFINE PRNT_DT_REC/A20=CVTSTIME(20,DATE_REC,PRNT_DT_REC);$
SEGMENT=PART_CRT ,PARENT=ROOT ,OCCURS=1 ,$
  FIELD=CREATE_PRICE ,ALIAS=  ,USAGE=D8.2,D8,$
  FIELD=MAPVALUE     ,ALIAS=0 ,USAGE=I1   ,I1 ,$
  
SEGMENT=BOM_CRT ,PARENT=ROOT ,OCCURS=1 ,$
  FIELD=BCR_CHILD    ,ALIAS=  ,USAGE=A9 ,A9 ,$
  FIELD=BCR_QUANTITY ,ALIAS=  ,USAG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