Article 155001 of comp.os.vms:
In article <Pine.A32.3.91.960911080454.21072B-100000@universal.dca.net>,
   Clutch Cargo <jforman@universal.dca.net> wrote:
>
>I'm looking for a program example using the VMS system services routine 
>$SNDOPR.  I really don't care what language but I'm currently using 
>VAX Basic and Fortran.  I'm looking mainly for using a user request 
>(OPC$_RQ_RQST) operation.  And to keep it simple, I really only need an 
>example of a correctly built message buffer.
>
>Any help would be greatly appreciated.
>
>John Forman
>formanjc@jlcl01.lvs.dupont.com
>          OR
>jforman@dca.net

Here is some old Fortran code (1991!) that may point you in the direction

     John

---------------------- program example -------------------
	subroutine throttle_message(string,type)
c
CDEC$	TITLE 'THROTTLE'
CDEC$	SUBTITLE 'THROTTLE_MESSAGE'
c
	implicit integer*4 (a-z)

	include '($jpidef)'
	include '($opcdef)'

	character*(*) string

	structure /opcstruct/
	 union
	  map
	   byte opc$b_ms_type
	   union
	    map
	     byte opc$b_ms_target
	     byte %fill(2)
	    end map
	    map
	     integer*2 myopc$w_ms_target
	     byte %fill(1)
	    end map
	   end union
	   integer*4 opc$l_ms_rqstid
	   character*255 myopc$t_ms_text
	  end map
	  map
	   character*263 myopc$t_buffer
	  end map
	 end union
	end structure

	record /opcstruct/ msgbuf

	if ( type .eq. jpi$k_interactive ) then
	   status=lib$put_output(string)
	else
	   msgbuf.opc$b_ms_type=opc$_rq_rqst
	   msgbuf.myopc$w_ms_target=opc$m_nm_centrl
	   status=str$trim(msgbuf.myopc$t_ms_text,
	1                  string,)
 	   status=sys$sndopr(msgbuf.myopc$t_buffer,)
 	endif
 	
	return

	end


