HDTenEightyP/NetNews huggingface dataset:
From: ARNE@kopc.hhs.dk (Arne Vajhxj)
Newsgroups: comp.os.vms
Subject: Re: Vax C Int size problems?
Date: 20 Jan 93 12:20:24 GMT
Distribution: world
Organization: The Internet

>         I am in the process of writing what seemed to be an easy program to
> calculate sin x's ans cos x's utilizing the Maclaurin series. The program works
> rather well until I get to a point such that I need to find a factorial of a
> large number as 17. I use the nice little recursive function listed here:
> 
> factorial(n)
>   int n;
> {
>   if (n == 1)
>     return (1);
>   else
>     return (n * factorial(n - 1));
> }
> 
> I have problems with the number (n) when it comes out of the function because a
> regular int definition cannot hold the value. I thought perhaps a "long int n"
> or something like that would remedy the situation, but to no avail. Is there a
> good definition for a variable which is going to handle such a large number? Or
> is it perhaps worse and (gasp) I'll need to find another handy-dandy algorythm
> for finding the factorial of such a large number?

No - there is nothing bigger than int (=long=long int) in VAX C. But that should
not be a problem for you !

1) Change factorial from int to float or double !

   Then you will be able to go higher (33 instead of 15). If you use double
   and G_FLOATING you will be even better off.

   You will loose a little in precision, but it should not mean anything for
   the calculations.

   So:

      double factorial(int n)
      {
        if (n == 1)
          return (1);
        else
          return (n * factorial(n - 1));
      }

2) If speed means anything for you, then it will be much faster to have
   an initialized array containing the values.

   So:

      double factorial[33];

3) If you are interested in big integer arithmetic, then GNU C++ comes
   with an Integer class, which implements extremely large integers. It
   can easily be used for factorial calculation too !

                                                          Arne

Arne Vajhxj                             local DECNET:  KO::ARNE
Computer Department                     PSI:           PSI%23831001304030::ARNE
Business School of Southern Denmark     Internet:      ARNE@KO.HHS.DK


Newsgroups: comp.os.vms
From: fairfield@umahe1.slac.stanford.edu
Subject: Re: Yet another VAX C problem
Organization: Stanford Linear Accelerator Center
Date: Mon, 25 Jan 1993 18:45:53 GMT

In article <1993Jan25.162602.4980@cs.rit.edu>, whd0675@cs.rit.edu (Walter H Dick, III) writes:
> void test(unsigned int *ip)
> {
>    *ip = (*ip + 511) / 512;
> }
>
> In VAX C 3.2, it generates:
>
>
>                                           0000	test:
>                                     000C  0000		.entry	test,^m<r2,r3>
>                               5E 04 C2    0002		subl2	#4,sp
>
>                            53 04 AC D0    0005		movl	4(ap),r3
>                   52 63 000001FF 8F C1    0009		addl3	#511,(r3),r2
>                                  51 D4    0011		clrl	r1
>                               50 52 D0    0013		movl	r2,r0
>                      52 00000200 8F D0    0016		movl	#512,r2
>                                  09 18    001D		bgeq	vcg.1
>                               50 52 D1    001F		cmpl	r2,r0
>                                  09 1A    0022		bgtru	vcg.2
>                                  51 D6    0024		incl	r1
>                                  05 11    0026		brb	vcg.2
>                                           0028	vcg.1:
>                         50 51 50 52 7B    0028		ediv	r2,r0,r1,r0
>                                           002D	vcg.2:
>                               63 51 D0    002D		movl	r1,(r3)
>
>                                     04    0030		ret
>
>
> Command Line
> ------------
> CC/MAC/LIST/SHOW=NOSOURCE TEST2.C
>
> Why is the question?

    WHY WHAT?
        ^^^^
    OK, OK, I'll take a guess: "Why does such a simple function generate
so much and so complicated machine code?"

    Perhaps you were expecting something more like this:

                              0000	test:
                        0000  0000		.entry	test,^m<>
                  5E 04 C2    0002		subl2	#4,sp

               51 04 AC D0    0005		movl	4(ap),r1
      50 61 000001FF 8F C1    0009		addl3	#511,(r1),r0
      61 50 00000200 8F C7    0011		divl3	#512,r0,(r1)

                        04    0019		ret

If so, remove the "unsigned" from your pointer declaration:

             void test(int *ip)
             {
                *ip = (*ip + 511) / 512;
             }

Doing unsigned arithmetic on 32-bit integers requires extra code.  There's
no way around it.

		-Ken
--
 Dr. Kenneth H. Fairfield    |  Internet: Fairfield@Slac.Stanford.Edu
 SLAC, P.O.Box 4349, MS 98   |  DECnet:   45537::FAIRFIELD (45537=SLACVX)
 Stanford, CA   94309        |  BITNET    Fairfield@Slacvx
 ----------------------------------------------------------------------------
 These opinions are mine, not SLAC's, Stanford's, nor the DOE's...
Newsgroups: comp.os.vms
Subject: Re: Recursion in FORTRAN
From: tp@mccall.com (Terry Poot)
Date: Fri, 22 Jan 1993 16:58:45 CST
Reply-To: tp@mccall.com (Terry Poot)
Organization: The McCall Pattern Co., Manhattan, KS, USA
Nntp-Posting-User: tp


In article <1993Jan22.183447.22979@dbased.nuo.dec.com>,
lionel@quark.enet.dec.com (Steve Lionel) writes:
>Right on VAX and Alpha AXP, but not on some other platforms, so in the
>interest of portability and correctness, put those initializations in!

Whew! Thanks. Hopefully, this stuff'll all get rewritten completely before I
have to port it. Any time I do anything serious to any of this code, I rewrite
it completely. The code is so bad, that's actually easier than fixing it. :-(

This is what happens to you when you have too much porting on your resume. :-)
--
Terry Poot <tp@mccall.com>                   The McCall Pattern Company
(uucp: ...!rutgers!depot!mccall!tp)          615 McCall Road
(800)255-2762, in KS (913)776-4041           Manhattan, KS 66502, USA
From: gharpure@vtpwr2.psl.ee.vt.edu (VASUDEV GHARPURE)
Newsgroups: comp.os.vms
Subject: help: huge index file
Date: 26 Jan 93 15:48:00 GMT
Organization: Power Systems Lab, Electrical Engg., Virginia Tech
News-Software: VAX/VMS VNEWS 1.41


	We have a vax cluster, with a VS3100/76 as the boot node, 
running VMS 5.4-2. The boot node has a 1.0 GB external disk, used for 
user files.

	I used this disk as a temprory storage for a large number of 
files, which have since been deleted. But I am left with a huge index 
file (about 31K blocks). The original file was about 5K blocks.

	How do I get the index file back to normal? What harm does it do 
if it stays as it is?

Vasudev
gharpure@power.psl.ee.vt.edu
From: 92ADAMS@HANNA2.NLU.EDU (Erek Adams)
Newsgroups: comp.os.vms
Subject: DECWindows and Startup States
Date: 22 Jan 93 20:41:38 GMT
Distribution: world
Organization: The Internet

Hello Info-Vaxers,

	I've got a fairly simple question for you.  Is is possible under
DECWindows to have everything startup as an Icon?  In DECW$SM_GENERAL.DAT there
is a line that reads 'sm.startup_state:      iconified'  Now I know what this
does for the Session Manager, but is there a way to force everything else to be
an Icon on startup?  I'd like to be able to force DecTerms, Eve, and BookReader
into an icon without cluttering up my screen.

	On a slightly different note, is there anyway to start up a Decterm on
node X from node Y _without_ logging into node Y and issuing a
'create/term=decterm/detach' on it (node Y)?  As is to do that and keep my
current decterms free, I have to set host and issue the command manually.  Can
I do it remotely?  If so how?

	If I need to post any more information (VMS Version(s), DECWindows
settings, etc...), please e-mail me and I'll send the ASAP.  

	Thanks for any help!


                                         Erek Adams

+-------------------------------------+---------------------------------------+
|  Erek Adams, Student Programmer     |  Internet:  92adams@hanna2.nlu.edu    |
|  Northeast Louisiana University     |  SnailMail: 5330 DeSiard, #43         |
|  Monroe, Louisiana  71202           |             Monroe, LA  71202         |
|                                     |  Home Phone: (318)-343-4729           |
+-------------------------------------+---------------------------------------+
From: sysgaertner@cygnus.frm.maschinenbau.th-darmstadt.de (M. Gaertner, FRM, TH Darmstadt, Germany)
Newsgroups: comp.os.vms
Subject: Re: Formatting MFM drives on MicroVax II.  How?
Date: 26 Jan 1993 09:27:41 GMT
Organization: Fachbereichsrechner Maschinenbau, TH Darmstadt, Germany
Distribution: world
Reply-To: sysgaertner@cygnus.frm.maschinenbau.th-darmstadt.de
NNTP-Posting-Host: cygnus.frm.maschinenbau.th-darmstadt.de

In article <01GTXJ20LFU88Y6XD2@ALBION.BITNET>, SYS@ALBION.BITNET ("Its just been discovered that research causes cancer in rats.") writes:
>Hello,
>
>        I have a MicroVax II and need to format an MFM drive (Seagate ST251-1
>or RD32 equivelent.)  I took the drive ST251-1 from an old PC.  I've been led
>to understand that the RQDX33 controller will handle such a drive.  Is this
>correct?
>
>        As I am short on documentation for this beast, could someone tell me
>how to format an RD32 drive on the MicroVax II.
>
>Revelent information:
>
>BA23 Cabinent
>RQDX33 Controller
>RX50 Dual floppies
>
>Emulx SMD controller (not sure what model/version #.  If someone knows where I
>                        can look on the card, I will forward that information)
>CPU module (Again, not sure of the specific.  It is a MVII, *not* a MV2000.
>                again, if someone will tell me where to start looking for CPU
>                model, I will forward the information)
If it's a uVAXII it must be KA630.

To the formatting. You'll need the diagnostic software, perhaps avail. through
your friendly field-tech...
Well, anyway. If you have MDM booted then you'll need to start the basic
formatter, not just the option of formatting preknown drives. You'll need
the one which asks for the drives UIT (I've done that, but I've forgotten,
in which menue this one will be started...). The latest MDM-version will NOT
show the RD32 (hm, isn't ST251 RD33 ?) in the UI-Table. You must specify
8 here! Formatting will take some time but it works.
A hint: If the formatter complains about failures when finding bad blocks
you started the wrong one.
Hope that helps. If you need more, that I can try to reboot my uVAX and look
up the right menue...


-----------------------------------------------------------------------------

                      M. Gaertner
                TH Darmstadt, W. Germany
	     Rechnergruppe FB 16-Maschinenbau
      SYSGAERTNER@CYGNUS.FRM.MASCHINENBAU.TH-DARMSTADT.DE
      Phone: Germany, (0)6151/16 5145
From: BOLEF@ASUWS2.LA.ASU.EDU (Larry Bolef, Arizona State University)
Newsgroups: comp.os.vms
Subject: Use RRD40/42 on Macintosh?
Date: 26 Jan 93 10:58:06 GMT
Distribution: world
Organization: The Internet


     I have one each of RRD40 and RRD42 CD-ROM drives. I'd like
to connect one or both to a Macintosh Quadra 700, running system
7.0. I tried the Apple CD-ROM software, but the DEC CD-ROM's
aren't recognized.

     Has anyone tried a DEC CD-ROM drive on a Macintosh with
system 7.0? Is there a special Macintosh driver that would help?
My goal is to use a DEC CD-ROM drive on the Quadra 700 as a
server to distribute the system 7.1 update to 10 other Mac's on
our local network.

     Please respond directly and I'll summarize for the net.

Larry Bolef, HIIPS System Engineer     ASUIP2::BOLEF           -NSI/DECnet
Department of Geology                  bolef@asu.edu           -Internet
Arizona State University               (602) 965-6336          -voice
Tempe, AZ 85287-1404                   (602) 965-8102          -FAX
From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
Newsgroups: comp.os.vms
Subject: Re: How to repeat "new Mail message" ?
Date: 25 Jan 1993 23:07:09 GMT
Organization: HST Wide Field/Planetary Camera
Distribution: world
Reply-To: carl@SOL1.GPS.CALTECH.EDU
NNTP-Posting-Host: sol1.gps.caltech.edu

In article <C1ExK5.FyK@usenet.ucs.indiana.edu>, mdchaney@fractal.ucs.indiana.edu (M Darrin Chaney) writes:
>Technically, it shouldn't happen at all in this case.  If the user has
>AUTOPURGE on, there won't be any mail messages in the wastebasket when
>mail is first fired up (unless the user is running mail under a different
>login).  So, with no mail commands executed, nothing will make it into
>the wastebasket, nothing will get purged, and mail won't have to reclaim
>space.

Not quite true.  Consider the following scenario:
	1)  User runs MAIL, deletes some messages, issues QUIT command.
	2)  User runs MAIL, does nothing except issue the EXIT command.
	3)  User runs MAIL, does anything involving his wastebasket folder,
	    then issues the EXIT command.
At the end of step 1), the deleted messages are still in the wastebasket
folder.  At the end of step 2), the messages are *STILL* in the wastebasket
folder.  Finally, at the end of step 3), the messages are gone.  AUTOPURGE is
invoked only if:
	1)  During the current mail session, you did anything that involved the
	    wastebasket folder; and
	2)  You EXIT rather than QUITting.
Now, as to the original subject of this thread, since the DCL procedure:
	$ MAIL
	$
doesn't do anything with the wastebasket folder, AUTOPURGE, even if set, will
not be invoked, so you need not use the QUIT command to streamline performance.
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL

Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
understanding of astronomy is purely at the amateur level (or below).  So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it.  If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.
From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
Newsgroups: comp.os.vms
Subject: Re: CPU Time measurement on VMS.
Date: 24 Jan 1993 10:44:03 GMT
Organization: HST Wide Field/Planetary Camera
Distribution: world
Reply-To: carl@SOL1.GPS.CALTECH.EDU
NNTP-Posting-Host: sol1.gps.caltech.edu

In article <01GTTXFQMDQQ0006QT@ACAD.DRAKE.EDU>, SK0001@ACAD.DRAKE.EDU (Sal Kabalani) writes:
>LS>    I am a new user of OpenVMS running on Alpha. I have a problem and I am 
>LS> asking for your help.  I have a FORTRAN program. I compile and link it and 
>LS> use run command to run it.  My question is how I can measure the total CPU 
>LS> used by the execution of the program.  In UNIX, I can easily use time to 
>LS> do it.  But how do I do it in VMS?  Can some one help me?  Thanks a lot. 
>
>The following is a fragment of code from a program I wrote a few months ago.
>The fragment reports CPU Time, Buffered I/O, Direct I/O and Page Faults used
>during program execution. The way the code works is simple: you collect this 
>information at the beginning of your program using sys$getjpi, then collect it 
>again at the end, then report the difference.

Why not just:
	$ SHOW STATUS
	$ RUN program
	$ SHOW STATUS
then subtract the former CPU time from the latter?  That will, of course,
include the time required for 1 "SHOW STATUS" command plus the time to activate
the image in the "RUN program" command, and of course you'll have to subtract
the times yourself (or write, e.g., a TPU procedure to do it for you).
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL

Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
understanding of astronomy is purely at the amateur level (or below).  So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it.  If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.
From: tdarcos@ACCESS.DIGEX.COM (Paul Robinson)
Newsgroups: comp.os.vms
Subject: [TDR] Large Fortran Arrays
Date: 27 Jan 93 15:21:45 GMT
Distribution: world
Organization: The Internet

KN>I have a friend who wants to run a program that has large arrays. 
  >He hasn't been able to get beyond linking the darn thing.  His 
  >declaration section reads as follows:
  
KN>     COMMON X(2400,2400),A1(2400,2400),A2(2400,2400),WT(5,2400),
  >   & XT(2400,2400),D(2400),XMEAN(2400),SUM(2400),SD(2400),DT(2400)
  >    CHARACTER*15 IN(12),OUT1,OUT2

Let's see: a 2400 x 1000 element record would be 2.4 million words, and
that's floating-point elements.  Times 2400 it would be 5,760,000 words
*EACH* for X, A1, A2 and XT.  It would be another minor 20K for the WT
and other arrays. 

That's 23,040,000 *words* of virtual memory!

Assuming one can set up a process this large (someone else on INFO-VAX
will probably be able to say) he would almost certainly have to raise some
limits on resource consumption.

Why does he need to set up such huge arrays?  Can he use a sparse matrix
or something else?  Can he create files on disk?  This is probably just
too big given the current limits that are imposed on him.  

Reminds me of a story.  This one university wanted to do some tests on the
effects of certain conducting capabilities using very short high-energy
bursts, of, oh say, 10 gigawatts for three seconds twice a day.  Well,
suffice to say this was more than the entire power capacity for the
electric company for that area!  The Utility informed the university that
they were not interested in their business for this application and were
free to find electricity from any other source that was willing to supply
it in those kinds of quantities.
From: mahan@TGV.COM (Patrick L. Mahan)
Newsgroups: comp.os.vms
Subject: Re: include file with DW-MOTIF
Date: 26 Jan 93 19:19:29 GMT
Distribution: world
Organization: The Internet

In article <C1GvFG.FJu@ireq.hydro.qc.ca> you write:
#
#  Simple question a propos include file with DECwindows/Motif:
#
#  I have: (system VAX/VMS 5.5-2, compiler VAX-C)
#
#               | $ SHOW LICENSE DW-MOTIF
#               |
#               | Active licenses on node MV4:
#               |
#    license => |   DW-MOTIF
#	       |   Producer: DEC
#	       |   Units: 2510
#	       |   Version: 0.0
#	       |   Date: (none)
#	       |   Termination Date: (none)
#	       |   Availability: F (Layered Products)
#	       |   Activity: 0  
#	       |   MOD_UNITS
#               |
#               | $ DIR DECW$INCLUDE /COLUMN=1
#               |
#               | Directory SYS$COMMON:[DECW$INCLUDE]
#               |
#      files => | COMPOBJ.H;1        
#               | COMPOBJP.H;1       
#               | COMPOSITE.H;1      
#               | COMPOSITEP.H;1     
#               | CONSTRAINP.H;1     
#               |
#               |  ... skip ....
#               |
#               | XPROTO.H;1         
#               | XPROTOSTR.H;1      
#               | XRESOURCE.H;1      
#               | XUTIL.H;1          
#               |
#               | Total of 57 files.
#
#
#  Question: files not present: 
#            (i.e. refence CD-ROM, Installation guide, table C-1) 
#
#                  ARROWB.H     ?
#                  ARROWBG.H    ?
#                  ARROWBGP.H   ?
#                  ARROWBP.H    ?
#                    ...
#                  CASCADEB.H   ?
#                  CASCADEBG.H  ?
#                   ...and others
#
#             Why not? (installation?, license? ...)
#

When you install DECwindows/Motif, did you answer "YES" to installing the
programming support?  If not then it  would not have been loaded and 
DECW$INCLUDE would contain the old DECwindows include files.

--
Patrick L. Mahan

--- TGV Window Washer ------------------------------- Mahan@TGV.COM ---------

Waking a person unnecessarily should not be considered  - Lazarus Long
a capital crime.  For a first offense, that is            From the Notebooks of
							  Lazarus Long
From: mgrthh@rosevc.rose-hulman.edu (Thomas H. Hopson)
Newsgroups: comp.os.vms
Subject: Re: command procedure calling
Date: 27 Jan 1993 21:25:50 GMT
Organization: Rose-Hulman Institute of Technology
Distribution: world
Reply-To: mgrthh@rosevc.rose-hulman.edu
NNTP-Posting-Host: hydra.rose-hulman.edu


In article <1k4p20INNjbq@gap.caltech.edu>, carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
>In article <ERMIMWEI.20@er.ele.tue.nl?>, ERMIMWEI@er.ele.tue.nl (Wim Beckers) writes:
>>When a command procedure is called by another command procedure  their is 
>>always a return to the calling command procedure.
>>Is there a possibility to NOT return to the calling procedure?
>
>There's no documented way to exit from the entire stack of DCL procedures in a
>single command.

Try $STOP.

As the help states in one of its examples,


       4.   $ ON ERROR THEN STOP
              .
              .
              .

         In a command procedure, the ON command establishes a default
         action when any error occurs in the execution of a command or
         program. The STOP command stops all command levels. If this ON
         command is executed in a command procedure, which in turn is
         executed from within another procedure, control does not return
         to the outer procedure, but to DCL command level 0.

							- Tom

--
Thomas H. Hopson                      work: mgrthh@rosevc.rose-hulman.edu
VMS Manager / CS geek                       mgrthh@rhit
Rose-Hulman Institute of Technology   play: hopsonth@cs.rose-hulman.edu
Terre Haute, Indiana
Newsgroups: comp.os.vms
From: mdchaney@fractal.ucs.indiana.edu (M Darrin Chaney)
Subject: Re: Tool to reorganize/transform ASCII files
Organization: Indiana University, Bloomington
Date: Thu, 28 Jan 1993 18:27:27 GMT

In article <1993Jan28.142833.7117@bmw.mayo.edu> fisk@mayo.edu writes:
>We are looking for a tool that would allow us to take an ASCII input file, 
>and reorganize/transform it to another format.
>
>The task at hand is taking ASCII data dumps from several different
>medical centers that have similar but different formats and "normalizing" them
>to one common data format that I can import into a database.  I would
>essentially have to take apart the ASCII input records, reorganzie the data,
>possibly do some transformations on the data (i.e., changing all the diagnosis
>codes to a standard list), and write the data out to my common format.  I 
>will then take this common format and import it into my database.
>
>The "perfect" tool would allow me to have a configuration file to drive the
>entire process (since I have to do this for several different formats).
>
>Does anybody know if such a beast exsits?  Does this sound like something 
>that awk/gawk would be capable of handling?
>
>Thanks for your help and suggestions!  Tom.

Well, I was going to suggest gawk, but you've heard about it already.  I'll
suggest it anyway.

While I don't have the gawk source available, you can ftp to my machine
(fractal.ucs.indiana.edu) and grab some sample awk programs there.  I also
have a zipcode database, and the awk programs to fix it up.  You can also
find the gawk manual in tex or ps format there.

>-------------------------------------------------------------------------------
>Thomas B. Fisk          +----------------------------+  Internet: fisk@mayo.edu
>Mayo Clinic             |   If you don't know where  |  Voice: (507) 255-4341
>200 First Street SW     |  you're going you'll never |  FAX: (507) 255-5484
>Mail Stop 2D-337 STM    |         get there.         |
>Rochester, MN  55905    +----------------------------+
>-------------------------------------------------------------------------------

	Darrin
-- 
M Darrin Chaney, Senior Database Programmer, University Computing Services, IU
mdchaney@indiana.edu             1000 E 17th St.             Work: (812)855-5492
mdchaney@iubacs.bitnet           Bloomington, IN 47408       Home: (812)333-6311
"I want- I need- to live, to see it all..."
From: TADJKARIMI@KIDS1.WUSTL.EDU
Newsgroups: comp.os.vms
Subject: SIGNOFF INFO-VAX
Date: 23 Jan 93 23:11:13 GMT
Distribution: world
Organization: The Internet

SIGNOFF INFO-VAX