|
I am writing a set of modules to parse through several report text files, and extract usable information, for assimilation into our patient database. Basically, there are 11 report formats, with a distinct header at the beginning of each report, and the data can be parsed out from these, based on which format of report you are reading. So I had the idea to make one subprocedure for each report format, and then a main procedure that reads through the file, and based on what format the report line came from, hands it to the appropriate subprocedure. The next hurdle is the fact that, not every report contains the account number and the data in the same line. You might get the account number, then on the next line, the denial message. What I need to do is have some of the subprocedures 'remember' the previous account number they have read, in case the next one doesn't have one. As far as I know, each time a subprocedure is called, it's variables are all initialized, so this means that, for each subprocedure, I need a global set of variables in the main procedure that it can store stuff in. This just doesn't seem to go with what I believe subprocedures were designed for. If I want to use one of these subprocedure in another program, I have to duplicate the global variables from the main program. Is there a way to make some variables in a subprocedure persistent? -- "Enter any 11-digit prime number to continue..."
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.