The xbind Solution Shell Scripts
xclean.sh
rm xholidays.so holidays.so
rm coberrorfile
echo 'pkill -f xbind, firefox'
/usr/bin/pkill -f xbind
/usr/bin/pkill -f firefox
killall -HUP xbind
xbuild.sh
#/bin/bash
echo 'starting shellscript'
echo 'set -e'
set -e
echo 'run cit setup script'
export DEFAULT_CITDIR=/opt/cobol-it4-64
export COBOLITDIR=$DEFAULT_CITDIR
export PATH=$COBOLITDIR/bin:${PATH}
export LD_LIBRARY_PATH="$COBOLITDIR/lib:${LD_LIBRARY_PATH:=}"
export DYLD_LIBRARY_PATH="$COBOLITDIR/lib:${DYLD_LIBRARY_PATH:=}"
export SHLIB_PATH="$COBOLITDIR/lib:${SHLIB_PATH:=}"
export LIBPATH="$COBOLITDIR/lib:${LIBPATH:=}"
export COB="COBOL-IT"
echo COBOL-IT Environement set to $COBOLITDIR
echo 'building service ...'
cobc -b -g -ftraceall -o xholidays.so xholidays.cbl holidays.cbl
echo 'all done'
startxbind.sh
#/bin/bash
echo 'starting shellscript'
echo 'set -e'
set -e
echo 'run cit setup script'
export DEFAULT_CITDIR=/opt/cobol-it4-64
export COBOLITDIR=$DEFAULT_CITDIR
export PATH=$COBOLITDIR/bin:${PATH}
export LD_LIBRARY_PATH="$COBOLITDIR/lib:${LD_LIBRARY_PATH:=}"
export DYLD_LIBRARY_PATH="$COBOLITDIR/lib:${DYLD_LIBRARY_PATH:=}"
export SHLIB_PATH="$COBOLITDIR/lib:${SHLIB_PATH:=}"
export LIBPATH="$COBOLITDIR/lib:${LIBPATH:=}"
export COB="COBOL-IT"
echo COBOL-IT Environement set to $COBOLITDIR
export COB_LIBRARY_PATH=.
export COB_FILE_PATH=.
export COB_ERROR_FILE=coberrorfile
echo 'launching xbind ...'
/opt/cobol-it4-64/bin/xbind 9735 xholidays &
xallwithcurl.sh
#/bin/bash
curl --ipv4 --no-buffer -o ./strings/xcurlpost --data-urlencode @./strings/poststring http://localhost:9735
curl --ipv4 --no-buffer -o ./strings/xcurlget --get --data-urlencode @./strings/getstring http://localhost:9735
curl --ipv4 --no-buffer -o ./strings/xcurlput --data-urlencode @./strings/putstring http://localhost:9735
curl --ipv4 --no-buffer -o ./strings/xcurldelete --data-urlencode @./strings/deletestring http://localhost:9735
curl --ipv4 --no-buffer -o ./strings/xcurlget2 --get --data-urlencode @./strings/getstring http://localhost:9735
xpost.sh
#/bin/bash
echo 'starting firefox...'
firefox ./xhtml/xpost.html
xpost.html
Message:<br>
<textarea rows="20" cols="90" maxlength="1000" name="msg" form="myForm">
</textarea>
<br>
<form action="http://localhost:9735" target="result2" method="post" id="myForm" accept-charset="ISO-8859-1">
<input type="submit" value="POST">
</form>
<p>Result:</p>
<iframe name="result2" style="height:450px;width:643px;"></iframe>
xget.sh
#/bin/bash
echo 'starting firefox...'
firefox ./xhtml/xget.html
xget.html
Message:<br>
<textarea rows="20" cols="90" maxlength="1000" name="msg" form="myForm">
</textarea>
<br>
<form action="http://localhost:9735" target="result2" method="post" id="myForm" accept-charset="ISO-8859-1">
<input type="submit" value="GET">
</form>
<p>Result:</p>
<iframe name="result2" style="height:450px;width:643px;"></iframe>
xput.sh
#/bin/bash
echo 'starting firefox...'
firefox ./xhtml/xput.html
xput.html
Message:<br>
<textarea rows="20" cols="90" maxlength="1000" name="msg" form="myForm">
</textarea>
<br>
<form action="http://localhost:9735" target="result2" method="post" id="myForm" accept-charset="ISO-8859-1">
<input type="submit" value="PUT">
</form>
<p>Result:</p>
<iframe name="result2" style="height:450px;width:643px;"></iframe>
xdelete.sh
#/bin/bash
echo 'starting firefox...'
firefox ./xhtml/xdelete.html
xdelete.html
Message:<br>
<textarea rows="20" cols="90" maxlength="1000" name="msg" form="myForm">
</textarea>
<br>
<form action="http://localhost:9735" target="result2" method="post" id="myForm" accept-charset="ISO-8859-1">
<input type="submit" value="DELETE">
</form>
<p>Result:</p>
<iframe name="result2" style="height:450px;width:643px;"></iframe>