OpenVMS Source Code Demos

VMS_STRUCTURES.INC

!
!23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
!        1         2         3         4         5         6         7         8         9
!=========================================================================================
! Title  : VMS_Structures.inc
! Author : Neil S. Rieck
! History:
! 100 NSR 000208 1. original work (from "[.inc]VMS_externals.inc")
!     NSR 001222 5. made the declaration of ItemRec identical to SysItems
!=========================================================================================
!
!	/// Item Record for system calls ///
!
%if %declared (%ITEMREC) = 0 %then
	record ItemRec								! structure of item record
	    variant
		case
		    group one
			word	BuffLen
			word	ItemCode
			long	BuffAddr
			long	RtnLenAdr
		    end group one
		case
		    group two
			long	List_Terminator
			long	Junk1
			long	Junk2
		    end group two
	    end variant
	end record ItemRec
%let %ITEMREC = 1
%end %if
!
!	/// Item Record for system calls ///
!
%if %declared (%SYSITEMS) = 0 %then
	record SysItems								! structure of item record
	    variant
		case
		    group one
			word	BuffLen
			word	ItemCode
			long	BuffAddr
			long	RtnLenAdr
		    end group one
		case
		    group two
			long	List_Terminator
			long	Junk1
			long	Junk2
		    end group two
	    end variant
	end record SysItems
%let %SYSITEMS = 1
%end %if
!
!	/// I/O Status Block	///
!
%if %declared (%IOSBREC) = 0 %then
	record IosbRec								! structure of I/O Status Block
	    variant
		case
		    group one							! this variation is used with I/O transfers
			word		rc					! return code
			word		xfer_count				! transfer count
			long		long_0					! device specific info
		    end group one
		case
		    group two							! this variation is used to satisfy the compiler
			basic$quadword	quad_0					! unsigned quad (system calls)
		    end group two
		case
		    group three							! this variation is used in $SNDJBC + $SNDJBCW
			long		job_status				! job status
			long		long_3					! device specific info
		    end group three
	    end variant
	end record IosbRec
%let %IOSBREC = 1
%end %if
!
!	/// Terminator Descriptor Block (for qio_read) ///
!
%if %declared (%TDB_REC) = 0 %then
	record TDB_Rec								! terminator descriptor block
		long	mask_type						! mask type
		long	mask							! character bit mask
	end record								!
%let %TDB_REC = 1
%end %if
!

Back to Home
Neil Rieck
Waterloo, Ontario, Canada.