Dating and dateout in peoplecode
On most platforms, you cannot use a literal to populate a Long Varchar field. In the case of an external call to a section in another program, if the called program has its own default state record defined, then Application Engine uses that default state record to resolve the %Bind().
Otherwise, the called program inherits the default state record of the calling program.
Any in-memory sorting performed using COBOL language functions is performed as a binary sort in the current character set used for COBOL processing, and may not necessarily match the sort order returned by the database in response to an Order By clause.
Should you require the database to return data sorted using a binary sort of its encoding rather than the default linguistically-correct sort, you must use the %BINARYSORT meta-SQL function around each column in the Where or Order By clause where binary ordering is important.
Therefore, %BINARYSORT should only be used in COBOL programs that are not run using the Remote Call function, where the z/OS platform is not supported as a Remote Call server.
For example: The behavior of bind variables within Application Engine People Code and normal People Code is the same.
If you compare Application Engine SQL to People Code (of any type), then the system processes bind variables differently.