d_meca wrote: > > I am creating a procedure (within a service program) that accepts a data structure as a parameter. > > Since the procedure is generic it will receive different types of data structures. The length and type of the data structure being passed is unknown and will vary. > > Is there a way of finding the lengths/types/names of each field within the data structure being passed? > Can any of this be achieved using pointers? > If the data structure is externally-described from a file, you could also pass the file name to your procedure, and your procedure could use an API (QUSLFLD) to get the layout of the data structure (field names, lengths, types etc). Use google to search for this API - you should be able to find some RPG examples. If you add "extpgm" to your search, it will increase the likelihood of it being an RPG example. http://www.google.com/search?hl=en&q=quslfld+extpgm

Reply With Quote