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

Add exports file for XMLSTOREDP #27

Closed
2 tasks done
kadler opened this issue Jan 23, 2019 · 14 comments
Closed
2 tasks done

Add exports file for XMLSTOREDP #27

kadler opened this issue Jan 23, 2019 · 14 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@kadler
Copy link
Member

kadler commented Jan 23, 2019

XMLSTOREDP currently exports a ton of functions, most of which should be exported from the main XMLSERVICE service program (#26) instead. Basically just the iPlug* entries should be exported from XMLSTOREDP for use by the stored procedures (https://github.com/IBM/xmlservice/blob/master/src/xmlstoredp.sql.in).

  • Add exports file
  • Update Makefile.in to use it
@kadler kadler added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jan 23, 2019
@Justin-E-Taylor
Copy link
Contributor

Are the iPLUGR* exports the ones in question? Those functions don’t exist in XMLSERVICE, so do they need to be moved?

@kadler
Copy link
Member Author

kadler commented Feb 7, 2019

All the functions referenced by https://github.com/IBM/xmlservice/blob/master/src/xmlstoredp.sql.in need to be exported by XMLSTOREDP service program, but nothing else should be. Currently it just exports everything, which leaks a lot of internals.

@Justin-E-Taylor
Copy link
Contributor

OK, I see now. The unwanted exports are coming from the copybooks. So we need binding source to only export the needed functions. I don't see that the project currently has any binding source.

  1. I assume the file needs to go in the src directory?
  2. What's the standard for the binding source signature?
  3. I believe the CRTSRVPGM in Makefile.in would need to be changed. I'm a little fuzzy on what the SRCSTMF value needs to be.

@kadler
Copy link
Member Author

kadler commented Feb 8, 2019

yeah, should go on src. As far as the signature goes, I'm up for suggestions. CRTSRVPGM doesn't allow export source from an IFS file, so the Makefile will need changes to create a source physical file and copy it in to it.

@Justin-E-Taylor
Copy link
Contributor

For signatures, here we just use the *SRVPGM name and a date or version number. We don't distribute software, so we've never really put a lot of thought in to it.

I've committed the binding source (https://github.com/Justin-E-Taylor/xmlservice/blob/master/src/xmlstoredp.bnd) but haven't submitted a PR yet. I haven't got the local build working yet, and I want to do that first.

As an aside, what's with the .rpglesql extensions, shouldn't they be .sqlrpgle? RDi recognizes .sqlrpgle but not .rpglesql.

@kadler
Copy link
Member Author

kadler commented Feb 8, 2019

what's with the .rpglesql extensions, shouldn't they be .sqlrpgle?

You'd need to ask @rangercairns on that. 🤷‍♂️

That's bugged me too. Feel free to change it (make sure to updated Makefile.in rules).

@Justin-E-Taylor
Copy link
Contributor

I'm probably too much of a newb to rocking the boat too much regarding file extensions.

I compiled the *SRVPGM locally and submitted the PR. The PR shows action required, but that will have to wait until next week.

@Justin-E-Taylor
Copy link
Contributor

The "action required" is resolved. I haven't looked at the makefile yet. I wanted to get the binding source up ASAP for feedback on the signature.

@kadler
Copy link
Member Author

kadler commented Feb 11, 2019

After thinking about it afterwards, we should just use *GEN for the signature, since nobody should be actually linking to this service program. (Db2 doesn't care about signatures as it loads everything dynamically at runtime).

@Justin-E-Taylor
Copy link
Contributor

I had just a few minutes last week and I tried to run the makefile as-is. It failed but I didn't have time to dig into it. I got back to it today, looked more closely but still can't determine the problem.

Here's what I get:

-bash-4.3$ ./configure --lib JUSTIN
-bash-4.3$ make
make: Cannot find a rule to create target JUSTIN.lib from dependencies.
Stop.
-bash-4.3$

I have only the most basic familiarity with Makefiles, but it looks it looks like it should create the library. It does not.

Any suggestions?

@kadler
Copy link
Member Author

kadler commented Feb 28, 2019

I think you need to install GNU make: yum install make-gnu (make sure to run hash -r afterwards if you've already run make in that session).

@Justin-E-Taylor
Copy link
Contributor

Bingo! I keep forgetting IBMi is "batteries not included". Thanks

@jimoibm
Copy link
Contributor

jimoibm commented Apr 25, 2019

@Justin-E-Taylor I just found 'RUNASCII' was missing from the exportsrc. Looks like some procedures are supposed to be called outside xmlservice in plugrun.xml.

@kadler
Copy link
Member Author

kadler commented Apr 25, 2019

@jimoibm I opened #37 for that problem.

@kadler kadler closed this as completed Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants