When using Applications Manger's loadp.bat script on a Windows Agent that runs a SQL*Loader job that contains discarded records you receive the above 512 errors and the job goes to an ABORTED status. However, the job does run successfully and does load the correct data into the table.
Error Message Details:
NTSPAWN pid 440:1b8
JOBID 12424.00
Spawned process with ID 10888 2a88
return status=512err=512
end of D:\am8agnt\exec\BODY2.BAT status 512
err is:'512
Applicable to Applications Manager Versions: v9
Applications Manager's loadp.bat script is using Perl's error variable '$?' to return the errno if one of the calls fail. This errno is stored into a 16 bit integer. When the SQL*Loader job runs and has discarded rows you should get a warning message and it should exit with an exit code of 2. However, when '$?' is evaluated on Windows, it is evaluated as the binary value of 0000001000000000, which is 512 instead of 2. When shifted to the right by 8 bits, you get 00000010, which represents "2" and is the value we expect from the SQL*Loader for warning messages