I need to select the column names from a file I have on our AS400 from an ASP webpage using SQL select statement. By querying the column names I then hope to dynamically create a follow-up SQL select statement based off of the column names queried from the first select statement.

In other words, how do I get the column names from a file on our AS400 using SQL? I know how to do this from a Microsoft SQL Db, but I'm clueless about how to do this from a AS400 Db.