jsqsh icon indicating copy to clipboard operation
jsqsh copied to clipboard

Question: Piping SQL Filename to execute

Open matz3ibm opened this issue 2 months ago • 0 comments

I can call jsqsh like: jsqsh -e SSLDB2CONNECTION -o=out.txt --input-file=./zos-syscat-countTables.sql

Is it possible to "pipe in" the name or SQL-File itself via stdin to avoid text replacing via cmd-line?

Eg. more zos-syscat-countTables.sql | jsqsh -e SSLDB2CONNECTION -o=out.txt

or

find . -name "*.sql" -print0 | xargs -0 jsqsh -e SSLDB2CONNECTION -o=out.txt

or even 'major':

find . -name "*.sql" -print0 | xargs -0 jsqsh -e SSLDB2CONNECTION -o=out -oo=awt -os=out -oi=true where -oo => outputfile options => "append-with-timestamp" -os=>outputfile suffix => ".out" -oi=>include stdin, executed sqls/lines

creating a file:: out_20251209-08:21.out for each sql file piped.

matz3ibm avatar Dec 11 '25 07:12 matz3ibm