C Collection of code snippets by Arne Vajhøj 
C (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
      program p3
      implicit none
      integer* 4 port
      character*32 host,un,pw,qc2s,qs2c
      parameter (host='arnepc4',
     +           port=61613,
     +           un='arne',
     +           pw='topsecret',
     +           qc2s='QC2S',
     +           qs2c='QS2C')
      integer*4 ctx(2),msglen
      character*100 smsg
      character*10000 rmsg
      call vms_simple_stomp_debug(0)
c  connect
      call vms_simple_stomp_init(ctx, host, port)
c  send
      smsg='Hi from Fortran!'
      call vms_simple_stomp_write(ctx, qc2s, smsg);
c  receive
      call vms_simple_stomp_read(ctx, qs2c, rmsg, msglen);
      write(*,*) '|'//rmsg(1:msglen)//'|'
c  disconnect
      call vms_simple_stomp_close(ctx)
      end
