Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return Code 255?

Status
Not open for further replies.

RedSoxM3

IS-IT--Management
Mar 27, 2006
39
US
6.7.1 Win2K

I have a map that calls gpg.exe via the batch adapter. It frequently fails....but simple redropping the file for it to trigger again works. Well, I turned the audit log on for when it errors and got a 255. What does that mean?

<MercatorMapAudit StartTime="13:52:48 July 25, 2006">

<Platform>Mercator Event Server for Windows - Version 6.7(306)</Platform>

<Burst count="1">

<ExecutionLog burstreturn="9" ElapsedSec="1.5717">

<inputstatus card="1" bytes="386" adapterreturn="0" contentreturn="0"/>
<outputstatus card="1" bytes="0" adapterreturn="-6" contentreturn="0"/>

</ExecutionLog>

</Burst>

<ExecutionSummary MapStatus="Error" mapreturn="9" ElapsedSec="1.6326" BurstRestartCount="0">
<Message>Target not available</Message>
<CommandLine>E:\EC\Appint\Decrypt2MF.mmc</CommandLine>

<SourceReport card="1" adapter="File" bytes="386" adapterreturn="0">
<Message>Data read successfully</Message>
<Settings>E:\EC\Appdata\PGPnFTP\ACS\Inbound2MF\tst_saf.rcn.saint030_outfile.txt.pgp</Settings>
<TimeStamp>05:03:00 May 4, 2006</TimeStamp>
</SourceReport>

<TargetReport card="1" adapter="Batch File" bytes="0" adapterreturn="-6">
<Message>Error Executing Command (Return Code 255)</Message>
<Settings>-cmd 'e:\ec\appint\decrptACS.bat E:\EC\Appdata\PGPnFTP\ACS\Inbound2MF\tst_saf.rcn.saint030_outfile.txt.pgp'</Settings>
</TargetReport>

<WorkArea type="Memory">
<inputarea card="1" bytes="65600"/>
</WorkArea>

</ExecutionSummary>

<MapSettings>

<MapAudit switch="ON">
<Log executionsummary="OnError" databurst="Never" databurst_sizevalidation="WrongSize" executionburst="Always" mapsettings="OnError" datasettings="OnError"/>
<Location type="File" action="Create">
<Directory type="Map">E:\EC\Appint</Directory>
<FileName type="Default" prefix="MapName">Decrypt2MF.log</FileName>
</Location>
</MapAudit>

<MapTrace switch="OFF"></MapTrace>

<WorkSpace>
<Location type="Memory">
</Location>
<Paging>
<PageSize>64</PageSize>
<PageCount>8</PageCount>
</Paging>
</WorkSpace>

<SlidingCentury switch="OFF"></SlidingCentury>

<CustomValidation switch="OFF"></CustomValidation>

<Retry switch="ON">
<MaxAttempts>10</MaxAttempts>
<Interval>5</Interval>
</Retry>

<BurstRestart switch="OFF"></BurstRestart>

<Warnings type="Every" action="Warn"></Warnings>

</MapSettings>

<DataSettings>

<InputData card="1" CardMode="Integral" WorkArea="!Reuse">
<Backup switch="ON" when="OnError" action="Create">
<Path>E:\EC\APPDATA\PGPNFTP\ACS\INBOUND2MF\Resend\tst_saf.rcn.saint030_outfile.txt.pgp</Path>
</Backup>
<Source adapter="File" OnSuccess="Delete" OnFailure="Rollback" Scope="Map" Warnings="Ignore">
<Resource>E:\EC\Appdata\PGPnFTP\ACS\Inbound2MF\tst_saf.rcn.saint030_outfile.txt.pgp</Resource>
<Retry switch="ON">
<MaxAttempts>5</MaxAttempts>
<Interval>5</Interval>
</Retry>
</Source>
</InputData>

<OutputData card="1">
<Backup switch="OFF"></Backup>
<Target adapter="Batch File" OnSuccess="Create" OnFailure="Commit" Scope="Map" Warnings="Ignore">
<Resource>-cmd 'e:\ec\appint\decrptACS.bat E:\EC\Appdata\PGPnFTP\ACS\Inbound2MF\tst_saf.rcn.saint030_outfile.txt.pgp'</Resource>
<Retry switch="ON">
<MaxAttempts>5</MaxAttempts>
<Interval>5</Interval>
</Retry>
</Target>
</OutputData>

</DataSettings>

</MercatorMapAudit>
 
did you run run the batch adapter with trace or audit on?
 
The 255 error is the return code from the batch process.
 
Hi eyetry, yes, I ran it to generate the audit log on error. The error was:

<TargetReport card="1" adapter="Batch File" bytes="0" adapterreturn="-6">
<Message>Error Executing Command (Return Code 255)</Message>
<Settings>-cmd 'e:\ec\appint\decrptACS.bat

This map just triggers off of a wild card, then calls the batch adapter to trigger the batch script to decrypt. The problem is, sometimes it works, somtimes it doesn't...about 9 of 10 times. The 1 out of 10, I get this error.
 
Sorry, not the log file but the m4batch.mtr/log file created when executing a batch file with a trace.....

GET("BAT","-CMD e:\ec\appint\decrptACS.bat" + " -TRACE -AUDIT")

Not an expert on executing batch files from a map but from my experience, sometimes the trace will give you info more specific to the problem than the map's log file.

 
Ok, I (actually, a certain awesome lady at IBM support) was able to pinpoint the problem. Occasionally, if an absolute path is not specified when calling the application, the batch adapter "hicups" and failes to call it. So, simply specifying the path name in the batch file cured the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top