QUIZ: COUNT report-item and SUBFILES
Chris Sharman
Chris.Sharman@ccagroup.co.uk
Fri, 15 Jun 2001 09:19:07 +0100
>As usual, :-) , John is correct BUT one has to ask the question why the
>documentation persists in telling you you can do it!
>
>p353 of the Quiz reference for AS/400 has a little table that "outlines what
>is written to the subfile for summary operations". Te table states that for
>COUNT this will be INTEGER SIZE 4.
Well, perhaps I'm being pedantic here, but this is true !!
In the example below, I successfully write count to a subfile (Quiz), then use
qshow to see that the subfile starts with 4 (unnamed) bytes as documented !
The data would be available to anything except Powerhouse, I suppose.
Bob mentioned the structure of average & ratio - the same is true of percent I
believe - they all are written out as a float*8 subtotal, followed by a count,
or second subtotal, with the same name. The gotcha is that when you read back
the subfile and refer to it, you just have a subtotal, which may not be what
you expect. The subfile also contains an inaccessible second field of the same
name.
Chris
Qz> access opers
Qz> set subfile name testc
Qz> rep sum count oper-number
Qz> go
*W* The maximum number of records has been selected.
Records selected: 100
Records written: 100
Qz> qsho
Q S H O W (7.10.G3)
Copyright 1998 COGNOS INC. (ALPHA)
QSHOW> sho sub testc
01/06/15 SUBFILE DICTIONARY Page 1
SUBFILE RECORD REPORT
Subfile: TESTC (Temporary)
Organization: Direct
Format: 7
Record Size: 6 Bytes
Item Type Offset Size Occurs
OPER-NUMBER INTEGER UNSIGNED 4 2
_______________________________________________________________________
Chris.Sharman@CCAgroup.co.uk http://www.ccagroup.co.uk/
CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.
-----------------------------------------------------------------------
Any views expressed in this message are those of the sender and not
necessarily those of CCA Group. The unauthorized use, disclosure,
copying or alteration of this message is forbidden. The contents of
this message may be confidential and/or privileged, copyright CCA Group
and are intended solely for the use of the individual or entity to whom
they are addressed. Whilst this message has been scanned, CCA Group
cannot guarantee that it is virus free or compatible with your systems
and accepts no responsibility for any loss or damage arising from its
use. The recipient is advised to run their own anti-virus software. If
you receive this message in error please contact
postmaster@ccagroup.co.uk immediately, destroy any copies and delete it
from your computer systems.