HP3000-L Archives

May 1997, Week 2

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:
Michael Berkowitz <[log in to unmask]>
Reply To:
Michael Berkowitz <[log in to unmask]>
Date:
Mon, 12 May 1997 12:56:43 -0800
Content-Type:
multipart/mixed
Parts/Attachments:
text/plain (666 bytes) , CNT.DOC (1107 bytes)

Gavin, Bruce and others duke it out:

>>> Bruce Toback <[log in to unmask]> 05/12/97 11:08am >>>
Gavin retorts:
>Bruce responds:
>> Gavin writes:
>> >Unix sucks.
>>...
While the stimulating conversation plays on about whether Unix is or isn't
ready for prime time and how many notes can I write this program in,
here is an attached humble Cobol source program that doesn't care how
many files there are.  Just do a file equate of
:FILE  LISTF;DEV=DISC;REC=-80,,F,ASCII;DISC=100000 and then a :LISTF
whatever,2>*LISTF with MPE or MPEX into an 80 byte file, compile this
program and run it.  Those Cobol challenged will have to rewrite in your
favorite language.

Mike Berkowitz
Guess? Inc.



001000 IDENTIFICATION DIVISION. 001100 PROGRAM-ID. CNT. 001200 ENVIRONMENT DIVISION. 001300 INPUT-OUTPUT SECTION. 001400 FILE-CONTROL. 001500 SELECT LISTF ASSIGN "LISTF". 001600 DATA DIVISION. 001700 FILE SECTION. 001800 FD LISTF. 001900 01 LISTF-REC PIC X(80). 002000 WORKING-STORAGE SECTION. 002100 77 TOT PIC S9(8) COMP VALUE 0. 002200 77 5N PIC 9(5). 002300 PROCEDURE DIVISION. 002400 BEGIN-IT. 002500 OPEN INPUT LISTF. 002600 002700 READ-FILE. 002800 READ LISTF 002900 AT END 003000 DISPLAY TOT 003100 STOP RUN. 003200 003300 IF LISTF-REC (38:1) NOT NUMERIC 003400 GO TO READ-FILE. 003500 003600 MOVE 0 TO TALLY. 003700 INSPECT LISTF-REC 003800 TALLYING TALLY FOR ALL "GROUP=". 003900 004000 IF TALLY NOT = 0 004100 GO TO READ-FILE. 004200 004300 INSPECT LISTF-REC (33:6) 004400 REPLACING LEADING SPACES BY ZERO. 004500 004600 IF LISTF-REC (33:6) NUMERIC 004700 MOVE LISTF-REC (33:6) TO 5N 004800 ADD 5N TO TOT. 004900 005000 GO TO READ-FILE.

ATOM RSS1 RSS2