SPSS & COBOL

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

SPSS & COBOL

Manfred
Does SPSS use COBOL as a programming language? Or did SPSS use COBOL as a programming language in the past?
Reply | Threaded
Open this post in threaded view
|

Re: SPSS & COBOL

Art Kendall
When I started using SPSS in 1972, there was documentation on how to use FORTRAN to contribute. This allowed one to use all the data definition etc without reinventing it.  There wee a skillion subroutines one could call.

One had to be careful when using DEC FORTRAN which had many features that were not available on other platforms.  For example, DEC FORTRAN always cleared memory before assigning it to an individual user.  On some other platforms it was imperative to initialize memory. I do not recall if it was early, but by 1977, DEC FORTRAN had a
PARAMETER statement, for example in adapting INDSCAL on the DEC ten to handle by 210 10x10 similarity matrices for my dissertation I could change DIMENSION statements something like this in a file
      Parameter NSTIM =10
      Parameter NSUBJ =210
The main code would have
some statement to include the small file and then
      Dimension NDATA (NSUBJ, NSTIM, NSTIM)
One also had to avoid using some kinds of DIMENSION statements like
Dimension IPCT (-100, 100)
Dimension IYEAR (1776, 1980)

One also could not rely on automatic checking for a subscript being out of bounds for example
if a value of IYEAR were 1770 when the array was
Dimension IYEAR (1776, 1980)
       
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: SPSS & COBOL

jkpeck
This post was updated on .
In reply to this post by Manfred
AFAIK, SPSS never used any COBOL code.  However, there are some input formats  such as zoned decimal available for use with DATA LIST that would suit COBOL files.
Reply | Threaded
Open this post in threaded view
|

Re: SPSS & COBOL

Rich-Ulrich
In reply to this post by Art Kendall
I never used a Fortran that used Dimension for ranges, like
  Dimension IPCT (-100, 100)
  Dimension IYEAR (1776, 1980)
Maybe after 1990?  If that was added, I would expect maybe
a slash instead of comma - so that the old performance would work.

In old-style Fortran, when SPSS was new, when you gave Fortran's
Dimension two values (always positive), you got a matrix.

--
Rich Ulrich
Reply | Threaded
Open this post in threaded view
|

Re: SPSS & COBOL

Art Kendall
<head slap> you are right it was a slash. My only excuse is that it a long time since 1971 or 1972 when I learned DEC FORTRAN
Since the default was to leave index checking turned on one would be notified if and index was out of range.

On DEC machines one could have matrices where each of dimensions could have specific values
something like this to make code that was easily adaptable to specific problems


     
     parameter minpct(-100) maxpct(100) minyr (1776) maxyr (1980)
     double precision  mytab (minpct/maxpct, minyr (minyr/maxyr)
     integer pct year
  2  read(7, 10, end=15) ICASE pct year dv
10 format(2I,F)
     mytab(pct,year) = mytab(pct,year) +dv
     go to 2
15 continue

DEC Fortran always passed clean memory.  This was not the case on some other brands.

On some other brands one could do something like this and see all kinds of things
     Dimension x (100000)
     write (5,100) x
100 format (100000E18.16)
     write(6,200) x
200 format (100000A8)






Art Kendall
Social Research Consultants