26Mar
It has been a while since i have had to work with Informix / 4GL. I have already forgotten tha simple commands to view the current running SQL query with an executing 4GL script. So this is more of a note to myself, but if it helps you, I'll be overjoyed.
First find the correct process:
> ps -ef | grep glgo
root 7618 7368 63 22:58:19 pts/ta 0:21 fglgo the_4gl_name_here
Then get the correct session using the pid from the previous result:
> onstat -g ses | grep 7618
1644203 root ta 7618 myserver 1 200704 187952 off
Now get the current executing sql of the session id above:
> onstat -g sql 1644203
If you would like the display to be automatically refreshed, just add a 'r' switch:
> onstat -gr sql 1644203
I hope I will remember to come and look for this next time I need it in a few months time.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
29Dec
After searching for ever, I finally managed to compile a sed script to convert CSV formatted files to Informix unload format (bar-delimited) files.
Hope I help someone with this.
#************************************************#
# csv2unl.sh #
# #
# written by Riaan Lehmkuhl #
# Dec 29, 2006 #
# #
# sed to convert csv to bar-delimited records. #
#************************************************#
# usage: ./csv2unl.sh < infile > outfile #
#************************************************#
/./!d
s/\([^\]\)|/\1\\\\|/g
s/\`/\'/g
s/^ *\(.*[^ ]\) *$/|\1|/;
s/" *, */"|/g;
: loop
s/| *\([^",|][^,|]*\) *, */|\1|/g;
t loop
s/ *|/|/g;
s/| */|/g;
s/^|\(.*\)|$/\1/;
s/"//g
s/$/|/g
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5