HP3000-L Archives

December 1996, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Wed, 4 Dec 1996 09:43:41 +1030
Content-Type:
multipart/mixed
Parts/Attachments:
RE: (3146 bytes) , WINMAIL.DAT (54 bytes)
You will need to create a second pass as follows:-
********************************************************************
First Pass
********************************************************************
access *tpf5356b

define d-crscmp character*8 = course-version[1:6] + campus-code[1:2]

sort on student-number &
     on d-crscmp &
     on campus-code

set subfile name tpf5356d

define d-crscnt integer*1 = 1

report summary &
     student-number &
     course-version &
     subject-number &
     campus-code &
     d-crscnt
go
**********************************************************************
Second Pass
**********************************************************************
acc *tpf5356d
sorted on student-number &
     on d-crscmp &
     on campus-code

set subfile name xyz at campus-code

report summary &
     student-number &
     course-version &
     subject-number &
     campus-code &
     d-crscnt subtotal

go

I think this should do it

Wayne Laughton
Southcorp Water Heaters Australia
[log in to unmask]
Phone + 61 2 9684 9140
Fax   + 61 2  684 4270
Alan St. Rydalmere  NSW  2116
Australia
----------
From: HP3000-L; FernandoO
To: HP3000-L
Subject: QUIZ problem with SUBTOTALing.
Date: Thursday, 5 December 1996 4:38

Hi all,

I have a subfile with records like this....

student#    course#   subject#    campus#
9663942K  CA04A     BB10A      BG
9663942K  CA04A     BB01A      CT
9663942K  CA04A     BB02A      CT
9663942K  CA04A     CD08H      OT
9663942K  CA04A     CD10J      OT
9663942K  GH04A     BB89K      BG
9663942K  GH04A    AA01A      CT
9663942K  GH04A    AA06A      CT
9663942K  GH04A    KK04A      OT
...
...ETC..

I am trying to produce a SINGLE record of every student/course combination
that has one or more campuses PER course, with a count of the number of
campuses per course/campus combo.

ie:
student#    course# campus#  NO#
9663942K  CA04A     BG             1
9663942K  CA04A     CT             2
9663942K  CA04A     OT            2
9663942K  GH04A     BG            1
9663942K  GH04A    CT              2
9663942K  GH04A    OT              1
...
...ETC..

I've tried using the following section of QUIZ code....

==========================================
access *tpf5356b

define d-crscmp character*8 = course-version[1:6] + campus-code[1:2]

sort on student-number &
     on d-crscmp &
     on campus-code

set subfile name tpf5356d

define d-crscnt integer*1 = 1

report summary &
     student-number &
     course-version &
     subject-number &
     campus-code &
     d-crscnt subtotal at d-crscmp reset at campus-code
go
==========================================
 ...and all I get is....

student#    course#   campus#   NO#
9663942K  CA04A     BG                1
9663942K  CA04A     CT                 1
9663942K  CA04A     CT                 1
9663942K  CA04A     OT                1
9663942K  CA04A     OT                 1
9663942K  GH04A     BG                1
9663942K  GH04A    CT                 1
9663942K  GH04A    CT                 1
9663942K  GH04A    OT                 1
...
...ETC..

QUESTION: Why is it that the RESET AT CAMPUS-CODE resets it on actually
EVERY record and not at the obvious control-break?

Any help appreciated. Thank you.

Regards,
Fernando Olmos (Analyst Programer @RMIT)


ATOM RSS1 RSS2