Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
Anyone know how to list OBJTYPES?
has no ratings.
Published: 19 Feb 2013
Revised: 20 Feb 2013 - 1585 days ago
Last viewed on: 23 Jun 2017 (2837 views) 

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.

Anyone know how to list OBJTYPES? Published by: Bob Cozzi on 19 Feb 2013 view comments(2)

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?

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: Ringer
Premium member *
Comment on: Anyone know how to list OBJTYPES?
Posted: 4 years 4 months 4 days 9 hours 14 minutes ago
Edited: Tue, 19 Feb, 2013 at 16:49:59 (1586 days ago)

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

Posted by: DaleB
Premium member *
Reading, PA
Comment on: Anyone know how to list OBJTYPES?
Posted: 4 years 4 months 3 days 17 hours 18 minutes ago

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.