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 thought there was an API that would generate a list of the IBM i object types, *PGM, *CMD, *FILE, etc. I know there is an API to convert from the *PGM to the hex notation for the object type, but I can't find one that actually lists the available object types.
What I want to do is create a CMD that, when prompted lists the available object types instead of having to hard code them into the command. I thought they gave use this like 20 years ago. Maybe it was an old MI routine? Anyone know/remember?
You could iterate through 256 hex combinations and use the ones where an error code is not generated. Probably not what you are looking for.
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=%2Fapis%2Fqlicvttp.htm
D* Get object type's OS/400 Hex Value
D QLICVTTP Pr ExtPgm('QLICVTTP')
D CvtType 10a Const
D ObjType 10a Const
D HexType 2a Const
D ErrorCode LikeDS(@ErrData)
D Options(*Omit)
Chris Ringer
Article from MC Press: http://www.mcpressonline.com/rpg/want-to-know-all-the-mi-object-types-supported-by-your-ibm-i.html. He uses headers (/COPY's) from his i5 Tooklit, which is open source (there's a link). Even if you don't use his code, there's a lot of good info there; might be worth a look.