` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Automating Stream() and Flush()
1998-08-21 -- Garry Anderson
 
If you want to add some template code to allow all files in your file schematic to be streamed when opened and flushed before closing, you could try something like this Make the following changes to the PROCESS.TPW Somewhere in the prompt section put a checkbox #PROMPT ('STREAM and FLUSH', CHECK), %EnableStreaming, DEFAULT(0) I put mine after the line #PROMPT ('Quick-Scan Records', CHECK), %EnableQuickScan, DEFAULT(1) The open files routine should look something like this OpenFiles ROUTINE #INSERT (%FileControlOpen) #IF (%EnableStreaming) ! STREAM Files #ENDIF #FOR (%ProcFilesUsed) #IF (%EnableStreaming) STREAM(%ProcFilesUsed) #ENDIF #ENDFOR In the ProcedureReturn ROUTINE put this at the end of the comment section #IF (%EnableStreaming) !| !| Before Closing we must FLUSH all Files that were STREAMed #ENDIF !| #FOR (%ProcFilesUsed) #IF (%EnableStreaming) FLUSH(%ProcFilesUsed) #ENDIF #ENDFOR I have only used this with TPS files TPS files supposedly flush automatically ~100 records but you still need to flush them before closing.


Today is December 3, 2024, 11:18 am
This article has been viewed 35193 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: