iDeleteLogical [3] $SSW_SMEI_UCSD/obsolete/for/os/vms/logmod_vms.f
[Previous] [Next]
 NAME:
	iDeleteLogical
 PURPOSE:
	Delete a logical from job or process table
 CALLING SEQUENCE:
	function iDeleteLogical(cNameIn)
 INPUTS:	(read-only)
	cName*(*)	character	name of logical
 OUTPUTS:
	iDeleteLogical	integer		1=success
					0=failure (logical didn't exist or
						   deletion failed)
 CALLS: ***
	LIB$DELETE_LOGICAL, iGetLogical [1], iGetLogical [2], iGetLogical [3], itrim
	uppercase
 CALLED BY:
	SetLog2Dir, mkenv
 INCLUDE:
	include		'($ssdef)'
 PROCEDURE:
   >	PROCESS and JOB tables are searched (in that order)
   >	Deletes logicals with supervisor access mode
 MODIFICATION HISTORY:
	SEP-1992, Paul Hick (UCSD), modeled on TRNLOG


iDeleteSymbol [3] $SSW_SMEI_UCSD/obsolete/for/os/vms/logmod_vms.f
[Previous] [Next]
 NAME:
	iDeleteSymbol
 PURPOSE:
	Delete VMS symbol
 CALLING SEQUENCE:
	function iDeleteSymbol(cName,iTable)
 INPUTS:
	cName		character*(*)
	iTable		integer		1: Local, 2=Global
 OUTPUTS:
	iDeleteSymbol	integer		0: failure; 1=success
 CALLS: ***
	LIB$DELETE_SYMBOL, itrim
 CALLED BY:
	mkenv
 MODIFICATION HISTORY:
	SEP-1992, Paul Hick (UCSD)


iGetLogical [3] $SSW_SMEI_UCSD/obsolete/for/os/vms/logmod_vms.f
[Previous] [Next]
 NAME:
	iGetLogical
 PURPOSE:
	Translate a logical
 CALLING SEQUENCE:
	function iGetLogical(cNameIn,cValue)
 INPUTS:	(read-only)
	cName*(*)	character	name of logical
 OUTPUTS:
	cValue*(*) 	character	translation of logical (= ' ' if the
					logical is not defined)
	iGetLogical	integer		0=Failure, >0=Succes: length cValue
 CALLS: ***
	Say, itrim
 CALLED BY:
	FileSelection, SetLog2Dir, bOSFind [3], bTempFile, iDeleteLogical [3], iFilePath
	iHideLogical, iOSSpawnCmd [3], iSearch [1], iSearch [2], iSearch [3], mkenv
	smei_cal, smei_foreign, smei_frm_path, sprint
 INCLUDE:
	include		'($lnmdef)', include		'($ssdef)'
 RESTRICTIONS:
	The subroutine does not translate user_mode logicals. Don't know why.
 SIDE EFFECTS:
   >	Error status=444 is treated separately: if translation = ' ' the 
	logical was not defined (and control returns to caller); if translation
	<> ' ' the length of the translation  string was too small to hold the
	full translation (cValue = ' ' is returned with iResult=0 after a
	warning is displayed).
 PROCEDURE:
	Uses system procedure SYS$TRNLNM
   >	PROCESS, JOB and SYSTEM tables are searched (in that order)
   >	If the logical is not defined cValue = ' ' is returned
 MODIFICATION HISTORY:
	Originally extracted from the SWING package.
	SEP-1992, Paul Hick (UCSD);
	- changed cName to read_only argument;
	- corrected error in definition of ITEM.item_len


iGetSymbol [3] $SSW_SMEI_UCSD/obsolete/for/os/vms/logmod_vms.f
[Previous] [Next]
 NAME:
	iGetSymbol
 PURPOSE:
	Get VMS symbol
 CALLING SEQUENCE:
	function iGetSymbol(cName,cValue)
 INPUTS:
	cName		character*(*)
 OUTPUTS:
	cValue		character*(*)
	iGetSymbol	integer		0: failure; 1=success
 CALLS: ***
	LIB$GET_SYMBOL, itrim
 CALLED BY:
	Say, bOpenFile, mkenv, sprint
 MODIFICATION HISTORY:
	SEP-1992, Paul Hick (UCSD)


iOpenFile [4] $SSW_SMEI_UCSD/obsolete/for/os/vms/iopen_vms.f
[Previous] [Next]
 NAME:
	iOpenFile
 PURPOSE:
	Open statemenst for direct/sequential, formatted/unformatted files
	(internal use only; called by bOpenFile)
 CALLING SEQUENCE:
	function iOpenFile(iAct,cFile,nRecl)
 INPUTS: (passed from bOpenFile)
	iAct		integer		code passed from bOpenFile
	cFile		character*(*)	fully qualified file name
	nRecl		integer		record length in 4-byte longwords
					(not always used; see PROCEDURE)
 OUTPUTS:
	iOpenFile	integer		logical unit number assigned by iGetLun
					(=FIL__NOUNIT is open was unsuccessful)
	nRecl		integer		on success, record length in longwords
					on failure, input value is retained
 CALLED BY:
	bOpenFile
 INCLUDE:
	include		'dirspec [1].h'
	include		'dirspec [2].h'
	include		'dirspec [3].h'
	include		'dirspec [4].h'
	include		'openfile.h'
 CALLS: ***
	Say, bGetLun, cInt2Str, iFreeLun
 PROCEDURE:
	Isolates the Fortran open statements needed by bOpenFile.

	If a file is opened for direct access on an Intel PC, then the record length
	must be explicitly added to the open statement. This is not needed on a VMS
	computer. If an 'inquire by filename' is done on VMS then the record length
	is returned in bytes. On Intel either 0 (MS-Fortran) is returned, or the
	record length is not filled at all (i.e. the input value is retained; Absoft
	Fortran).

	For the HELIOS files it is possible to determine the record length from the
	file content (done by HOSInquire).

	On VMS the record length is determined by an 'inquire by file name'
	For HELIOS files the record length is determined by HOSInquire

	VMS:
	In the open command the record length should be specified in bytes for
	formatted access and in words for unformatted access.
 WARNING:
	Do not add a call to iSearch to this function to check for the existence
	of cFile. This may interfere with a wildcard search using iSearch in progress
	in the calling procedure.
 MODIFICATION HISTORY:
	DEC-1995, Paul Hick (UCSD)


iOSCopyFile [4] $SSW_SMEI_UCSD/obsolete/for/os/vms/os_vms.f
[Previous] [Next]
 NAME:
	iOSCopyFile
 PURPOSE:
	Copies a file
 CATEGORY:
	Machine-dependent functions: Win-NT, Linux, Unix
 CALLING SEQUENCE:
	function iOSCopyFile(cFile1,cFile2)
 INPUTS:
	cFile1		character*(*)	file to be copied
	cFile2		character*(*)	new file name
 OUTPUTS:
	iOSCopyFile	integer		0: copy failed
					1: copy successful
 CALLS: ***
	CONV$CONVERT, CONV$PASS_FILES, CONV$PASS_OPTIONS
 PROCEDURE:
	Calls system functions conv$pass_files, conv$pass_options, conv$convert
 MODIFICATION HISTORY:
	SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu); Added documentation


iOSDeleteFile [4] $SSW_SMEI_UCSD/obsolete/for/os/vms/os_vms.f
[Previous] [Next]
 NAME:
	iOSDeleteFile
 PURPOSE:
	Delete a file
 CATEGORY:
	Machine-dependent functions: WIN-NT, Linux, Unix
 CALLING SEQUENCE:
	function iOSDeleteFile(cFile)
 INPUTS:
	cFile		character*(*)	file to be deleted
 OUTPUTS:
	iOSDeleteFile	integer		0: delete failed
					1: delete successful
 CALLS: ***
	LIB$DELETE_FILE
 CALLED BY:
	LogModFile, bOSFind [1], bOSFind [2], bOSFind [3], bOSFindClose, smei_base, smei_cal
	smei_frm_fts, smei_frm_write, smei_orb_write, smei_skyd, smei_skyd_fts
	smei_skyd_init, smei_skyd_make, smei_skyd_sky, sprint
 PROCEDURE:
	Input is passed unmodified to system function lib$delete_file.
	Return status is determined from lib$delete_file exit status.
 MODIFICATION HISTORY:
	SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu); Added documentation


iOSGetForeign [4] $SSW_SMEI_UCSD/obsolete/for/os/vms/os_vms.f
[Previous] [Next]
 NAME:
	iOSGetForeign
 CATEGORY:
	Machine-dependent functions: VMS
 PURPOSE:
	Get command line arguments as single string
 CALLING SEQUENCE:
	function iOSGetForeign(L,cStr)
 INPUTS:
	(none)
 OUTPUTS:
	cStr		character*(*)	command line string
	L		integer		useful length of cStr (=itrim(cStr))
	iOSGetForeign	integer		0: no command line string (--> L=0)
					1: command line string present (L > 0)
 CALLED BY:
	ForeignArg, ForeignInput
 PROCEDURE:
	Calls system function lib$get_foreign
 MODIFICATION HISTORY:
	SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu); Added documentation


iOSRenameFile [4] $SSW_SMEI_UCSD/obsolete/for/os/vms/os_vms.f
[Previous] [Next]
 NAME:
	iOSRenameFile
 PURPOSE:
	Rename a file
 CATEGORY:
	Machine-dependent functions: WIN-NT
 CALLING SEQUENCE:
	function iOSRenameFile(cFile1,cFile2)
 INPUTS:
	cFile1		character*(*)	file to be renamed
	cFile2		character*(*)	new file name
 OUTPUTS:
	iOSRenameFile	integer		0: rename failed
					1: rename successful
 CALLS: ***
	LIB$RENAME_FILE
 CALLED BY:
	LogModFile, bTempFile, sprint
 PROCEDURE:
	Input is passed unmodified to system function lib$rename_file.
	Return status is determined from lib$rename_file exit status.
 MODIFICATION HISTORY:
	SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu); Added documentation


iOSSetDirectory [4] $SSW_SMEI_UCSD/obsolete/for/os/vms/os_vms.f
[Previous] [Next]
 NAME:
	iOSSetDirectory
 PURPOSE:
	Change to a new working directory
 CATEGORY:
	Machine-dependent functions: VMS
 CALLING SEQUENCE:
	function iOSSetDirectory(cDir)
 INPUTS:
	cDir	character*(*)	(incomplete) directory name
 OUTPUTS:
	iOSSetDirectory
		integer		0: change of directory failed
				1: change of directory successful
 CALLS: ***
	Say, iGetFileSpec, iSetFileSpec, iSetLogical [1], iSetLogical [2], iSetLogical [3]
 CALLED BY:
	iSetDefaultDir
 INCLUDE:
	include		'filparts.h'
 RESTRICTIONS:
	Do NOT call this function directly. Use iSetDefaultDir..
 PROCEDURE:
	Calls system function sys$setddir
	Sets node, drive and directory
 MODIFICATION HISTORY:
	SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu); Added documentation


iOSSpawnCmd [4] $SSW_SMEI_UCSD/obsolete/for/os/vms/os_vms.f
[Previous] [Next]
 NAME:
	iOSSpawnCmd
 PURPOSE:
	Execute a single shell command
 CATEGORY:
	Machine-dependent functions: VMS
 CALLING SEQUENCE:
	function iOSSpawnCmd(Cmd,iNoWait)
 INPUTS:
	Cmd		character*(*)	DCL shell command
	iNoWait		integer		if iNoWait > 0 then the calling program will not
					wait for the lib$spawn to exit.
 OUTPUTS:
	iOSSpawnCmd	integer		0: error executing command
					1: command executed succesully
 CALLS: ***
	LIB$SPAWN, itrim
 CALLED BY:
	bOSFind [1], bOSFind [2], bOSFind [3], bOSFindClose, iGetLogical [1], iOSgunzip
	smei_cal_write, smei_frm_write, smei_orb, sprint
 PROCEDURE:
	Calls system function lib$spawn.
	The error status is determined from the return value of the lib$spawn call.
 MODIFICATION HISTORY:
	SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu); Added documentation


iSearch [4] $SSW_SMEI_UCSD/obsolete/for/os/vms/isearch_vms.f
[Previous] [Next]
 NAME:
	iSearch
 PURPOSE:
	Search for file based on file name specification
 CALLING SEQUENCE:
	integer function iSearch(jFIRST,cSearch,cFound)
 INPUTS:
	jFirst	integer		=1 on 1st call (set up for subsequent searches)
				=0 on subsequent calls
				Add 10 to iFirst to suppress the error message
				when no file is found
				Add 100 if you want to test for parsing errors only
	cSearch character*(*)	File specification to search for
 OUTPUTS:
	cFound  character*(*)	File specification of located file
				= ' ' if no file is found
	iSearch	integer*4	0 : file not found
				1 : file found
				2 : error parsing cSearch (probably typo)
 CALLS: ***
	SYS$PARSE, SYS$SEARCH, Say, iSetFileSpec
 CALLED BY:
	FileInfo [1], FileInfo [2], SetLog2Dir, SetRotations, bAskChar, bOpenFile, iAskChar
	iCheckDirectory, iOSCopyFile [1], iOSCopyFile [2], iOSCopyFile [3], iSearchTree
	jpl_close, jpl_init, jpl_state, rice, smei_cal, smei_cal_get, smei_cal_init
	smei_foreign, smei_frm_getfirst, smei_frm_getnext, smei_orb_get, smei_skyd_fts
	smei_skyd_go, smei_skyd_init, smei_skyd_make, smei_skyd_sky, sprint
 INCLUDE:
	include '($fabdef)', include '($namdef)', include '($rmsdef)'
 RESTRICTIONS:
 >	The length of cSearch is stored in a byte and should not be larger than
	127
 >	When a file on a foreign host is tested, the parsing apparently does
	not include a test for directory existence, e.g.
		CASSX1::DUA2:[NODIR]
	will return iSearch=0, EVEN IF THE DIRECTORY DOES NOT EXIST !!!!!
	(for a local directory iSearch=2 for a non-existing directory).
	To check whether a directory exists on a foreign host, one should
	test for the existence of the directory file: in the above example
	a test for CASSX1::DUA2:[000000]NODIR.DIR would return 0 or 1 for
	non-existing or existing directory, respectively.
 PROCEDURE:
 >	Negative JFIRST values are used by the MS-DOS version of iSearch to
	distinguish between a search for a directory or a regular file.
	Since this is not needed for the VAX, negative JFIRST values are treated
	the same as the opposite (positive) value.
 >	Scans a directory for files based on a specified search string
	(wild cards permitted) and returns successive matching file
	specifications. When no match is found, the returned specification is blank.
	If the input is to checked for parsing, a valid cFound is returned
	even if it does not exist.
	The RMS system services SYS$PARSE and SYS$SEARCH are called, which
	requires setting FAB and NAM blocks
 MODIFICATION HISTORY:
	KIM TOLBERT         3/1/86
	OCT-1992, Paul Hick: added option to suppress error message


iSetLogical [3] $SSW_SMEI_UCSD/obsolete/for/os/vms/logmod_vms.f
[Previous] [Next]
 NAME:
	iSetLogical
 PURPOSE:
	(Re)defines a logical
 CALLING SEQUENCE:
	function iSetLogical(cNameIn,cValueIn,cTableIn)
 INPUTS:	(read-only)
	cName		character*(*)	name of logical
	cValue		character*(*)	value to be assigned to logical
	cTable		character*(*)	indicates logical name table
		If first character is 'j' or 'J' the logical is entered into 
		the JOB table; otherwise into the PROCESS table.
 OUTPUTS:
	iSetLogical	integer		0=failure; 1=success

	Logical cName is created or redefined
 CALLS: ***
	LIB$SET_LOGICAL, itrim, uppercase
 CALLED BY:
	SetLog2Dir, iOSSetDirectory [4], mkenv
 PROCEDURE:
    >  if itrim(cName)=0 or itrim(cValue)=0 then iResult=0 is returned
    >	The logical is entered in the specified table. Only the first 
	character of TABLE is tested. If it is not 'J' or 'j' the logical is
	entered into the process table
    >	Logical are created in supervisor access mode (which is the default
	for the DCL assign/define commands)
    >	See TRNLOG and DELLOG for translating and undefining logicals
 MODIFICATION HISTORY:
	SEP-1992, Paul Hick (UCSD), modelled on TRNLOG


iSetSymbol [3] $SSW_SMEI_UCSD/obsolete/for/os/vms/logmod_vms.f
[Previous] [Next]
 NAME:
	iSetSymbol
 PURPOSE:
	Set VMS symbol
 CALLING SEQUENCE:
	function iSetSymbol(cName,cValue,iTable)
 INPUTS:
	cName		character*(*)
	cValue		character*(*)
	iTable		integer		1: Local, 2=Global
 OUTPUTS:
	iSetSymbol	integer		0: failure; 1=success
 CALLED BY:
	bOpenFile, mkenv
 INCLUDE:
	include		'vaxdescr.h'
 CALLS: ***
	GETDESCR, LIB$SET_SYMBOL, REF, itrim
 MODIFICATION HISTORY:
	SEP-1992, Paul Hick (UCSD)