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.

Mohan.V
  • 141
  • 1
  • 1
  • 10
  • The error code is actually an [unsigned integer](https://stackoverflow.com/a/38567870/503046), but its hex value is converted to signed. Thus, it looks like a [negative value](https://stackoverflow.com/a/43936815/503046). Edit the question and show how the error is returned and parsed. Over there, it can be converted to whatever suits the needs. – vonPryz Aug 21 '20 at 07: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... – mclayton Aug 21 '20 at 08:37

0 Answers0