Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDM : subdescriptor #506

Closed
awilkins opened this issue Aug 23, 2024 · 4 comments · Fixed by #508
Closed

DDM : subdescriptor #506

awilkins opened this issue Aug 23, 2024 · 4 comments · Fixed by #508

Comments

@awilkins
Copy link
Contributor

awilkins commented Aug 23, 2024

DDMs identify both superdescriptor and subdescriptor with S and the "SOURCE FIELDS" comment block

  • Fields that are named elsewhere in the DDM make it a superdescriptor
  • Fields that are NOT named elsewhere in the DDM make it a subdescriptor

e.g. when you suffix your box IDs with a letter indicating their size so you can query just for large boxes

  1 AE BOX-ID-SIZE                A    6  N S
*      -------- SOURCE FIELD(S) -------
*      BOX-ID(1-5)
*      BOX-SIZE(1-1)

Currently naming fields that do not exist elsewhere in the same DDM means the DDM doesn't parse.

(I think? All I see are

"Could not resolve <that DDM>" in natlint or

"Trailing token <IDENTIFIER> not allowed here" in vscode

where it is referenced in views, but no error reports in the actual DDM in vscode / natlint).

@MarkusAmshove
Copy link
Owner

I did not know subdescriptors exist and can't really find documentation about them.

The diagnostic messages are weird because:

  • Superdescriptors get parsed here where the source fields comment is mandatory

The DDM parser is a port from a previous project which was all about code generation, meaning the exceptions don't get converted into nice diagnostics at the moment :-)

Is the type of subdescriptor fields derived from the descriptor itself?
Will BOX-ID be A5 and BOX-SIZE A1 ?

@MarkusAmshove
Copy link
Owner

How are the sub fields defined in VIEWs?
These look like redefinitions on Adabas side, whereas we add REDEFINEs in our VIEWs

The generated "source fields" naming from predict also is confusing, as they are actually "target" fields in this case

@MarkusAmshove
Copy link
Owner

Did find the documentation: https://documentation.softwareag.com/adabas/ada701luw/basics/fdtrec.htm#fdtrecsub
Sorry for the spam :-)

@Claes65
Copy link
Contributor

Claes65 commented Aug 28, 2024

So I guess the only thing you can distinguish them from superdescriptors is that the have no child fields? But is there any point in distinguishing them?

@MarkusAmshove MarkusAmshove linked a pull request Sep 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants