× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I knew there was a way to do it!  

I just looked up the keyword 'STATIC', and that seems to be the
answer.  Wow -- this really opens up alot now.  Thanks Rick!


On Fri, 7 Jan 2005 09:40:13 -0600, Rick.Chevalier@xxxxxxxxxxxxxxx
<Rick.Chevalier@xxxxxxxxxxxxxxx> wrote:
> 
> What about using static variables in the sub procedures to hold the account 
> number?  Maybe compare to what it finds on the report and update the variable 
> as necessary with new information.
> 
> Rick
> 
> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Tony Carolla
> Sent: Friday, January 07, 2005 9:10 AM
> To: RPG programming on the AS400 / iSeries
> Subject: Persistence
> 
> 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..."
> --
> 
> Privileged and Confidential.  This e-mail, and any attachments there to, is 
> intended only for use by the addressee(s) named herein and may contain 
> legally privileged or confidential information.  If you have received this 
> e-mail in error, please notify me immediately by a return e-mail and delete 
> this e-mail.  You are hereby notified that any dissemination, distribution or 
> copying of this e-mail and/or any attachments thereto, is strictly prohibited.
> 
> --
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
> 
> 


-- 
"Enter any 11-digit prime number to continue..."

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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 copyright@midrange.com.

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.