dbTalk Databases Forums  

Universe I-Descriptor using the @NB variable

comp.databases.pick comp.databases.pick


Discuss Universe I-Descriptor using the @NB variable in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dan
 
Posts: n/a

Default Universe I-Descriptor using the @NB variable - 11-17-2010 , 04:54 PM






Hello All,

Does anyone have an example of an I-Descriptor using the @NB variable
in UniVerse?

Everything I try returns a 0 at the break level.

TIA,
Dan

Reply With Quote
  #2  
Old   
mvdbman
 
Posts: n/a

Default Re: Universe I-Descriptor using the @NB variable - 11-18-2010 , 05:32 PM






How are you using this? If you are sorting on multiple attributes,
breaking on several, and totaling at each break (generating sub-
totals), the @NB variable should contain the break level with 255
being displayed at the grand total line.

-Bruce

On Nov 17, 4:54*pm, Dan <dkai... (AT) gmail (DOT) com> wrote:
Quote:
Hello All,

Does anyone have an example of an I-Descriptor using the @NB variable
in UniVerse?

Everything I try returns a 0 at the break level.

TIA,
Dan

Reply With Quote
  #3  
Old   
Dan
 
Posts: n/a

Default Re: Universe I-Descriptor using the @NB variable - 11-19-2010 , 08:26 AM



On Nov 18, 6:32*pm, mvdbman <mvdb... (AT) gmail (DOT) com> wrote:
Quote:
How are you using this? If you are sorting on multiple attributes,
breaking on several, *and totaling at each break (generating sub-
totals), the @NB variable should contain the break level with 255
being displayed at the grand total line.

-Bruce

On Nov 17, 4:54*pm, Dan <dkai... (AT) gmail (DOT) com> wrote:

Hello All,

Does anyone have an example of an I-Descriptor using the @NB variable
in UniVerse?

Everything I try returns a 0 at the break level.

TIA,
Dan
Hi Bruce,
Thanks for the reply.
Below is the I-Descriptor NBCT:
File name = DICT FA
Record name = NBCT
This is a Type "I" Descriptor last compiled on 11/19/10 at 08:42.
20 lines long.

----: P11
0001: I
0002: @NB
0003: MD0
0004: NBCT
0005: 8R
0006: S

Below is the LIST statement with a small sample to show the results:
LIST FA SAMPLE 3 BY LOC BREAK-ON LOC WITH RETAIL.AMT GT 0 TOTAL
RETAIL.AMT CALC
NBCT 09:01:30am 19 Nov 2010 PAGE 1
RETAIL.$..
FUEL.AUDIT.................... Loc. INC.TAX... NBCT....

001!0041!15653!!S 0041 10,945 0
** ----------
--------
0041 10,945
0

001!0050!15617!!S 0050 16,576 0
** ----------
--------
0050 16,576
0

001!0051!15613!!S 0051 18,178 0
** ----------
--------
0051 18,178
0

========== ====

45,699 0


Sample of 3 records listed.

There is no difference in the output if I change CALC to TOTAL or
remove the SAMPLE.
Does account flavor matter? I have tried it in both PICK and
Information accounts.

Thanks,
Dan

Reply With Quote
  #4  
Old   
mvdbman
 
Posts: n/a

Default Re: Universe I-Descriptor using the @NB variable - 11-23-2010 , 12:06 PM



From the "UniVerse System Description" manual:

"@NB has the value 0 on detail lines, the value 1 on the lowest level
break lines, etc. It has the value 127 on the grand total line."

Your statement is breaking only at one level, the detail level and
you're getting zero, just like the manual says you will. Try breaking
on multiple attributes that will create sub-totals within sub-totals
within totals and see what you get.

-Bruce H


On Nov 19, 8:26*am, Dan <dkai... (AT) gmail (DOT) com> wrote:
Quote:
On Nov 18, 6:32*pm, mvdbman <mvdb... (AT) gmail (DOT) com> wrote:



How are you using this? If you are sorting on multiple attributes,
breaking on several, *and totaling at each break (generating sub-
totals), the @NB variable should contain the break level with 255
being displayed at the grand total line.

-Bruce

On Nov 17, 4:54*pm, Dan <dkai... (AT) gmail (DOT) com> wrote:

Hello All,

Does anyone have an example of an I-Descriptor using the @NB variable
in UniVerse?

Everything I try returns a 0 at the break level.

TIA,
Dan

Hi Bruce,
Thanks for the reply.
Below is the I-Descriptor NBCT:
File name * * * *= DICT FA
Record name = NBCT
This is a Type "I" Descriptor last compiled on 11/19/10 at 08:42.
20 lines long.

----: P11
0001: I
0002: @NB
0003: MD0
0004: NBCT
0005: 8R
0006: S

Below is the LIST statement with a small sample to show the results:
LIST FA SAMPLE 3 BY LOC BREAK-ON LOC WITH RETAIL.AMT GT 0 TOTAL
RETAIL.AMT CALC
*NBCT 09:01:30am *19 Nov 2010 *PAGE * *1
* * * * * * * * * * * * * * * * * * * * * * * * * * *RETAIL.$..
FUEL.AUDIT.................... * *Loc. * *INC.TAX... * *NBCT.....

001!0041!15653!!S * * * * * * * * 0041 * * * *10,945 * * * * *0
* * * * * * * * * * * * * * * * * * * * * *** * * * * * *----------
--------
* * * * * * * * * * * * * * * * * * * * * *0041 * * * *10,945
0

001!0050!15617!!S * * * * * * * * 0050 * * * *16,576 * * * * *0
* * * * * * * * * * * * * * * * * * * * * *** * * * * * * ----------
--------
* * * * * * * * * * * * * * * * * * * * * *0050 * * * *16,576
0

001!0051!15613!!S * * * * * * * * 0051 * * * *18,178 * * * * *0
* * * * * * * * * * * * * * * * * * * * * *** * * * * * * ----------
--------
* * * * * * * * * * * * * * * * * * * * * *0051 * * * *18,178
0

* * * * * * * * * * * * * * * * * * * * * * * * ========== * *====

45,699 * * * * *0

Sample of 3 records listed.

There is no difference in the output if I change CALC to TOTAL or
remove the SAMPLE.
Does account flavor matter? *I have tried it in both PICK and
Information accounts.

Thanks,
Dan

Reply With Quote
  #5  
Old   
frosty
 
Posts: n/a

Default Re: Universe I-Descriptor using the @NB variable - 11-23-2010 , 06:26 PM



"mvdbman" <mvdbman (AT) gmail (DOT) com> wrote

Quote:
From the "UniVerse System Description" manual:
"@NB has the value 0 on detail lines, the value 1 on the lowest level
break lines, etc. It has the value 127 on the grand total line."
Your statement is breaking only at one level, the detail level and
you're getting zero, just like the manual says you will. Try breaking
on multiple attributes that will create sub-totals within sub-totals
within totals and see what you get.
Zero is for detail lines, not the first level of break-on,
according to that doc.

"breaking only at one level, the detail level" makes no sense.
A detail line is not a break-on line.

--
frosty

Reply With Quote
  #6  
Old   
Raymond Kelso
 
Posts: n/a

Default Re: Universe I-Descriptor using the @NB variable - 11-25-2010 , 04:18 PM



Hi Dan,

I got the following I-type to work on my system (uv 10.1):

I created a dictionary C.NB with the following syntax:

I(IF TOTAL(VOH) THEN @NB ELSE @NB) (where VOH is a dictionary showing
the value on hand).

Then I listed my file as LIST MY.BAL BY LOCATION BY GROUP BY ITEM
BREAK.ON ITEM BREAK.ON LOCATION BREAK.ON ITEM CALC C.NB DET.SUP
ID.SUP.

The reason you need the syntax above is twofold - Quotes from manuals
follow:

1. @NB has the value 0 on detail lines, the value 1 on the lowest
level break lines, etc.
It has the value 127 on the grand total line.
Note: Nonzero values of @NB occur only in I-descriptors for which the
CALC
keyword was given, since these are the only I-descriptors that are
evaluated on total
lines.

2. CALC field

field is the name of an I-descriptor that is one of the fields
included in the report. The I-descriptor expression MUST include
the TOTAL function.

This is because without the TOTAL function in the I-Type the
expression is not evaluated at the break-level of the report just the
detail level.

Hope this helps

Rayk

On Nov 24, 11:26*am, "frosty" <fros... (AT) bogus (DOT) invalid> wrote:
Quote:
"mvdbman" <mvdb... (AT) gmail (DOT) com> wrote in message

news:bb385df6-b254-4b76-8880-354b1d310bde (AT) g25g2000yqn (DOT) googlegroups.com...

From the "UniVerse System Description" manual:
"@NB has the value 0 on detail lines, the value 1 on the lowest level
break lines, etc. It has the value 127 on the grand total line."
Your statement is breaking only at one level, the detail level and
you're getting zero, just like the manual says you will. Try breaking
on multiple attributes that will create sub-totals within sub-totals
within totals and see what you get.

Zero is for detail lines, not the first level of break-on,
according to that doc.

"breaking only at one level, the detail level" makes no sense.
A detail line is not a break-on line.

--
frosty

Reply With Quote
  #7  
Old   
Dan
 
Posts: n/a

Default Re: Universe I-Descriptor using the @NB variable - 12-08-2010 , 12:18 PM



On Nov 25, 5:18*pm, Raymond Kelso <rayjk... (AT) gmail (DOT) com> wrote:
Quote:
Hi Dan,

I got the following I-type to work on my system (uv 10.1):

I created a dictionary C.NB with the following syntax:

I(IF TOTAL(VOH) THEN @NB ELSE @NB) *(where VOH is a dictionary showing
the value on hand).

Then I listed my file as LIST MY.BAL BY LOCATION BY GROUP BY ITEM
BREAK.ON ITEM BREAK.ON LOCATION BREAK.ON ITEM CALC C.NB DET.SUP
ID.SUP.

The reason you need the syntax above is twofold - Quotes from manuals
follow:

1. @NB has the value 0 on detail lines, the value 1 on the lowest
level break lines, etc.
It has the value 127 on the grand total line.
Note: Nonzero values of @NB occur only in I-descriptors for which the
CALC
keyword was given, since these are the only I-descriptors that are
evaluated on total
lines.

2. CALC field

field is the name of an I-descriptor that is one of the fields
included *in *the *report. The *I-descriptor *expression MUST include
the TOTAL function.

This is because without the TOTAL function in the I-Type the
expression is not evaluated at the break-level of the report just the
detail level.

Hope this helps

Rayk

On Nov 24, 11:26*am, "frosty" <fros... (AT) bogus (DOT) invalid> wrote:

"mvdbman" <mvdb... (AT) gmail (DOT) com> wrote in message

news:bb385df6-b254-4b76-8880-354b1d310bde (AT) g25g2000yqn (DOT) googlegroups.com....

From the "UniVerse System Description" manual:
"@NB has the value 0 on detail lines, the value 1 on the lowest level
break lines, etc. It has the value 127 on the grand total line."
Your statement is breaking only at one level, the detail level and
you're getting zero, just like the manual says you will. Try breaking
on multiple attributes that will create sub-totals within sub-totals
within totals and see what you get.

Zero is for detail lines, not the first level of break-on,
according to that doc.

"breaking only at one level, the detail level" makes no sense.
A detail line is not a break-on line.

--
frosty
Rayk,

Thanks for your reply. Sorry it took so long to get back to you, I
just got back to that customer site.
Your example was perfect. I was able to get the @NB to work with your
example.

Thanks again,
Dan

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.