[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ilbbak::ibi_focus

Title:FOCUS, from INFORMATION BUILDERS
Moderator:ZAYIUS::BROUILLETTE
Created:Thu Feb 19 1987
Last Modified:Mon May 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:615
Total number of notes:1779

440.0. "SUM statement: zeroing problem" by ZUR01::WELTI () Tue Jul 23 1991 03:09

I found following funny problem by adding a simple SUM statement.

Any help would be great.

Regards Heinz
 

Example 1: 

TABLE FILE  HACTO

SUM CALL AS '# Req' AND CNT LOG-NR  AS '# Act' 
-*  AND  REPTIME/D5.1 
BY CUST AS 'FULL_COMPANY' 

SUM CNT LOG-NR  AS '# Act' AND REPTIME/D5.1 
ACROSS WRKTEAM AS '  ' 
BY CUST AS 'FULL_COMPANY'

END                                                                           

OUTPUT 1:

                                                INST           OFF-SITE       ON-SITE        other
  FULL_COMPANY                    # Req  # Act  # Act REPTIME  # Act REPTIME  # Act REPTIME  # Act REPTIME
  ----------------------------------------------------------------------------------------------------------
  ABB DRIVES AG                       4     10      1      .2      0       .      8     3.6      1      .0
  ABB FORSCHUNGSZENTRUM               2      5      0       .      2      .9      2     2.5      1      .0
  ABB HOCHSPANNUNGSTECHNIK            2      4      0       .      0       .      4     2.4      0       .
  ABB INFOCOM AG                      1      1      0       .      0       .      1      .4      0       .
  ABB INFORMATIK AG                   2      3      0       .      2      .4      0       .      1      .0

comment: everything is OK.



Example 2: 

TABLE FILE  HACTO

SUM CALL AS '# Req' AND CNT LOG-NR  AS '# Act' 
-*  
AND  REPTIME/D5.1                                        !!! added command
-*  
BY CUST AS 'FULL_COMPANY' 

SUM CNT LOG-NR  AS '# Act' AND REPTIME/D5.1 
ACROSS WRKTEAM AS '  ' 
BY CUST AS 'FULL_COMPANY'

END                                                                           


OUTPUT 2:
 
                                                         INST           OFF-SITE       ON-SITE        other
  FULL_COMPANY                    # Req  # Act  REPTIME  # Act REPTIME  # Act REPTIME  # Act REPTIME  # Act REPTIME
  -------------------------------------------------------------------------------------------------------------------
  ABB DRIVES AG                       4     10      3.8      1     3.8      0       .      8     3.8      1     3.8
  ABB FORSCHUNGSZENTRUM               2      5      3.4      0       .      2     3.4      2     3.4      1     3.4
  ABB HOCHSPANNUNGSTECHNIK AG         2      4      2.4      0       .      0       .      4     2.4      0       .
  ABB INFOCOM AG                      1      1       .4      0       .      0       .      1      .4      0       .
  ABB INFORMATIK AG                   2      3       .5      0       .      2      .5      0       .      1      .5



PROBLEM:
								    ^                             ^              ^
                                                                    |	                          |              |

         					            the same total appears several times with the old value
T.RTitleUserPersonal
Name
DateLines
440.1>>EDUCATED GUESSMILPND::MADDENTue Jul 23 1991 17:224
    on the first AND REPTIME/D5.1 substitute AND COMPUTE XREPTIME/D5.1=REPTIME; 
    AS 'REPTIME'
    
    Am I behind the times? It used to be CNT.LOG-NR only.
440.2solutionZUR01::WELTIWed Jul 24 1991 04:1030
Thanks for the tip,

With some modifications the report runs fine now!


Regards HEINZ_using_focus_without_any_edu


Solution:

DEFINE FILE HACTO

XRPETIME/D7.3=REPTIME;                           <-----------------

END


TABLE FILE  HACTO

SUM CALL AS '# REQ' AND CNT.LOG-NR  AS '# ACT' 
-*
AND  XRPETIME/D5.1 AS 'REPTIME'                  <-----------------
-*
BY CUST AS 'FULL_COMPANY' 

SUM CNT LOG-NR  AS '# Act' AND REPTIME/D5.1 AS 'Reptime'
ACROSS WRKTEAM AS '  ' 
BY CUST AS 'FULL_COMPANY'

END                                                                           
440.3On the subject of syntaxRDGE61::KEEGANPWed Jul 24 1991 04:2412
    FYI: 
    Referring to the Release 5.n User manual, page 3-10, it is not
    recommended to use 'special' characters (such as "-") in field names.
    
    In this case FOCUS might get confused if you use LOG-NR in a DEFINE or
    COMPUTE statement.
    
    On a similar note "CNT xxxx" will work (as long as you have not got a
    field that starts with CNT available.
    
    
    Paul K