Re: Wierd one!
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Actually, it sounds more to me like overflowing a printer buffer, running out of memory or something of that nature. We used to have trouble like this all the time on some serial printers. I think the fact that deleting some of the print statements in the header gets more of the job printed is the clue. The problem is we sometimes think "what's wrong with this line of code?" or "what's in the header that allows me to print more once it's removed?" rather than seeing the obvious. To use a simple analogy, headers = apples, body of report = oranges - For every 20 oranges I pour into a barrel I add 5 apples. If I decide to cut the number of apples in the ratio, it should come as no surprise that I can get more oranges into my finite barrel. I'd expand my search for an explanation beyond the code itself. carlos Dennis Pimple wrote: > Another, maybe obvious, check; make sure you're calling FINISH REPORT. The > symptoms make it sound like maybe you're not (and if you're not, smack > yourself on the head twice). > > Hot Sticky Pudding wrote in message > <38479616.9332591@news.globalnet.co.uk>... > >Hi, > > > >Running Informix SE 5.10.UC7, 4GL RDS 4.20.UC4 on RS6000 AIX 4.2. > > > >This is quite difficult to explain but here goes. > > I have a program containing several functions that eventually > >set up a table of data ready for output. > > The final function collects the data and spews it out to a > >REPORT. Within the REPORT section there is an ON EVERY ROW that looks > >like this: > > > >ON EVERY ROW > > PRINT COLUMN 49, p_pntmp.tsize CLIPPED, > > COLUMN 64, p_pntmp.tcolour, > > COLUMN 75, p_pntmp.totalqty USING "#######&.&&", > > COLUMN 85, p_pntmp.totalqty USING "##########&.&&, " ", > > p_pntmp.suppdescr CLIPPED, > > COLUMN 108, p_pntmp.instock USING "######&.&&" > > LET p_totalcost = p_totalcost + p_pntmp.totalcost > > > >The program produces about 12 pages worth of guff but all of a sudden > >it will stop printing half way through the above PRINT stopping just > >after the p_pntmp.tcolour field!!! > > > >Now, just to make it interesting, I have a PAGE HEADER with some code > >like this: > > > >PRINT ASCII 27,"M"; > >PRINT COLUMN 91,"Rounded Invoice" > >PRINT COLUMN 75, "Requirement Order X Unit Stock > >Quantity Actual" > >PRINT COLUMN 1, "Ref Description > >Size"; > >PRINT COLUMN 64, "Colour + Wastage Quantity Description"; > >PRINT COLUMN 112, "Available To Pack Packed" > >PRINT "------------------------------------------------------------"; > >PRINT "-------------------------------------------------------------"; > >PRINT "---------------------" > > > >The ASCII 27,"M"; sets condensed print. > > If I comment out the remaining PRINT's I can get the program > >to produce more of the report but not to the end. It will just stop > >suddenly at a different point. > > > >This is a new program and not one that has worked before and is now > >suddenly not working. > > > >I hope you can understand what my problem is but can anyone offer any > >advice as to how I can get to the bottom of it? > > I can't for the life in me work out why it should stop in > >mid-print on a line so innocuous. > > > >Any help/advice would be very very welcome. > > > >Best regards, Sticky Pudding. > >-- > >What the large print giveth, the small print taketh away. -- Carlos Benjamin, Jr. x 2364 mailto:inf999@cap-az.com
Your analogy is accurate, but not having a "Finish Report" call would show the exact same symptoms. Printing is buffered, and is flushed only when full or when FINISH REPORT is called. A report that prints everything but the last part of itself indicates a partially-full buffer that was not flushed. Info Temp wrote in message <82lqu8$6ds$1@news.xmission.com>... > >Actually, it sounds more to me like overflowing a printer buffer, running out >of memory or something of that nature. We used to have trouble like this all >the time on some serial printers. I think the fact that deleting some of the >print statements in the header gets more of the job printed is the clue. The >problem is we sometimes think "what's wrong with this line of code?" or >"what's in the header that allows me to print more once it's removed?" rather >than seeing the obvious. To use a simple analogy, headers = apples, body of >report = oranges - For every 20 oranges I pour into a barrel I add 5 apples. >If I decide to cut the number of apples in the ratio, it should come as no >surprise that I can get more oranges into my finite barrel. > >I'd expand my search for an explanation beyond the code itself. > >carlos > >Dennis Pimple wrote: > >> Another, maybe obvious, check; make sure you're calling FINISH REPORT. The >> symptoms make it sound like maybe you're not (and if you're not, smack >> yourself on the head twice). >> >> Hot Sticky Pudding wrote in message >> <38479616.9332591@news.globalnet.co.uk>... >> >Hi, >> > >> >Running Informix SE 5.10.UC7, 4GL RDS 4.20.UC4 on RS6000 AIX 4.2. >> > >> >This is quite difficult to explain but here goes. >> > I have a program containing several functions that eventually >> >set up a table of data ready for output. >> > The final function collects the data and spews it out to a >> >REPORT. Within the REPORT section there is an ON EVERY ROW that looks >> >like this: >> > >> >ON EVERY ROW >> > PRINT COLUMN 49, p_pntmp.tsize CLIPPED, >> > COLUMN 64, p_pntmp.tcolour, >> > COLUMN 75, p_pntmp.totalqty USING "#######&.&&", >> > COLUMN 85, p_pntmp.totalqty USING "##########&.&&, " ", >> > p_pntmp.suppdescr CLIPPED, >> > COLUMN 108, p_pntmp.instock USING "######&.&&" >> > LET p_totalcost = p_totalcost + p_pntmp.totalcost >> > >> >The program produces about 12 pages worth of guff but all of a sudden >> >it will stop printing half way through the above PRINT stopping just >> >after the p_pntmp.tcolour field!!! >> > >> >Now, just to make it interesting, I have a PAGE HEADER with some code >> >like this: >> > >> >PRINT ASCII 27,"M"; >> >PRINT COLUMN 91,"Rounded Invoice" >> >PRINT COLUMN 75, "Requirement Order X Unit Stock >> >Quantity Actual" >> >PRINT COLUMN 1, "Ref Description >> >Size"; >> >PRINT COLUMN 64, "Colour + Wastage Quantity Description"; >> >PRINT COLUMN 112, "Available To Pack Packed" >> >PRINT "------------------------------------------------------------"; >> >PRINT "-------------------------------------------------------------"; >> >PRINT "---------------------" >> > >> >The ASCII 27,"M"; sets condensed print. >> > If I comment out the remaining PRINT's I can get the program >> >to produce more of the report but not to the end. It will just stop >> >suddenly at a different point. >> > >> >This is a new program and not one that has worked before and is now >> >suddenly not working. >> > >> >I hope you can understand what my problem is but can anyone offer any >> >advice as to how I can get to the bottom of it? >> > I can't for the life in me work out why it should stop in >> >mid-print on a line so innocuous. >> > >> >Any help/advice would be very very welcome. >> > >> >Best regards, Sticky Pudding. >> >-- >> >What the large print giveth, the small print taketh away. > > > >-- >Carlos Benjamin, Jr. >x 2364 >mailto:inf999@cap-az.com > > >
yes, yes......just for kicks, perhaps this aspect of the issue could be solved by printing to a file instead of a printer? -ch * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * The fastest and easiest way to search and participate in Usenet - Free!