SAP/MaxDB backup of transaction logs - status code 6 resolution

If you are backing up transaction logs of SAP/MaxDB you probably have often failed backups with status code 6.

But nothing wrong happened. Just no transactions was available for backup.

It’s a behavior of dbmcli - anything except successful backup returns exit code 1.
But parent wrapper script provided by Symantec is not able to distinguish real errors from situation where there are just no transactions to backup. (Hmm, Technote TECH129715 was deleted in meanwhile).
By Symantec we have to wait until SAP will provide dbmcli with more granular exit codes.

Seems that we cannot do anything.

Or can?

What is the standard output of successful backup? Here is one example of stdout log file from bphdb log directory:

This is the example of situation when MaxDB has no transactions available since last backup. I have decided to use string “-123, No more log to save” as detector of this situation. Check whether your version of SAP/MaxDB is working the similar way.

And what is the final solution? Here is my sap_maxdb_backup.cmd script.