[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: limits on multiple SETUP (BEGIN-SETUP) sections



Thanks, Arjan, for your help, but I seem to have found the rub (Ay!)

Apparently, SQR is not ignoring my setup sections, but the order in which I placed my #include files did make a difference for this reason  (and this is actually simplified from my real code which contains a whole mess of nested #includes which is why I had some difficulty making this discovery):

In one include file (call it 'markup') I have a SETUP section with this line:
ask markup_flag 'prompt'

 while in another file ('library'), I have this command:
#ifndef markup_flag
#define markup_flag yes
#endif


This is why I thought my SETUP section was being ignored when my main SQR did this (when I did this I did not get prompted for markup_flag):
#include 'library'
#include 'markup'

but not ignored when the main SQR did this (in this case I did get prompted for markup_flag):
#include 'markup'
#include 'library'


Apparently, if a substitution variable is already defined when an ASK statement for that variable is encountered, the ASK statement is ignored?  No compiler warnings or errors?  Is this intentional or is it a bug?

- Mark


                -----Original Message-----
                From:   Mark Risman
                Sent:   Thursday, December 16, 1999 2:21 PM
                To:     SQR User Group (E-mail)
                Subject:        limits on multiple SETUP (BEGIN-SETUP) sections

                Has anyone encountered problems when running an SQR with more than one SETUP section?  I normally do this when I have information in a SETUP section that is common to several reports, and I therefore separate the common information into another SETUP section in an #include file.  This generally seems to work, but I've noticed that after a certain point, the first few SETUP sections that are encountered will be executed, but all subsequent SETUP sections are ignored.  No error messages are generated, either.  Is there a limit to how many SETUP sections a program can have?

                We are using SQR V4.0.2, running on Solaris machines.

                Thanks,
                - Mark