Path: utzoo!utgpu!watmath!clyde!att!rutgers!gatech!mcnc!duke!dukempd!fang
From: fang@dukempd.phy.duke.edu (Fang Zhong)
Newsgroups: comp.sys.mac.programmer
Subject: PBSetVol
Keywords: Help needed to get this call to work
Message-ID: <751@dukempd.phy.duke.edu>
Date: 3 Dec 88 06:49:21 GMT
Organization: Duke University Physics Dept.; Durham, N.C.
Lines: 43


	I am learning how to make the standard file calls to work with
MPW Fortran by Language Systems.
	After calling SFGetFile or SFPutFile, I realized that I have to
use PBSetVol to stay in the folder.  I translated the sample of stdfil
in MacFortran into MPW Fortran.  The package worked.  However, if I print
something on screen before SFGetFile or SFPutFile, the package worked
utill PBSetVol was called.  I got error message from MacsBug like this:

Addr ERR001E498D
780026: 636B 3A205061		BLS.S  *+$006D;		3B780093

My codes regarded to PBSetVol are as following.

	STRUCTURE /Parameter/
		integer*4 iolink
		integer*2 iotype
		integer*2 iotrap
		integer*4 iocmdaddr
		integer*4 iocompletion
		integer*2 ioresult
		integer*4 ionameptr
		integer*2 iovrefnum
		integer*4 iojunk
		integer*2 iovolindex
	END STRUCTURE
	RECORD /Parameter/ params

	logical*2 async	
	integer*2 OSError

	  params.iovolindex = 0
	  params.iovrefnum = reply.vrefnum
	  params.ionameptr = 0
	  asnyc=.false.
	  OSError=PBSetVol(%ref(params),%val(async))

Can anyone point out to me where I am wrong?  I would like to add this
wonderful feature of file management to other Fortran programs used to
run on Harris computer.
	Thanks in advance.

						Fang