Count records using Dictionary

62 views
Skip to first unread message

dfleetham_HMA

unread,
Dec 22, 2021, 2:25:06 PM12/22/21
to jBASE
Hi All,

We've recently (ish) moved from to 5.8.2 from I have no idea what (4.#?).

In the previous iteration I had a dictionary item that I added to most files and it was labelled 'CNT'. It was a fixed value of 1 and looked like:

    CNT
001 I
002 1
003 MR0,
004 CNT
005 8R

And it was useful for counting records in a report; if I ran a query like:

SORT D:\D_Shared\This Client\ThatCampaign\CUST_GIFT_DATA BY 28 BREAK-ON 28 TOTAL 22 TOTAL CNT (ID

I would get something like:

Last Gift.    Gift Amt    CNT.....
Year                              

      2014       $75.00           3
      2015       $85.00           4
      2016       $95.00           4
      2017       $65.00           2
      2018       $80.00           3
      2019       $90.00           3
              ========     ========
***              $490.00         19

Having moved to 5.8.2, the CNT dictionary item doesn't seem to work and running the same query, I get:

Last Gift.    Gift Amt    CNT.....
Year                              

      2014       $75.00           0
      2015       $85.00           0
      2016       $95.00           0
      2017       $65.00           0
      2018       $80.00           0
      2019       $90.00           0
              ========     ========
***              $490.00          0

There's probably a very simple solution; I just haven't found it. Is there a better structure for a dictionary item like this? Is there a better solution I could be using?

Any help is much appreciated.

Thanks,

Doug.

Peter Falson

unread,
Dec 22, 2021, 4:29:17 PM12/22/21
to jb...@googlegroups.com
Doug,

This may have been patched but can you post the output of

config-strings 


Sent from my iPhone

On Dec 22, 2021, at 11:25 AM, dfleetham_HMA <dfle...@harveymckinnon.com> wrote:

Hi All,
--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.
 
To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

---
You received this message because you are subscribed to the Google Groups "jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbase+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbase/2faaf941-59db-46a3-932b-4f40777635d4n%40googlegroups.com.

Anne Sigman

unread,
Dec 23, 2021, 9:06:51 AM12/23/21
to jBASE
Here's an old-school way of doing it.  We haven't upgraded yet, but you might try it.

TOP
001 S
002 0
003 \
004
005
006
007
008 A;"1"
009 R
010 0

dfleetham_HMA

unread,
Dec 23, 2021, 11:05:19 AM12/23/21
to jBASE
Hi Peter,

config-strings output is:
JBCRELEASEDIR  : D:\jBase\5.8.2
JBCGLOBALDIR   : D:\jBase\global
JBCEMULATE     : jbase
Emulation file : D:\jBase\global\config\Config_EMULATE

compiler_options                             ""
dates_upper_case                             true
enter_keeps_common_data                      false
error_numbers_are_single_attribute           false
itype_trans_replace_delim                    false
itype_unquoted_numeric_literal               true
jbase_field                                  true
list_keys                                    true
lock_strategy                                thread
named_common                                 null
old_jql_output_style                         false
readv0                                       key
reality_video                                true
treat_with_as_or_with                        true
unnamed_common                               unassigned
use_sql_syntax_for_select                    false

Thanks,

Doug.

dfleetham_HMA

unread,
Dec 23, 2021, 11:05:24 AM12/23/21
to jBASE
Thanks, Anne.

That works a treat.

Cheers,

Doug.

Peter Falson

unread,
Dec 23, 2021, 11:25:24 AM12/23/21
to jb...@googlegroups.com
Thanks Doug. That’s the default config and your example looks to be working on the upcoming release.

Sent from my iPhone

On Dec 23, 2021, at 8:05 AM, dfleetham_HMA <dfle...@harveymckinnon.com> wrote:



Peter Falson

unread,
Dec 23, 2021, 3:56:59 PM12/23/21
to jb...@googlegroups.com
Doug,

I suspect your problem may be either an MD or DICT entry of “1” (ie. the key) which was an issue early 5.8 but is now ignored when an itype references an integer. So you could also quote the number but more importantly this is a heads up that you may want to consider upgrading to 5.8.5 (due out this or next week).

Sent from my iPhone

On Dec 23, 2021, at 8:05 AM, dfleetham_HMA <dfle...@harveymckinnon.com> wrote:


Reply all
Reply to author
Forward
0 new messages