I want to break dependency from Sybase sqr
tool.
Is there a Python script that parses *.sqr
script and executes it?
No answer for quite a while.
So I wrote PySQR - simple Python script to interpret (parse and execute) *.sqr
script.
The only function it implements Sybase database access using isql
is paginated *.txt
report generation.
Old script:
sqr ${BRASS_DIR}/client_confirm_${SYSTEM}_1.sqr \
${BRASS_US_USER}/${BRASS_US_PW} \
"Jul 19 2017 06:00:00:860AM" \
"Jul 19 2017 07:37:19:370AM" \
$(echo $$) \
${ALL} \
-V${SYB_SERVER} -XB -XP >> /tmp/client_confirm.$$
Converted script:
./pysqr.py --start_time="Jul 19 2017 06:00:00:860AM" \
--finish_time="Jul 19 2017 07:37:19:370AM" \
--pid=1708 \
--lis_file_name=client_confirm_US.lis