I have created a temp table I want to load all the data of a temp table including field names in a text file using the temp table's handle what can I do?
Asked
Active
Viewed 179 times
-2
-
1Start by writing some code illustrating what you are trying to do, putting in pseudo code for what you do not know how to do. Provide some example data. From your current one liner question, I am still clueless as to if you are trying to import from a file or export to a file. – Stefan Drissen May 07 '20 at 12:16
1 Answers
0
Using the default buffer handle of the tamp table (hTable:DEFAULT-BUFFER-HANDLE), you can then loop through the fields of the table.
DO i = 1 TO hBufferHandle:NUM-FIELDS:
...
END
You would do that twice, once to output the field names as headers to your text file, and then once for each record of the temp table to export the values. You will have to handle things like extents. You will have to deal with data types, making decisions on what to do, depending on what you have in your table. In theory it's not very complex code, and you could write a simple reusable library to do the work. Use the documentation to find the full syntax.

jdpjamesp
- 762
- 7
- 19