Hello!
Can anyone please help me?
I didn't work with api's, and try to get information about bounded modules in ILE C programs. And I try to use QBNLPGMI api. Does anyone have some examples of using this api in C or CL programs?
Thanks in advance.
Dalibor

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your response...

Discuss This Question: 3 &nbspReplies

There was an error processing your information. Please try again later.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Allready do that (before I ask question here).
90% of scores are links to IBM description of that API and the rest is in RPG. It's not usefully for me. I need axamples in C (or ILE C)how to get list ILE programs in spool file with modules bonded to that programs.

Ok, i'm RPG man. Can read C, not write (I've no C compiler installed).
I have not checked (I'm not in front of my 400) if the DSPPGM command can extract the requested information to spool.
If yes, you just have to copy the spool to a file (CPYFRMSPLF command) then work it "simply" (ie after removing heading & spacing)
If no, the API is using an user space. If you find sample in C how to uses user space, you've win : you only need the api parameters from the RPG sample.
for example, I've read recently that QSORT can sort a user space. I don't know how it is possible to retrieve a pointer to a user space (if you know, send me the information). But a user space is only a structure exported to disk. And with the unique-space-address principle of the 400, it's also a memory address.
If necessary, I have sample of using user space in CLP programs.

You call it in C pretty much the same way you call it in ILE RPG. Use the includes in the H source file in library QSYSINC as a start for the prototypes and structs. Related source members are QBNLMODI, QBNLPGMI, QBNLSPGM, QBNPREPR, QBNRMODI and QBNRSPGM.
But it's not an API to start with because it requires using other APIs before it will work. In particular, it requires the Create User Space (QUSCRTUS) and either the Retrieve User Space (QUSRTVUS) or Retrieve Pointer to User Space (QUSPTRUS) APIs.
Until you understand user spaces and the ways that "list" APIs interact with user spaces, specific list APIs such as QBNLPGMI won't do you any good.
How about trying some user space manipulation and asking a question about them?
Tom

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your reply...

Ask a Question

Free Guide: Managing storage for virtual environments

Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!

Share this item with your network:

To follow this tag...

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy