[Download-List] segmentation fault

Bessler-Fromm, Marc mfromm at exeter.edu
Thu Nov 3 17:00:47 EST 2005


I think I encountered a similar problem a couple of months ago. Try
switching the single and double quotes in your d/l statement.
 
DOWNLOAD STUDENTS EVAL "SUBR('DELTA.MU.DELTA.CREDITS',STUDENTS.ID)"
 
If this fixes it for you, then it a the same bug Dave hopes to address
in the next release. If not, maybe something else.
 

Marc Bessler-Fromm
Data Support Specialist
Phillips Exeter Academy
20 Main Street
Exeter, NH  03833

Telephone: 603-777-3367
Fax: 603-777-4382
Email: mfromm at exeter.edu <mailto:mfromm at exeter.edu> 
Website: http://phillips.exeter.edu <http://phillips.exeter.edu/> 

 

________________________________

From: download-list-bounces at cedarville.edu
[mailto:download-list-bounces at cedarville.edu] On Behalf Of Don Prezioso
Sent: Thursday, November 03, 2005 11:34 AM
To: download-list at cedarville.edu
Subject: [Download-List] segmentation fault


O.K., I'm really puzzled on this one. 
 
I have a virtual field that calls a subroutine. In LIST statements it
works fine, but DOWNLOAD gives a segmentation fault.
 
First the error:
 
:GET.LIST TEST.DVP
10 records retrieved to list 0.
>DOWNLOAD STUDENTS STU.DMD.CREDITS FORMAT FIXED
DOWNLOAD version 7.12
Using input file STUDENTS
Output to screen
 
Segmentation fault
ibmp630:/datatel/live/collive $
 
The virtual field code is:
 
SUBR("DELTA.MU.DELTA.CREDITS",STUDENTS.ID)
 
And the DELTA.MU.DELTA.CREDITS subroutine code is:
 
SUBROUTINE DELTA.MU.DELTA.CREDITS(RESULT,ID.NO)
*  TAKES AN ID NUMBER AND RETURNS A TOTAL NUMBER CREDITS EARNED FOR
*  DELTA MU DELTA REPORT
COMMON /DMDCRED/ OPENED, F.TRANS.GROUP, F.STUD.ACAD.CRED,
F.STU.ACAD.LEVEL, ACAD.LEVELS
IF NOT(OPENED) THEN
  OPEN '','TRANSCRIPT.GROUPINGS' TO F.TRANS.GROUP
     ELSE STOP "UNABLE TO OPEN TRANSCRIPT GROUPING FILE"
  OPEN '','STUDENT.ACAD.CRED' TO F.STUD.ACAD.CRED
     ELSE STOP "UNABLE TO OPEN STUDENT.ACAD.CRED FILE"
  OPEN '','STUDENT.ACAD.LEVELS' TO F.STU.ACAD.LEVEL
     ELSE STOP "UNABLE TO OPEN STUDENT.ACAD.LEVELS FILE"
  READ TG.REC FROM F.TRANS.GROUP, 'MB'
    ELSE TG.REC = ''
  ACAD.LEVELS = TG.REC<2>
  OPENED = 1
END
*
X.TOTAL = 0
RESULT = 0
ACAD.LEVEL.COUNT = DCOUNT(ACAD.LEVELS, at VM)
FOR LEVEL = 1 TO ACAD.LEVEL.COUNT
  READ STA.REC FROM F.STU.ACAD.LEVEL,ID.NO:'*':ACAD.LEVELS<1,LEVEL> THEN
    STUDENT.ACAD.CRED = STA.REC<10>
    CRED.COUNT = DCOUNT(STUDENT.ACAD.CRED, at VM)
    FOR I = 1 TO CRED.COUNT
      READ STC.REC FROM F.STUD.ACAD.CRED,STUDENT.ACAD.CRED<1,I> THEN 
        IF STC.REC<13> GT 0 THEN
          X.TOTAL += STC.REC<13>
        END
      END
    NEXT I
  END
NEXT LEVEL
*
IF X.TOTAL THEN 
  RESULT = OCONV(X.TOTAL,"MD05") 
END
*
RETURN RESULT
END
 
If I try to do a DOWNLOAD using an EVAL, instead of the virtual field, I
get:
 
:GET.LIST TEST.DVP
10 records retrieved to list 0.
>DOWNLOAD STUDENTS EVAL 'SUBR("DELTA.MU.DELTA.CREDITS",STUDENTS.ID)'
DOWNLOAD version 7.12
Creating temporary list DLDPREZ40567
10 key(s) saved to 1 record(s).
10 records retrieved to list 1.
Overwriting existing select list.
10 records retrieved to list 1.
Using input file STUDENTS
Output to screen
 
""
""
""
""
""
""
""
""
""
""
 
10 records processed.
Deleting temporary list DLDPREZ40567
'DLDPREZ40567' deleted.
:
 
It should be returning some number (if only 0) instead of the null
strings.  If I do a LIST statement I get:
 
:GET.LIST TEST.DVP
10 records retrieved to list 0.
>LIST STUDENTS STU.DMD.CREDITS

LIST STUDENTS STU.DMD.CREDITS 11:31:21 Nov 03 2005 1
STUDENTS.. STU.D
 
0936711       27
0816629       16
0896532       18
0936713       12
0936719       18
0736451       18
0976714        6
0616439       28
0896540       17
0556488       12
10 records listed
 
I have messed around with the subroutine code (there didn't used to be
common, and it didn't used to verify the presence of data) to no avail.
Any ideas?
 
Thanks
 
Don

 
--
Don Prezioso
Director of Administrative Systems
Ashland University
Ashland, Ohio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.cedarville.edu/pipermail/download-list/attachments/20051103/74262f82/attachment.html>


More information about the download-list mailing list