[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
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 |
451.0. "(FOC1141) with Focus 6.1" by RUTILE::METRAL () Fri Aug 30 1991 08:36
Hello,
After the migration from Focus 5.% to 6.% a problem appears:
I get an error message of: (FOC1141) KEY DESCRIBED MORE THAN ONCE:
PART_ID
The problem seems be in PRICE.MAS
Here the file PRICE.MAS
FILENAME=PRICE,SUFFIX=ISAM,$
SEGNAME=RECPRICE,$
GROUP=KEY_PRICE,ALIAS=KEY,USAGE=A18,ACTUAL=A18,$
FIELDNAME=PART_ID ,USAGE=A16 ,ACTUAL=A16,$
FIELDNAME=PRICE_SUBCOD ,USAGE=A2 ,ACTUAL=A2,$
FIELDNAME=REF_CONV_FAC ,USAGE=D8.4C ,ACTUAL=A8,$
FIELDNAME=SUB_CONV_FAC ,USAGE=D8.4C ,ACTUAL=A8,$
FIELDNAME=COR_EFF_DATE ,USAGE=A9 ,ACTUAL=A9,$
FIELDNAME=COR_AMOUNT ,USAGE=D12.2C ,ACTUAL=A12,$
FIELDNAME=COR_BK_COMM ,USAGE=A2 ,ACTUAL=A2,$
FIELDNAME=COR_BK_PREF ,USAGE=A1 ,ACTUAL=A1,$
FIELDNAME=ARE_EFF_DATE ,USAGE=A9 ,ACTUAL=A9,$
FIELDNAME=ARE_AMOUNT ,USAGE=D12.2C ,ACTUAL=A12,$
FIELDNAME=ARE_BK_COMM ,USAGE=A2 ,ACTUAL=A2,$
FIELDNAME=ARE_BK_PREF ,USAGE=A1 ,ACTUAL=A1,$
FIELDNAME=SBR_EFF_DATE ,USAGE=A9 ,ACTUAL=A9,$
FIELDNAME=SBR_AMOUNT ,USAGE=D12.2C ,ACTUAL=A12,$
FIELDNAME=SBR_BK_COMM ,USAGE=A2 ,ACTUAL=A2,$
FIELDNAME=SBR_BK_PREF ,USAGE=A1 ,ACTUAL=A1,$
FIELDNAME=SBL_EFF_DATE ,USAGE=A9 ,ACTUAL=A9,$
FIELDNAME=SBL_AMOUNT ,USAGE=D12.2C ,ACTUAL=A12,$
FIELDNAME=SBL_BK_COMM ,USAGE=A2 ,ACTUAL=A2,$
FIELDNAME=SBL_BK_PREF ,USAGE=A1 ,ACTUAL=A1,$
I've update the line with ALLIAS=PID
FIELDNAME=PART_ID, ALLIAS=PID ,USAGE=A16 ,ACTUAL=A16,$
Somebody can explain what happen and/or the reasons ?
Thanks a lot, Ludo.
T.R | Title | User | Personal Name | Date | Lines |
---|
451.1 | ISAM : Key described more than once | EVTDD1::CARRIERE | Jean-Claude Carriere | Fri Oct 11 1991 11:21 | 29 |
| Hello Ludo,
I don't know if you already got the explanation from someone else
but here it is :
In the Master file description when an attribute is not explicitly
specify it gets carried over from the previous record. In your case
ALIAS=KEY gets carried over to all the subsequent fields since those
do not specify any alias.
Up to 6.0 FOCUS use to take the first KEY description it encountered
in the file. With 6.1 (and because of discontiguous segmented key
support) FOCUS checks that each KEY<n> is only describe once.
You can detect attributes that have been carried over by doing
a CHECK FILE filename HOLD and looking at the HOLD file that has
been generated.
As a good coding practice for Master file description, I would
recommend :
GROUP=KEY_PRICE ,ALIAS=KEY ,USAGE=A18 ,ACTUAL=A18,$
FIELDNAME=PART_ID ,ALIAS= ,USAGE=A16 ,ACTUAL=A16,$
is to either always specify all the attributes, or when you specify
one make sure that the next record (here field desc) resets the
value.
Jean-Claude
|