HDTenEightyP/NetNews huggingface dataset:
From: dspencer@chsra2.chsra.wisc.edu
Newsgroups: comp.os.vms
Subject: Re: Using C to read Fortran File
Date: 7 Jan 93 14:23:49 GMT
Reply-To: spencer@macc.wisc.edu
Organization: CHSRA/UW-MADISON, MADISON, WI

In article <C0G1rw.81L@ccu.umanitoba.ca>, kaarts@ccu.umanitoba.ca (Kenneth John Aarts) writes:
>In <C0Fyo3.70D@ccu.umanitoba.ca> kaarts@ccu.umanitoba.ca (Kenneth John Aarts) writes:
>
>
>>I have a fortran program that does essentially
>
>>	open(unit=1,"test",status='new')
>>	write(1,10) 'cArt'
>>10	format(a4)
>>	end
>
>>and then a C program that reads it:
>
>>	int d1,d2,d3,d4,d5;
>>	FILE *fp;
>>	fp=fopen("test","r");
>>	fscanf(fp,"%c%c%c%c%c",&d1,&d2,&d3,&d4,&d5);
>>	printf("%d %d %d %d %d\n",d1,d2,d3,d4,d5);
>
>>The output of the C program is:
>
>>  10  65  114  116   13
>
>>  LF  A    r   t    CR
>
>>However, a fortran program reading the test program does see cArt.
>
>>How do I get C to find the c in cArt?
>
>A little more information:
>
>This is all done on VMS.  The fortran created file has a 'fortran carriage
>control' record attribute.

change the "r" fopen attribute to "rb".  The file Fortran writes out in this
case has the RMS file attributes 
RMS FILE ATTRIBUTES

        File Organization: sequential
        Record Format: variable
        Record Attributes:   fortran
        Maximum Record Size: 0
        Longest Record: 4
        Blocks Allocated: 4, Default Extend Size: 0
        End-of-File VBN: 1, Offset: %X'0006'
        File Monitoring: disabled
        Global Buffer Count: 0

Telling VAXC to do a read binary appears to override the interpretation of the
'fortran' record attribute, and I get the following output

99 65 114 116 0

-----------------------------------------------
Dan Spencer         spencer@vms.macc.wisc.edu
Center for Health Systems Research and Analysis
UW-Madison
From: leichter@lrw.com (Jerry Leichter)
Newsgroups: comp.os.vms
Subject: RE: 'ASSUME' macro in VAXC?
Date: 11 Jan 93 14:21:11 GMT
Distribution: world
Organization: The Internet


	Does anybody know any way of implementing compile-time checking in
	VAXC  similar to the ASSUME macro defined in LIB.MLB (or is it
	STARLET?)?

Here as example taken from one of my programs:
#define MAXPROCBITS	10	/* Bits set aside to hold process number */
#define MAXPROC         64	/* Maximum number of processes		 */

#if (MAXPROC > (1 << MAXPROCBITS))
#include ">>> MAXPROC set too large <<<"
#endif

The #include will fail - I know of no system which will accept that particular
string as a valid file name - and typically C compilers will tell you what
file they couldn't open.

Many C compilers, and all ANSI C conformant compilers, support a #error
directive, which provides a standard way to do the same thing.  (Compilers
that DON'T support #error will, of course, also produce and error message,
but it may not include the rest of the line.)

	What I want to check for specifically is that the size of a certain
	struct is equal to 512 bytes and if not, print a warning message.

	Say:  check sizeof(struct foo) "Error: foo is the wrong size"

Unfortunately, there's no way to do this at compile time.  The only compile-
time checking you can do is in pre-processing directives, and because of the
way the first Unix C compilers were designed - with a stand-alone pre-proces-
sor - the pre-processors cannot be assumed to have access to information
that may be machine-dependent, or even compilation-mode dependent.  The sizes
of different objects are, unfortunately, examples of this kind of information.

The best you can do is use the (ANSI standard, widely available) assert()
macro, defined in assert.h.  This will result in a run-time error message,
rather than a compile-time error message, but if the test involved can
actually be resolved by the compiler (as would be the case if you were
simply comparing the size of some object to a constant) the test and the code
to print an error message should be removed as part of dead code elimination.

Hint to compiler writers:  If the compiler can prove that assert() WILL
produce an error message, how about printing it at compile time, at least as
an option?

	I don't really mind how kludgy the solution would have to be, as long
	as it works.


The same system that includes the code I showed above has the following code
as part of its startup sequence:

#define NOTQUAD(x) (((int)(x) & 7) != 0)
		if (NOTQUAD(sizeof(INBLOCK))
		 || NOTQUAD(sizeof(SYNC_QLM))
		 || NOTQUAD(&Common->freeib)
		 || NOTQUAD(&Common->buckets[0])
		 || NOTQUAD(&Common->ib[0])
		 || NOTQUAD(CS_R2A(Common->freeQ))
                   )
                        BUGCHECK("Common section data not aligned")

Messy, but about the best you can do.  At least this way, if there's a problem
the code falls over very early on, in a known way, rather than at some random
time during execution when some data object that has to be quadword aligned
turns out not to be.
							-- Jerry

Newsgroups: comp.os.vms
From: lionel@quark.enet.dec.com (Steve Lionel)
Subject: re: Re: Running LOGINOUT [SYS$CLI]
Reply-To: lionel@quark.enet.dec.com (Steve Lionel)
Organization: Digital Equipment Corporation, Nashua NH
Date: Thu, 7 Jan 1993 18:21:11 GMT


Regarding the issue of whether or not it is "supported" to run LOGINOUT.EXE
to start a process with a CLI, I have a meeting with the writer of the
VMS System Services Reference Manual later this afternoon to go over just what
needs to be added to the $CREPRC description to make it clear that this IS
supported.  I note that the $CREPRC description already has a lot more mention
of LOGINOUT than does the DCL manual (I hadn't found it because it wasn't
listed in the master index under LOGINOUT), in particular it says:

	"... This is so because SYS$SYSTEM:LOGINOUT.EXE causes a
	command interpreter to be mapped into the created process..."
		("Description" section of $CREPRC documentation)

What's missing is a blunt statement that "If you wish the created process to
be running a CLI, specify SYS$SYSTEM:LOGINOUT.EXE as the image name."  There
also needs to be some text as to what CLI gets used.  I'll make sure that
what needs to be said is said.  (Or, as Capt. Picard might say, "Make it so.")

On the general subject of inadequate explanations in the manuals, I received a
mail inquiry as to what was the most effective way of getting requests and
comments to the appropriate DEC manual writers, and I thought that everyone
would benefit from the response.

In the back of every Digital manual is a postpaid "Reader's Comment" form.
(Actually, most manuals have two.)  Find the one in the back of the relevant
manual, fill it out and send it in.  These get delivered directly to the
writers for that manual, and believe me, they LOVE to get these forms and
will jump at the chance to make any improvements that are feasible.  Do take
care that you use the "correct" form, as the addresses vary and they are coded
to indicate the specific manual.

One thing we're starting to do, in addition, is include special Internet
addresses in the manuals for reader comments - I'm told that these appear
in the manuals for some Alpha AXP products and will also start showing up
elsewhere.  This will be helpful for those without the paper manuals and also
for those outside the US (for whom the postpaid nature of the forms isn't
useful.)
--

Steve Lionel                    lionel@quark.enet.dec.com
SDT Languages Group
Digital Equipment Corporation
110 Spit Brook Road
Nashua, NH 03062
From: Chris_F_Chiesa@cup.portal.com
Newsgroups: comp.os.vms
Subject: Re: Question: Reading keys with command procedures.
Date: Wed,  6 Jan 93 18:27:19 PST
Organization: The Portal System (TM)
Distribution: world

David Gitlin (dgitlin@jeflin.tju.edu) writes:

>Is there any way to get a command
>procedure to read a single key stroke without the user having to hit
>enter/return. This would be useful under several conditions. Also can you read
>arrow keys under DCL command procedures. [...] 
>
>(P.S. I know you can do this easily via any programing language like Macro, 
>C, etc I want to know if it can be done strictly from DCL command procedures.)

Strictly speaking, NO.  There's no native "get a raw keystroke" verb in
DCL.  

It's easy to implement your own, though -- as you have already noted, it's 
easy to "get a keystroke" in any compilable language, and it's also easy to 
assign the obtained keystroke (I recommend VAX BASIC if you have it, because 
its INKEY$ function implicitly parses the function keys for you and returns 
strings such as "UP" for the up-arrow, "DOWN" for the down-arrow, etc. (as
distinguished from you typing D,O,W,N, which would generate a "D" the first
time you called INKEY$, an "O" the second time, etc., e.g.) to a DCL symbol.

   (I've implemented a GETKEY verb any number of times; hasn't everybody?
:-)  I even went to the extreme of implementing a system of menus with a 
keystroke-controlled, SMG$-style highlight cursor, in DCL with a homegrown
GETKEY verb - but I don't recommend it, as it was too slow-responding to be
practical...  And before anyone asks, no, I no longer have this code.  I'd
hand it out if I had it, but I don't.)

  Chris Chiesa
    Chris_F_Chiesa@cup.portal.com 
Newsgroups: comp.os.vms
From: ecf_stbo@jhuvms.hcf.jhu.edu (Remember Grimalkin)
Subject: Re: HELP!!! Security problem for gurus. [Directories]
News-Software: VAX/VMS VNEWS 1.41    
Organization: The Johns Hopkins University - HCF
Date: Mon, 4 Jan 1993 15:39:00 GMT

In article <1i904kINNdbj@gap.caltech.edu>, carl@SOL1.GPS.CALTECH.EDU writes...
>Well, I don't have the listings at hand, but, let's suppose:  RMS gets damaged
>in such a way that when JOE_USER logs in, when RMS looks up the rightslist
>identifiers he holds (part of loginout), it misreads RIGHTSLIST.DAT in such a
>way as to assign him an identifier we'd created to allow someone to modify,
>say, SYSTARTUP_V5.COM?  

RMS would call the XQP would do rightslist and other protection checking. You
can't bypass ACL checking by doing file i/o with $qio. I would be more worried
about its handling of global buffers, if you want to talk about how a hosed RMS
used by one user could affect the whole system. I realize this is picky, but
what the hell.

Tom O'Toole - ecf_stbo@jhuvms.hcf.jhu.edu - JHUVMS system programmer 
Homewood Computing Facilities, Johns Hopkins University, Balto. Md. 21218 
>Here comes a jet ski.
>weuh weeuhh weeuhh weeuhh WEEUHH WEEUHH WEEUHH WEEUHH weeuhh weeuhh weeuhh weuh
Newsgroups: comp.os.vms
From: abstine@toy4x4.visix.com (Art Stine)
Subject: need ANSI C compiler for VMS (GCC?)
Date: Sat, 9 Jan 1993 05:26:18 GMT
Reply-To: abstine@visix.com
Organization: Visix Software Inc.
Followup-To: abstine@visix.com


I need to find a decent ANSI C compliant compiler for VMS (VAX for now).
I've tried to get ahold of GCC 2.x.x, but its been taken off the net
and noone seems to have it available for anon ftp. Can anyone who either
has it put it out for anon ftp or can someone recommend a better
alternative compiler?

thanks much

art stine
software engineer
visix software inc

abstine@visix.com
From: 00mjstum@leo.bsuvc.bsu.edu (Matthew J. Stum)
Newsgroups: comp.os.vms
Subject: Re: DECwindows and the Starship Enterprise
Date: 8 Jan 93 16:54:56 GMT
Organization: Widget Enterprises

ritley@uimrl7.mrl.uiuc.edu writes:
> 
> 
> In Kevin Barkes' "DCL Dialogue" column in this month's
> DECprofessional magazine, he indicates that by changing the
> value of sm.pointer_shape to -142, in the file
> DECW$SM_GENERAL.DAT, the DECwindows pointer
> will be changed to an outline of the "starship Enterprise".
> 
> This seems to work.
> 
> Is there somewhere a list of accepted pointer types??????
> Possibly other arrow styles????

I saw a similar reference quite awhile ago (months) but had _just_ switched
to Motif and, alas, the table of values given didn't work.  I assume this is
a DECwindows thing only, not Motif.  Or is it?  Any way I can access this
alternate list of pointer shapes from Motif?

Thanx...

-- 
Matt Stum                    Gwydion ap Myrddin       Ball State University
00mjstum@leo.bsuvc.bsu.edu   Shire of Afonlyn, MK     Muncie, IN  USA
From: music@reg.triumf.ca (FRED W. BACH)
Newsgroups: comp.os.vms
Subject: Re: The VAX Vacuum
Date: 6 Jan 1993 17:09 PST
Organization: TRIUMF: Tri-University Meson Facility
Distribution: world
NNTP-Posting-Host: reg.triumf.ca
News-Software: VAX/VMS VNEWS 1.41    

In article <1993Jan4.093548.1@bronco.fnal.gov>, colombo@bronco.fnal.gov writes...
#In article <9301040153.AA20250@ucbvax.Berkeley.EDU>, FZC@CU.NIH.GOV ("Paul Robinson, Contractor") writes:
# 
#> The issue of the VAX vacuum vs. VAX computers and the
#> trademark isn't significant except to the extent Digital
#> might have wanted to sell their computer in the same
#> countries as that other company had been selling vacuums.
#> 
#I think the vacuum company has promised not to make computers and
#DEC promised not to make anything that sucks.  :-)

    Well, then I suppose the 2000 is going to get them sued. ;-)

# *****  *   *  From the e-net desk of: Rick Colombo CD/DCD/DSG    *    *
# *      **  *  Fermi Nat'l Acc'l Lab   708-840-8225 Fermilab     * *   *

 Fred W. Bach ,    Operations Group        |  Internet: music@erich.triumf.ca
 TRIUMF (TRI-University Meson Facility)    |  Voice:  604-222-1047 loc 327/278
 4004 WESBROOK MALL, UBC CAMPUS            |  FAX:    604-222-1074
 University of British Columbia, Vancouver, B.C., CANADA   V6T 2A3

 These are my opinions, which should ONLY make you read, think, and question.
 They do NOT necessarily reflect the views of my employer or fellow workers.
From: harvey@indyvax.iupui.edu
Newsgroups: comp.os.vms
Subject: Re: PASSWORDS & SCHEMES
Date: 8 Jan 93 20:33:09 -0500
Distribution: world
Organization: Indiana University-Purdue University at Indianapolis

In article <01GT8W0T1GO2006MJF@VAXF.COLORADO.EDU>, DWING@UH01.Colorado.EDU (Dan Wing) writes:
> Jon Baker, SYSTEM_JB@UNODE1.NSWC.NAVY.MIL, writes:
>[Jon wants to implement a site-specific password policy]
>>[Dan describes the hooks for this in VMS, and then goes on to say...]
>
> Using the site-specific policy, you can require that special characters such
> as @, #, $, %, &, etc., be present in the password string.  It also captures
> the plaintext password -- I hope it goes without saying, but DON'T STORE
> THIS ANYWHERE!

Some of these characters would be rather distasteful to the SET PASSWORD
command.  Only letters, digits, dollar-signs and underscores are allowed.
--
James Harvey    IUPUI/OIT Technical Support/VMS & Networks
harvey@iupui.edu  harvey@indiana.edu  uucp:iugate!harvey  bitnet:harvey@indyvax
Think...   Thank...   Thunk!!!
From: steve@dbaccess.com (Steve Suttles)
Newsgroups: comp.os.vms
Subject: Re: local printing out of detached process
Date: 12 Jan 93 22:23:07 GMT
Organization: Cross Access Corp., Santa Clara, CA
X-Newsreader: Tin 1.1 PL4

[ Plaint for "make it not hang" omitted ]

: It seems that my original posting wasn't clear enough:
: 
: 	PRT is an image which allows you to print on the local printer,
: 	which is assigned to your terminal.
: 
: 	PRINT doesn't solve the problem because it seems that the local
: 	printers are not accessible this way.
: 
: 	If you put the  sequence "mc prt type *.txt" into a batchfile 
: 	(abc.com) and make a submit abc.com, it doesn't work either;
: 	probably because the execution of the batchfile isn't to the
: 	terminal the local printer is assigned to.
: 
: 	Spawn/nowait mc prt type *.txt also doesn't help for though
: 	I get back to the $-prompt I can't work on: no typing is
: 	recognized. So it seems to me that the parent process is
: 	halted till completion of the subprocess.
: 
: 	Is there a solution to this problem? 

Yes.  But you won't like it.

The "problem" is that "local printer" means it is plugged into the back
of your terminal.  Correct me if I'm wrong.  You are sending escape codes
to the terminal to have it print stuff.  Your communications line is busy.

It can be arranged that the output is sent to the printer without tying up the
root process, but the resulting interleaving of your "printout" with the
prompts and your command echo will turn your printout into mishmash.  Your
spawn/nowait is probably echoing your commands, but the echo is probably being
printed.  (check it and see).

What you require is a different path to the printer than you use for commands.
VMS doesn't support the logical channeling that would be required, so you are
stuck with a dedicated serial interface or a parallel printer (with a dedicated
interface).  IMHO, this is the "Right" choice anyways, because you can
establish a queue for either kind of printer and make it truly asynchronous.
But this might not be right for you, depending largely on port availability.
And it means rewiring your office, which is something everyone is anxious to
avoid.

sas
-- 
Steve Suttles                Internet:  steve@dbaccess.com      Dr. DCL is IN!
CROSS ACCESS Corporation     UUCP: {uunet,sgiblab}!troi!steve  Yo speako TECO!
2900 Gordon Ave, Suite 100   fax: (408) 735-0328              Talk data to me!
Santa Clara, CA 95051-0718   vox: (408) 735-7545   HA! It's under 4 lines NOW!
From: david@ittpub.nl (David P. Morgan)
Newsgroups: comp.os.vms
Subject: Re: How to mount ISO and HSG CD-ROM's on (Open)VMS?
Date: 11 Jan 93 18:00:48 WET+0100
Organization: ITT Publitec R+D BV, Amsterdam

In article <7BO0SNI@netmbx.netmbx.de>, weis@netmbx.netmbx.de (Dietmar Weis) writes:
> In Ultrix you have to specify a kernel option and a pseudo-device
> in order to mount those CD's. But how can I do it on VAX/VMS and
> AXP/OpenVMS?
> MOUNT/FOREIGN of course does not work.

There's DECUS software for reading ISO 9660 CD's but it doesn't mount them.
If you have an InfoServer and software called F11CD (?) you CAN mount. Or
you can wait until VMS V6.0 when you type $ MOUNT/MEDIA=CDROM

--------------------------------------------------------------------------------
David P. Morgan                        Internet: david@ittpub.nl        |ucannot
ITT Publitec R+D BV                    UUCP:     ...!sun4nl!ittpub!david|readdis
Amsterdam                              PSI:      020412905761212::DAVID |onavt52
From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
Newsgroups: comp.os.vms
Subject: Re: Question of SYSGEN.....
Date: 9 Jan 1993 13:20:10 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 <1ima9cINNg7a@gap.caltech.edu>, carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
>Of course, I could've told him:
>	1)  Do a conversational boot;
>	2)  At the SYSBOOT> prompt, issue the commands:
>		SYSBOOT>SET/DEFAULT
>		SYSBOOT>CONTINUE

Sorry, my mistake.  I means USE DEFAULT, not SET/DEFALT.  Sorry about that.
--------------------------------------------------------------------------------
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.
Newsgroups: comp.os.vms
Subject: Re: SYSDUMP.DMP File Question...
From: don@zl2tnm.gen.nz (Don Stokes)
Date: 12 Jan 93 06:52:26 GMT
Distribution: world
Organization: The Wolery

carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
> Well, if you look *DOWN* and to the right (OK, maybe you've got to look pretty
> far to the right), you'll find something called the Ross Dependency.  Take a
> look at who's in charge of that area sometime.

New Zealand, actually.  What was your point again?  8-)

--
Don Stokes, ZL2TNM (DS555)                        don@zl2tnm.gen.nz (home)
Network Manager, Computing Services Centre            don@vuw.ac.nz (work)
Victoria University of Wellington, New Zealand              +64-4-495-5052
Xref: sparky comp.os.vms:20640 comp.sys.dec:6775
From: lakia@ipact.com
Newsgroups: comp.os.vms,comp.sys.dec
Subject: RUNOFF to Microsoft WORD document conversions
Date: 8 Jan 93 08:41:29 CDT
Organization: IPACT, Valparaiso IN

Dear Net-
	We and our customers  have a wealth of
documentation in VAX/VMS  RUNOFF and want to port it to
MicroSoft Word format on PCs.  We've written some Word
Macros to take a 60% pass at the RUNOFF file but was
wondering if anyone else has a more complete set of Macros.
We are awaiting our "Word Macro Manual" (mailed request
today) to try and complete this effort. 
	If Microsoft Word Folks are out there on the net,
any response? 
		-Earl

Earl Lakia			Email:  LAKIA@IPACT.COM
IPACT Inc.			Voice:  219-464-7212
260 South Campbell		FAX:    219-462-5387
Valparaiso, IN   46383
From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
Newsgroups: comp.os.vms
Subject: Re: Starting remote process over Decnet?
Date: 9 Jan 1993 13:23:18 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 <lkjpfvINN6r6@news.bbn.com>, brosen@BBN.COM (Bruce L. Rosen) writes:
>Is there some system service that supports starting a process on a different,
>but DECnet connected, VMS machine?  It would be something like a LIB$SPAWN,
>but would take hostname, userid, and password, as necessary arguments.
>
>What I'm looking for is a DECnet equivalent of the TCP/IP "rexec" system call.
>
>Is there such a thing?

Yes.  It's called DECnet TASK-TO-TASK communications, and is documented in the
NETWORKING manual.  You specify the task as:
	node"username password"::TASK=objectname
For security reasons, these days the object will generally have to be made
known to DECnet (via the SET OBJECT command of NCP).
--------------------------------------------------------------------------------
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.
Newsgroups: comp.os.vms