declare question

Richard Kreiss rkreiss at verizon.net
Mon May 30 08:04:52 PDT 2011



> -----Original Message-----
> From: Kenneth Brody [mailto:kenbrody at spamcop.net]
> Sent: Sunday, May 29, 2011 11:44 PM
> To: Richard Kreiss
> Cc: filepro-list at lists.celestial.com
> Subject: Re: declare question
> 
> On 5/27/2011 5:18 PM, Richard Kreiss wrote:
> > I have a report which while being run call a second processing table
> > to output a csv file.
> >
> > I declared global in the report processing table 3 fields which I
> > wanted to use to pass values to the make_csv processing table where
> > the fields were declare extern.
> >
> > Declare global sub(1,.0)
> >
> > Declare extern sub
> >
> > When I checked the first value, sub, which is set in the report's
> > processing,  it was blank in the called process make_csv.
> >
> > I have not yet tried declaring these values in auto process and then
> > declare them as extern in report and make_csv processing tables.
> >
> > What am I doing wrong?
> 
> There is no need to use automatic processing to share DECLARE GLOBAL
> variables, as there was with dummy fields.  The fact that you use DECLARE
> GLOBAL (as opposed to DECLARE LOCAL, or just plain DECLARE) tells filePro
> that you are making the variable global in scope.
> 
> Based on your very brief description, I don't see anything wrong.
> 
> Put a DEBUG ON just before the CALL.  In the debugger, check the value of
> "sub" before executing the CALL.  Then, single-step into the CALLed
process,
> and immediately check the value of "sub" again.  Given the above DECLAREs,
> the value should not have changed.  (And, if it didn't change at that
point, but
> it's blank later on, then something in the processing blanked it out.)
> 
> --
> Kenneth Brody

Ken,

I had used the debugger ot check on the value of sub.  In the main
processing table, at each break level reached from 1 to 5, sub would be set.
In the make_csv processing table, the program should branch to the proper
subroutine based on the value of sub.    Is it possible that setting this
value at a break point in an output and then transferring processing to a
called table is causing the value to clear?

As I indicated, I declared global in the main program, then tried to
make_csv and then finally in the auto processing table as a last resort.
That is where when the value of sub held between processing tables.

Richard




More information about the Filepro-list mailing list