0

I am executing a power-shell script using Control-M tool using below command.

powershell -command "& { F:\SAS01\Scripts\Powershell\Medicare}

Powershell Script:

Invoke-ASCmd -Server:Hostname -InputFile:"F:\SAS01\Scripts\Powershell\Medicare.xmla" -TraceFile:"F:\SAS01\Scripts\Logs\Medicare.log"

It returning the below error along with ErrorCode="-1053425602"

<Exception xmlns=\ "urn:schemas-microsoft-com:xml-analysis:exception" /><Error ErrorCode="-1053425602" Description="Column 'BDGT_SCNRO_CD' in Table 'Budget Scenario' contains a duplicate value '
BS04' and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table."

The Error Code number varies based on the error script generating but it always returning in negative.

In Control-M we have configured as whenever the error code returns positive we can show as script failed, but because of negative error code we are unable to.

Any suggestions on how to return the error code to positive along with error message.

Thanks, Mohan V.

2
  • The error code is actually an unsigned integer, but its hex value is converted to signed. Thus, it looks like a negative value. Edit the question and show how the error is returned and parsed. Over there, it can be converted to whatever suits the needs. Commented Aug 21, 2020 at 7:30
  • Can you not change your Control-M monitor to check for "not equal to zero" so that positive and negative error codes trigger your alert? You're trying to make the tail wag the dog by massaging your error code to match the alert's expectations rather than the other way round... Commented Aug 21, 2020 at 8:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.