New version of utils2_ak
Posted in 1999
Topics: General Discussion
I have uploaded a new version of utils2_ak and Walt has made it available in the IIUG Repository. This includes updates to docopy.ec and myschema.ec, as follows: dbcopy.ec: A bug is fixed which could cause an indefinite number of garbage rows to be inserted into the target table if an error occurs in the last row in a block with the BlockFlush (-F) option enabled. myschema.ec: Two neat new features implemented with three new flags: o New -q option to suppress the printing of the destination of SQL commands. Also -q is automatically enabled if output is to stdout and stdout is redirected to a non-TTY device/file. This is supported in the MYSCHEMA environment variable. o New -u option enables the printing of UPDATE STATISTICS commands sufficient to duplicate the current level of each table's stats and data distributions. This is supported in the MYSCHEMA environment variable. o New -U option which redirects the output of UPDATE STATISTICS commands to a separate file. By default these commands follow the index DDL. Using -U enables -u also. This was uploaded yesterday with a bug. If your README.1st file is dated October 27, 1999 in the header instead of October 28, 1999 you can wait a day or two and get the updated version (in transit) or apply the patch below by extracting and executing the shell script using any Bourne Shell compatible shell: ######################## BEGIN SCRIPT ################################## cp -p myschema.ec myschema.2.18.ec cat <<EOF | ed - myschema.2.18.ec >myschema.2.20.ec 455a } if (outfile3 != outfile2) { fprintf( stdout, "Writing UPDATE STATISTICS DDL to: %s\\n", filename3 ); . 454c "Writing schema secondary DDL to: %s\\n", . 451c "Writing schema primary DDL to: %s\\n", . 447c fprintf( stdout, "Writing full schema DDL to: %s\\n", filename ); . 419c outfile3 = outfile2 = fopen( filename2, "w" ); . 406c outfile3 = outfile2 = outfile; . 254c while ((c = getopt(argc, argv, "U:d:t:h:f:n:5alqsuvACORSTV?")) != EOF){ . 137c #define Revision "$Revision: 2.20 $" . 135c static char rcs_header[] = "$Header: /home/kagel/utils/myschema.d/RCS/myschema.ec,v 2.20 1999/10/28 18:40:50 kagel Prod $"; . 30a Revision 2.20 1999/10/28 18:40:50 kagel Added printout of location of STATS statement output. Revision 2.19 1999/10/28 18:30:54 kagel The 'q' for -q got lost from the getopt string and STATS output was not following the indexes if one or two filenames were specified on the command line. Fixed now. . 26c $Header: /home/kagel/utils/myschema.d/RCS/myschema.ec,v 2.20 1999/10/28 18:40:50 kagel Prod $ . 1,$p EOF mv myschema.2.20.ec myschema.ec ###################### END OF SCRIPT ###################################
CORRECTED PATCH BELOW, I added backslashes (\\) to dollar signs ($) -- ASK WATCH OUT FOR the patch to get messed up by your browser/mailer wrapping long lines. The few long lines are quoted strings so make sure they are reassembled into a single string. Also my mailer added blank lines following the lines with just '.' on them causing extra lines at the top of the output file. "Art S. Kagel" wrote: > > I have uploaded a new version of utils2_ak and Walt has made it available > in the IIUG Repository. This includes updates to docopy.ec and > myschema.ec, as follows: > > dbcopy.ec: A bug is fixed which could cause an indefinite number of > garbage rows to be inserted into the target table if an error occurs in > the last row in a block with the BlockFlush (-F) option enabled. > > myschema.ec: Two neat new features implemented with three new flags: > o New -q option to suppress the printing of the destination of > SQL commands. Also -q is automatically enabled if output is to > stdout and stdout is redirected to a non-TTY device/file. This > is supported in the MYSCHEMA environment variable. > o New -u option enables the printing of UPDATE STATISTICS commands > sufficient to duplicate the current level of each table's stats > and data distributions. This is supported in the MYSCHEMA > environment variable. > o New -U option which redirects the output of UPDATE STATISTICS > commands to a separate file. By default these commands follow > the index DDL. Using -U enables -u also. > > This was uploaded yesterday with a bug. If your README.1st file is dated > October 27, 1999 in the header instead of October 28, 1999 you can wait a > day or two and get the updated version (in transit) or apply the patch > below by extracting and executing the shell script using any Bourne Shell > compatible shell: ######################## BEGIN SCRIPT ################################## cp -p myschema.ec myschema.2.18.ec cat <<EOF | ed - myschema.2.18.ec >myschema.2.20.ec 455a } if (outfile3 != outfile2) { fprintf( stdout, "Writing UPDATE STATISTICS DDL to: %s\\n", filename3 ); . 454c "Writing schema secondary DDL to: %s\\n", . 451c "Writing schema primary DDL to: %s\\n", . 447c fprintf( stdout, "Writing full schema DDL to: %s\\n", filename ); . 419c outfile3 = outfile2 = fopen( filename2, "w" ); . 406c outfile3 = outfile2 = outfile; . 254c while ((c = getopt(argc, argv, "U:d:t:h:f:n:5alqsuvACORSTV?")) != EOF){ . 137c #define Revision "\\$Revision: 2.20 \\$" . 135c static char rcs_header[] = "\\$Header: /home/kagel/utils/myschema.d/RCS/myschema.ec,v 2.20 1999/10/28 18:40:50 kagel Prod \\$"; . 30a Revision 2.20 1999/10/28 18:40:50 kagel Added printout of location of STATS statement output. Revision 2.19 1999/10/28 18:30:54 kagel The 'q' for -q got lost from the getopt string and STATS output was not following the indexes if one or two filenames were specified on the command line. Fixed now. . 26c \\$Header: /home/kagel/utils/myschema.d/RCS/myschema.ec,v 2.20 1999/10/28 18:40:50 kagel Prod \\$ . 1,\\$p > EOF > mv myschema.2.20.ec myschema.ec > ###################### END OF SCRIPT ###################################
In article <3818A192.382E97F3@bloomberg.net>, Art S. Kagel <kagel@bloomberg.net> writes >I have uploaded a new version of utils2_ak and Walt has made it available >in the IIUG Repository. This includes updates to docopy.ec and >myschema.ec, as follows: > >dbcopy.ec: A bug is fixed which could cause an indefinite number of >garbage rows to be inserted into the target table if an error occurs in >the last row in a block with the BlockFlush (-F) option enabled. > >myschema.ec: Two neat new features implemented with three new flags: > o New -q option to suppress the printing of the destination of > SQL commands. Also -q is automatically enabled if output is to > stdout and stdout is redirected to a non-TTY device/file. This > is supported in the MYSCHEMA environment variable. Bdoing! Bdoing! Bouncing up and down! That was me! I provided a patch for that!! When is the -s option for SE that I provided a patch for going in??..Bdoing! Bdoing! Dave's getting excited again, he's back!!! > o New -u option enables the printing of UPDATE STATISTICS commands > sufficient to duplicate the current level of each table's stats > and data distributions. This is supported in the MYSCHEMA > environment variable. > o New -U option which redirects the output of UPDATE STATISTICS > commands to a separate file. By default these commands follow > the index DDL. Using -U enables -u also. > >This was uploaded yesterday with a bug. If your README.1st file is dated >October 27, 1999 in the header instead of October 28, 1999 you can wait a >day or two and get the updated version (in transit) or apply the patch >below by extracting and executing the shell script using any Bourne Shell >compatible shell: > > >######################## BEGIN SCRIPT ################################## >cp -p myschema.ec myschema.2.18.ec >cat <<EOF | ed - myschema.2.18.ec >myschema.2.20.ec >455a > } > if (outfile3 != outfile2) { > fprintf( stdout, > "Writing UPDATE STATISTICS DDL to: %s\\n", > filename3 ); >. >454c > "Writing schema secondary DDL to: %s\\n", >. >451c > "Writing schema primary DDL to: %s\\n", >. >447c > fprintf( stdout, > "Writing full schema DDL to: %s\\n", > filename ); >. >419c > outfile3 = outfile2 = fopen( filename2, "w" ); >. >406c > outfile3 = outfile2 = outfile; >. >254c > while ((c = getopt(argc, argv, "U:d:t:h:f:n:5alqsuvACORSTV?")) != EOF){ >. >137c >#define Revision "$Revision: 2.20 $" >. >135c >static char rcs_header[] = "$Header: >/home/kagel/utils/myschema.d/RCS/myschema.ec,v 2.20 1999/10/28 18:40:50 kagel >Prod $"; >. >30a >Revision 2.20 1999/10/28 18:40:50 kagel >Added printout of location of STATS statement output. > >Revision 2.19 1999/10/28 18:30:54 kagel >The 'q' for -q got lost from the getopt string and STATS output was not >following the indexes if one or two filenames were specified on the >command line. Fixed now. > >. >26c >$Header: /home/kagel/utils/myschema.d/RCS/myschema.ec,v 2.20 1999/10/28 18:40:50 >kagel Prod $ >. >1,$p >EOF >mv myschema.2.20.ec myschema.ec >###################### END OF SCRIPT ################################### -- David Williams
David Williams <djw@smooth1.demon.co.uk> writes: > In article <3818A192.382E97F3@bloomberg.net>, Art S. Kagel > <kagel@bloomberg.net> writes > >I have uploaded a new version of utils2_ak and Walt has made it available > >in the IIUG Repository. This includes updates to docopy.ec and > >myschema.ec, as follows: > > > >dbcopy.ec: A bug is fixed which could cause an indefinite number of > >garbage rows to be inserted into the target table if an error occurs in > >the last row in a block with the BlockFlush (-F) option enabled. > > > >myschema.ec: Two neat new features implemented with three new flags: > > o New -q option to suppress the printing of the destination of > > SQL commands. Also -q is automatically enabled if output is to > > stdout and stdout is redirected to a non-TTY device/file. This > > is supported in the MYSCHEMA environment variable. > > Bdoing! Bdoing! Bouncing up and down! That was me! I provided a patch > for that!! When is the -s option for SE that I provided a patch for > going in??..Bdoing! Bdoing! Dave's getting excited again, he's back!!! You've been sleeping again -haven't you;) Thomas
Thomas Parsli wrote: > > David Williams <djw@smooth1.demon.co.uk> writes: > > > In article <3818A192.382E97F3@bloomberg.net>, Art S. Kagel > > <kagel@bloomberg.net> writes > > >I have uploaded a new version of utils2_ak and Walt has made it available > > >in the IIUG Repository. This includes updates to docopy.ec and > > >myschema.ec, as follows: > > > > > >dbcopy.ec: A bug is fixed which could cause an indefinite number of > > >garbage rows to be inserted into the target table if an error occurs in > > >the last row in a block with the BlockFlush (-F) option enabled. > > > > > >myschema.ec: Two neat new features implemented with three new flags: > > > o New -q option to suppress the printing of the destination of > > > SQL commands. Also -q is automatically enabled if output is to > > > stdout and stdout is redirected to a non-TTY device/file. This > > > is supported in the MYSCHEMA environment variable. > > > > Bdoing! Bdoing! Bouncing up and down! That was me! I provided a patch > > for that!! When is the -s option for SE that I provided a patch for > > going in??..Bdoing! Bdoing! Dave's getting excited again, he's back!!! Yes you did, and thanks Dave. I usually give credit where due but I lost a bunch of emails 3 weeks ago (Sysadmin to Kagel: "You want me to restore you MAIL file from Friday's backups? Yeah, OK, maybe, when I get around to it. I got REAL problems today." Kagel to Sysadmin: "Remember my request to restore my mail file from 2-1/2 weeks ago?" Sysadmin: "OH, sorry. We recycle those daily tapes every two weeks. How about the I pull the monthlies from the week before back?") and your patches were among them. I remembered these to make the changes but lost the SE patch altogether and could not remember who sent them to me. Dave, please send me the SE stuff again, if you have it, or at least a description of what it was to do/fix. Art S. Kagel