Skip to content

Generate RPG data structure from result metadata #368

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

janfh
Copy link
Contributor

@janfh janfh commented Apr 11, 2025

Feature to generate RPG data structure from column metadata.

Added statement qualifier "rpg". E.g:

rpg: select cast('' as varchar(100)) as my_text, current_timestamp as my_timestamp, cast(1.0 as numeric(13, 2)) as my_val from sysibm.sysdummy1;

generates:

**free

// statement: select cast('' as varchar(100)) as my_text, current_timestamp as my_timestamp, cast(1.0 as numeric(13, 2)) as my_val from sysibm.sysdummy1

// Row data structure
dcl-ds row_t qualified template;
  my_text varchar(100);
  my_timestamp timestamp;
  my_val zoned(13 : 2);
end-ds;

@worksofliam worksofliam added this to the Fix day milestone Apr 11, 2025
Copy link
Contributor

@worksofliam worksofliam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a comment about moving logic to another function.

I don't want the logic to generate the content in this function really. We should move it elsewhere so we can write test cases for it.

Please make this change and then lmk when to look again.

Copy link
Contributor

@worksofliam worksofliam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left another review.

@janfh
Copy link
Contributor Author

janfh commented Apr 16, 2025

@worksofliam : Where do you want the tests? A new testsuite? Please continue to comment if you want me to change something else :) I will continue working on this tomorrow

@janfh janfh requested a review from worksofliam April 17, 2025 11:09
@worksofliam worksofliam modified the milestones: Fix day 1, Fix day 2 Apr 17, 2025
@worksofliam
Copy link
Contributor

@janfh For my own sake of mind, I have had to move this to fix day 2 (Wednesday 23rd) and this will be the first PR I look at then. I may get to it over the weekend if I find a moment. Thanks for your work here!

Also, let's chat on chat.ibmioss.org sometime.

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 this pull request may close these issues.

2 participants