Conversely, in your existing SUBR you could insert code to enable pagination. You would add 'ASSIGN 1 TO SYSTEM(1005)' and see if that starts pagination as you would expect.
Hope this helps and Good luck!
At 01:20 AM 9/14/2004, you wrote:
Goo'day, all
UV 9.6.1 on NT
We have a client for whom we have an existing subroutine (in the case below, known as "FIRST.SUB") that calculates Minimum and Maximum product stock holdings, depending on the season - Winter and Summer. It's a long and involuted/convoluted program that analyses a product's sales for each month for the past 3 or 4 years and finally arrives at the 4 required figures for recommended stock holding and has been used successfully within other programs for years......Admittedly, the calling programs only look at one product at a time...
Being clever, we recently "wrapped" this subroutine in another subroutine that is called from each of four new I-Type definitions, eg
0002 SUBR("SECOND.SUB",@ID,x)
where x = 1 to 4 depending on which min/max for which season is required (for Def'n WIN.MIN, x = 1, WIN.MAX, x = 2, SUMM.MIN, x =3, SUMM.MAX, x = 4).
SECOND.SUB looks something like:
SUBROUTINE second.sub(RESULT,ID,TYPE) RESULT = '' OPEN fname TO FNAME ....... ................................................. ('cos all the other progs pass the file name to the subroutine, and NO, it's not COMMONed in any way...................yet) CALL FIRST.SUB(ID,FNAME,W.MIN,W.MAX,S.MIN,S.MAX) BEGIN CASE CASE TYPE = 1; RESULT = W.MIN CASE TYPE = 2; RESULT = W.MAX CASE TYPE = 3; RESULT = S.MIN CASE TYPE = 4; RESULT = S.MAX END CASE RETURN
All four I-Types compiled
Our problem is that although these 4 DICT items work a treat..... if we, for example,
LIST fname SUMM.MIN SUMM.MAX
the result, by product, is correct, but the listing does not "page" as it normally would/should. It acts as if a NOPAGE was part of the sentence - ZOOM! First screen "page" to last "page"...
The same thing happens if we only use one DICT item in the sentence, or any/some/all of them in whatever sequence
If we pre-SELECT only a few products, ie, less than a pageful, or only one product, there is only one "page" of report. Adding a LPTR to the sentence works correctly.
Are we expecting too much of an I-Type or is there another problem?? Is there a possibility we're doing something naughty in FIRST.SUB? There're no PRINTER, PRINT or similar statements. There's no other subroutine called from within .... Actually, nothing we can see that's cause this problem....
Regards,
Bruce Nichol Talon Computer Services ALBURY NSW 2640 Australia
Tel: +61 (0)411149636 Fax: +61 (0)260232119
If it ain't broke, fix it till it is!
-- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.262 / Virus Database: 264.9.0 - Release Date: 13/09/04 ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
