Introduction

Hello everybody,sometimes users can request us to import their job definition using xml specific file.It is quite an easy task to perform but in rare cases you can encounter some issues.When Control-m is checking the XML schema verification to import it in the planning domain you can have an windows error message explaining that there is a configuration in the xml file,let’s see what kind of message it is and how to solve it.

How to export/import the job definitions

Import the “problematic” xml file

OUTPUT:

The error message in the popup window is clear: there is problem in the email message(character format?)

The line and the columns is indicated in the windows it is the line 47 and column 140 we will check that by using a file text editor

CAUSE:

Usually this error message corresponds to the case in which the DO MAIL action contains 0 character for the message part.
In our case the DO MAIL action contains the message body but is still not working

Check the corresponding line on a file editor

Let’s open the xml file in a file editor and go to the line 47 as indicated by the popup window.

We can clearly see that the message part is not empty, also we see some numbers at the beginning of the message ( number that are not part of the message I have input in the text field )

After some search on the excellent Support Center of BMC, I found out that this is this specific number referring to the character length of the message which is causing this import issue.

It should correspond to the message length ( Here with have number 0002 which is not corresponding to the text length which I voluntarily added for this test purpose )

The number of characters of our message ” Hi this is a test for the do mail notification ” is 47 chars including spaces.

Update the xml file with corresponding values

So next step is to update the number to the corresponding length

Note:

Don’t forget to take in account the spaces in your message ,also bare in mind that you have to keep the 0 before the number otherwise it cannot work.

Action to do in our example:

Substitute 0002 by 0047

Import the updated xml file

Now we have imported the file with updated values we can try to import it an see if it is now working

As you can see the folder/job is now imported successfully

Check the do mail part in the job, this is working our message is displaying as expected

If you have still the import message

Unfortunately if you still have the import issue even after updating the character number at the beginning of your message , you will have to delete the message body in the related job ( save it in a notepad for example )

Next step will be to import your xml file without the message in the do mail part,after that the import will be successful.

Note that the message field will be empty

You will of course need to add the message manually in your jobs on Control-M planning

Once done ,export your job definition from the planning domain to have a compliant xml file 🙂

Result:

Your export will now work ,you can try to import it again in the planning domain to check if the importation error is fixed.

Note:

As checked also with BMC we don’t exactly know what is the root cause of this bug , it can be corrupted at anytime ( during an export of the folder or even when you edit your xml export in the file editor) also it is not detected during migration as the migration toolkit doesn’t check this specific error,unfortunately that means that you can keep this issue even after an upgrade if you don’t keep out.

So the only way to solve it is to update manually the xml file to get the correct character number in the message or to do the workaround with the empty field.

Conclusion

Now you know how to fix this folder import issue , the popup windows gives precious info about where the error is located , you just have to open the xml file in your favorite text editor and make a quick investigation 🙂

I hope it will be helpful and also don’t forget to follow my other blogs and also those form my colleagues on dbi bloggers to have more new tips and tricks on your favorites software 😉