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.
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
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.
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.
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
READ the file by the descriptor CONTRACT-NO and “look” at the values for all three components of the super descriptor
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).