#!/usr/bin/sh
##
## Copyright (c) 2004
## Sybase, Inc
## Dublin, CA 94568
## All Rights Reserved
##
if [ $# != 2 ]
	then echo "send_to_queue ASE, DBNAME"
	exit
fi

#
##	$1	-> ASE
##	$2	-> DBNAME holding stored procedure examples
#
echo " "
echo " "
echo " "

echo " "
echo " "
echo "		========================================== "
echo "		Example to send a single message to a queue"
echo "		========================================== "
echo " "
echo " "
isql -UUsrMsg -PUsrMsg_Pwd -S$1 -D$2 << EOF
set nocount on
set proc_return_status off
go
QueueSender "tibco_jms_dev","queue.sample","sample_user", "sample_pwd", "Sending message to a queue with Property", null, "Supplier=12345"
go
EOF


echo " "
echo " "
echo " "
echo ".... Use consume_with_selector / consume_with_selector_print_value to retrive the message...."
echo " "
echo " "
echo " "
