Perl extension removed by ntspawn resulting in a "No such file or directory" error
search cancel

Perl extension removed by ntspawn resulting in a "No such file or directory" error

book

Article ID: 258792

calendar_today

Updated On:

Products

CA Automic Applications Manager (AM)

Issue/Introduction

When running Perl Jobson the Windows Agent, the .pl extension by be stripped causing a "no Such file or directory" error. For example, if BODY debug is enabled, the below may be see:

When enabling BODY debug, which is Job level debugging, the "GET ENV ARGUMENTS" line will be seen, which shows the the Job script perl_file_purge.pl includes the extension .pl:

argsString = C:\test\perl\bin\perl C:\test\bin\perl_file_purge.pl batch/[email protected] //test/shared/example/Item

After "SET ENV ARGUMENTS", the "Program Arguments" value and "Command line to run" values are NOW NOT CORRECT. The .pl extension is removed:

Program Arguments = "C:\test\bin\perl_file_purge" "//test/shared/example/Item 
Command line to run: "C:\test\perl\bin\perl" "C:\test\bin\perl_file_purge" "//test/shared/example/Item

Because the .pl file extension is removed, we see the following error in the output file:

Windows return code 2
ErrorLevel Can't open perl script "C:\test\bin\perl_file_purge": No such file or directory

Can't open perl script "C:\test\bin\perl_file_purge": No such file or directory

Set exitCode to 2
ntspawn exiting with exitCode 2

Environment

Release : 9.3.4

Component: CA Automic Applications Manager (AM)

Resolution

This is fixed in Applications Manager version 9.4.4