Thanks David:

I also do all the niceties you mention, except the width.  The reason I
don't mess with the width is a D3 feature that the U2 products don't have;
to wit, dynamic width dictionaries.  These are dictionaries defined as "20X"
where output will take 20 columns or the balance of the available screen
width, whichever is wider.

For instance, here's a D3 "A" dictionary:

    vendor_lfm
001 S
002 1
003 Vendor Name
004
005
006
007
008 CALL DTABP D.NAMELFM
009 TX
010 20

Here's what output looks like:

:term 40
:list apopen vendor_lfm sampling 5
Page   1     apop11:34:41 20 Jan 2006

apopen.... Vendor Name..................

830*33309  SAN DIEGO WTR & WASTEWTR UTIL
167*10517  CATHCART LTD.
.
.

:term 60
:list apopen vendor_lfm sampling 10
Page   1     apopen                  11:34:51 20 Jan 2006

apopen.... Vendor Name......................................

830*33309  SAN DIEGO WTR & WASTEWTR UTIL
167*10517  CATHCART LTD.
.
.

:term 100
:list apopen vendor_lfm sampling 10
Page   1     apopen
11:34:59 20 Jan 2006

apopen.... Vendor
Name........................................................................
......

830*33309  SAN DIEGO WTR & WASTEWTR UTIL
167*10517  CATHCART LTD.
.
.

a really cool feature!  When I futz with the width (which I shouldn't have
to anyway) I'll break the application on D3; as most output will print 255
columns wide, which is not what the user wants.  :-(

Bill Haskett
Advantos Systems, Inc.
www.advantos.net 
(760)944-5570 (CA)
(360)923-4838 (WA)
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> David A. Green
> Sent: Friday, January 20, 2006 7:03 AM
> To: [email protected]
> Subject: RE: [U2] [UD] list output when captured
> 
> Bill,
> 
> When I do these types of CAPTURING to gleam the output I also 
> set my TERM page width to 255,0 the 255 for the widest screen 
> size and 0 causes the pagination logic to be turned off.  Of 
> course I read the TERM settings before changing them so that 
> I can restore them before exiting.
> 
> Example:
> 
>   CMD = "LIST ..."
>   !
>   MAX.ROW = @CRTHIGH
>   MAX.COL = @CRTWIDE
>   !
>   PERFORM "TERM 255,0" CAPTURING BUFF  ;* Set term characteristics
>   PERFORM CMD CAPTURING BUFF           ;* Execute command and 
> capture output
>   !
>   PERFORM "TERM ":MAX.COL:",":MAX.ROW CAPTURING BUFF   ;* Reset term
> 
> Thanks,
> David A. Green
> DAG Consulting
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Bill Haskett
> Sent: Thursday, January 19, 2006 5:15 PM
> To: [email protected]
> Subject: RE: [U2] [UD] list output when captured
> 
> David:
> 
> Thanks...because I need the heading.  :-)
> 
> A SCROLL program takes the results of a query and simply 
> pages it so the user can move around the report (up, down, 
> all around, and search).  We need the heading passed into the 
> program (assuming one is).
> 
> Bill
>  
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of David A. 
> > Green
> > Sent: Thursday, January 19, 2006 6:01 AM
> > To: [email protected]
> > Subject: RE: [U2] [UD] list output when captured
> > 
> > Why not just suppress the heading? HDR.SUP
> > 
> > David A. Green
> > DAG Consulting
> > 
> > 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of 
> Bill Haskett
> > Sent: Wednesday, January 18, 2006 5:20 PM
> > To: [email protected]
> > Subject: [U2] [UD] list output when captured
> > 
> > I've got a simple scroll routine that parses the output 
> from a LIST or 
> > SORT command's "CAPTURING" variable of an EXECUTE statement.  The 
> > routine tests for the 2nd empty line to determine when the column 
> > heading ends and the data begins, as all output with a 
> heading puts a 
> > blank line between the column heading and the data.
> > 
> > So, typical captured output would look like:
> > 
> > SCRATCH(1)=Dictionary of File: PERIPHERALS                    
> >   16:05:08 Jan
> > 18
> > 2006^Dict Name...... Typ # Col-Heading.... Field-Def... 
> > Conversion.. Formt Assoc
> > ...^^@               Phr                   LPTRNO DEV_N^
> > .
> > .
> > 
> > The total width of the heading is 78 characters, while the 
> TERM width 
> > is 79.
> > If I were to change the TERM width to 78 then rerun the 
> above listing 
> > the extra line between the column heading and the 1st row of data 
> > disappears (the first of two attribute marks changes to a space).
> > 
> > SCRATCH(1)=Dictionary of File: PERIPHERALS                    
> >   16:05:08 Jan
> > 18
> > 2006^Dict Name...... Typ # Col-Heading.... Field-Def... 
> > Conversion.. Formt Assoc
> > ... ^@               Phr                   LPTRNO DEV_N^
> > .
> > .
> > 
> > Is there a reason why this occurs (I've not seen this 
> before) or will 
> > I just have to be careful in the future?
> > 
> > As always, thanks.
> > 
> > Bill Haskett
> -------
> 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/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to