Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
I'm trying to setup users in EIM using the API's in RPG. The examples I have found are in C refernce variables like EIM_SOURCE and EIM_TARGET and I can't figure out where they get a value. Anyone have any EIM examples in RPG?
Hi Dave,
Most of the APIs are delivered as C prototypes and #defines.
They can be located in the H file in library QSYSINC.
The prototypes and defines you are looking for are in source member QSYSINC/H(EIM)
The EIM_SOURCE and EIM_TARGET defines are actually "enumerated" values. From the include member, I see that they probably equate to the following:
EIM_SOURCE = 2
EIM_TARGET = 1
EIM_SOURCE_AND_TARGET = 3
EIM_ALL_ASSOC = 0
Usually those things start at 0 and go up 1 for each enum entry. So this is my best guess.
Normally I would be the one to prototype the APIs in RPG-syntax, because IBM never does. However I've never needed the EIM APIs so I haven't done that. But I'm sure you can probably do that yourself.