Find record using super descriptor

Good day,
I have a super defined as follows:
CON-TRANS-STATUS A 14 N S
-------- SOURCE FIELD(S) -------
CONTRACT-NO(1-8)
TRANS-CODE(9-13)
PROCESSING-STATUS(14-14)

I can read the file with the super descriptor but when I do a FIND or READ I do not find a record that does exist on the file.
Eg. If I try FIND a record with the CONTRACT-NO 22222222, TRANS-CODE N1111 and status 0 I find nothing but if I just read the super by CONTRACT-NO, I can see that very record.

Please help.

Your "super"definitions look strange to me ?!
If I look at an example def like below the numbers in parenthesis refers to th epositions in the sourcefields. Yours look like positions in the target-field (superdescriptor).
Finn

1 EF START-DATE-DESTINATION A 49 S

  •  -------- SOURCE FIELD(S) -------
    
  •  CRUISE-TYPE(1-1)
    
  •  START-HARBOR(1-20)
    
  •  START-DATE(1-8)
    
  •  DESTINATION-HARBOR(1-20)

Hi,

Numbers in parenthesis refer to source fields and not positions in the target field.
Source field definitions:
Field name Format Length Suppression


CONTRACT-NO P 15.0
LOG-TRANS-CODE A 5 N
PROCESSING-STATUS A 1 N

Regards

I’ll try to reformulate :wink:

I think your super definition should be

CON-TRANS-STATUS A 14 N S
-------- SOURCE FIELD(S) -------
CONTRACT-NO(1-8)
TRANS-CODE(1-5)
PROCESSING-STATUS(1-1)

The PROCESSING-STATUS field is null suppressed. You need to provide a non-zero value for this component of your superdescriptor.

For your READ or FIND by CONTRACT-NUMBER, display the PROCESSING-STATUS field. You’ll see the zero there.

Ralph: null suppression is not relevant here…

If the record can be read by super = CONTRACT-NO, then null suppression is not affecting the result. I think Finn is on the right track - the super is defined incorrectly and needs to be stated as Finn describes. Processing Status is A1, not N1, so “0” would be a non-null value.

Kugh - what Ralph is referring to are the null suppression rules. If a component of the super descriptor is drawn from a null suppressed field, then the super descriptor is suppressed. If PROCESSING-STATUS on a record contains a blank (that is, a null alpha value), then there will not be a super descriptor entry for that record, regardless of what the other source fields contain.

Doug Kelly wrote:

Kugh - what Ralph is referring to are the null suppression rules. If a component of the super descriptor is drawn from a null suppressed field, then the super descriptor is suppressed. If PROCESSING-STATUS on a record contains a blank (that is, a null alpha value), then there will not be a super descriptor entry for that record, regardless of what the other source fields contain.

While this is mostly correct, there is one part of it that is not well worded, and it is something that confuses many, many Natural programmers, hence the clarification below (the problem is that those of us who know this understood what you meant Doug, but those readers who do not know this, might well come away with a misconception).

Actually, there is no such thing as a null suppressed super descriptor.

When Adabas is “gathering” the pieces for a super descriptor, if one of the pieces has a null value, and if that piece comes from a field that is null suppressed, then, there is no entry for that record (as Doug said).

By way of contrast, suppose I have a super descriptor comprised of portions of three fields; f1 and f2 are null suppressed, f3 is not null suppressed. For a given record assume that there are non null values for f1 and f2 and a null value for n3. There will be a value for the record entered into the associator.

steve

Kugh wrote:

Eg. If I try FIND a record with the CONTRACT-NO 22222222, TRANS-CODE N1111 and status 0 I find nothing but if I just read the super by CONTRACT-NO, I can see that very record.

When you say “read the super by CONTRACT-NO”, do you mean

  1. READ the file by the descriptor CONTRACT-NO and “look” at the values for all three components of the super descriptor

  2. READ the file by the super descriptor with a starting value that has 22222222 for the first part of the super and nothing in the remainder of the starting value, and look at the values for all three components of the super

The term “read the super by CONTRACT-NO” will be confusing to many readers (myself included).

steve

I have redefined as suggested by Finn and it’s working.

Thanks all for your replies.

Regards