The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

In the context of this conversation about the way Sybase Central displays stored procedure code, is it true that your comment about the "behavior change" refers ONLY to the way the code is stored in sysprocedure.proc_defn, and has nothing to do with the way it is stored in sysprocedure.source?

The sysprocedure.source is not impacted by this change and will continue to store the source as provided, if PRESERVE_SOURCE_FORMAT is enabled. As you previously indicated, this is the column that should be used as sysprocedure.proc_defn will be have been parsed before being stored.

The Database on second server once we rebuild (unload then load to new file) using SQL Anywhere version 16, while the first server we rebuild using SQL Anywhere version 12, but both are now running on sql anywhere 16

So this slight difference does explain the different behaviour according to Chris's statements:)

That being said, I'd strongly second Breck's suggestions to use the PRESERVE_SOURCE_FORMAT option and/or store (and version) the SQL scripts as files in a source code control system. That will make you truly independent of any (helpful or not) changes w.r.t. the DBISQL code formatting...

Sorry for the delay in responding as I needed to research the background.

There were several changes made where SQL Anywhere now quotes all non-keyword identifiers. The first change relates to stored SQL text including but not limited to procedures, views, column defaults, triggers, and events. This is the reason for the changes reported in this thread. The second change is documented in the behavior changes as "Sensitive information is obfuscated in output".The documentation does not include that the quoting of non-keyword identifiers, similar to that with stored SQL text, and semantic transforms such as view flattening will also be applied to statements that are output.

SQL Anywhere saves stored procedure source code in one or two formats: it always saves a slightly mangled version in SYSPROCEDURE.proc_defn (which is what you are seeing), and optionally saves the original version in SYSPROCEDURE.source.

Thank you Mr. Carter for the advice, but we still have problems.
we have 2 servers and we use the same settings. The PRESERVE_SOURCE_FORMAT we set "OFF". Then results in the first server on "proc_defn" give the same results without the double quotes. while the second server with the same settings give results with the addition of double quotation.
hope you can help further.
Thank you.

I don't know (and I don't care) what proc_defn contains... it is not what you want.

If you want to preserve the source code formatting in the future, you MUST set PRESERVE_SOURCE_FORMAT to ON.

Then, if you want to fix the procedures that already exist, you will have to re-CREATE or ALTER them to store the properly-formatted source code. There is no magic way to recreate the original format.

I strongly suggest to keep the original source code for all procedures and triggers in text files outside the database, just like you do for all other forms of source code. Then you can exercise control over your source code.