|
Method is simple enough. 1. Create a template file on your library list for the job. 2. Use template file to compile program. 3. Have a CL Driver do a Delete file to destroy it if it already there. 4. Do a CRTDUPOBJ to QTEMP. 5. Issue override to copy in QTEMP. 6. Call program. 7. Delete override. 8. Delete workfile in QTEMP. Someone, also, suggested user indexes. Only disadvantage is additional complexity. Have to write to the API's. Also, User Spaces work very well depending on how you are going to use the data. In other words, does it need to be sorted or just stored. If just stored and retrieved, User Space are extremely fast and simple to use. Just get a pointer into a user space and map it to a multiple occurrence data structure. The user space and the data structure are now the same. When you occur, you walk through the user space. You have, in effect, up to 16MB of virtual storage that is automatically managed for you. You can, also, sort the user space or do lookups using QSORT or BSEARCH. I have user space API's I could send you if you are interested. Code is, also, available through this forum but I hate to include functions that should be in a service program in a program. Writing the same code, again and again just drives me crazy. On my soap box again. -----Original Message----- From: Douglas W. Palme [mailto:dpalme@xxxxxxxxxxx] Sent: Tuesday, May 17, 2005 8:42 AM To: RPG Group Subject: work files in qtemp I have been working on a program that will reuqire me to use some sort of temporary hold file, a friend suggested that I use a work file in qtemp for the processing of the data...however, I have never used work files before, let alone in qtemp. Should I just create the file in my library and then copy it to the qtemp directory and then process the data deleting the file once I am done? Any other suggestions would be appreciated. Douglas
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.