I'm new to rpg. was 'dbu' querying objects inside a qtemp library, now I see new objects of type *usrspc, attribute dbu. Does dbu create usrspc objects? and should these be removed in my object lists?
-
dbu probably creates this objects to receive informations about objects using IBM APIs. Yes, you can ignore these objects – nfgl Nov 27 '20 at 11:18
-
I don't see why this was closed. It is about a programming tool (DBU), one of its side effects, and about an object type and library type that an RPG programmer should learn about. – Mike Dec 03 '20 at 02:30
1 Answers
Anything created in the QTEMP library (files, user spaces, program objects, etc) is by definition deleted when your job ends (when you log off). One QTEMP library is created for each interactive and batch job on the system. You can safely create things there yourself without having to worry about cleaning them up afterwards, and you also get the benefit of per-user isolation.
A user space object is like a chunk of memory that a program has allocated for whatever purpose it wants, but as a named object, it has persistence after the program ends. They are most commonly used as a place for API's like QUSRSPLA to write the results of their operation.
It is not surprising that DBU uses this technique, nor is it surprising that it puts it into the QTEMP library. You probably won't be able to do much useful with what is in this user space, anymore than you would get much interesting from browsing the temp files in Windows or Linux, but it does give you some ideas for techniques you might use in the future. If you ever need to see the contents of a user space, it can be viewed with the DSPF command using a path name like "/QSYS.lib/QTEMP.lib/MYSPACE.usrspc"

- 1,274
- 10
- 24