search cancel

Prompt with double qoutes and multi spaces getting passes with single spaces.

book

Article ID: 89603

calendar_today

Updated On:

Products

CA Automic Applications Manager (AM)

Issue/Introduction

Prompt with double qoutes and multi spaces getting passes with single spaces.

Environment

Release: AAMOS499000-8.0-Automic Applications Manager-OS400 Agent
Component:

Resolution

Detailed Description and Symptoms
1)create a shell script in exec folder, name it ONELINESHELLS and the content:
echo perl shell.pl $program $par
perl $AW_HOME/exec/shell.pl $program $par
err=$?
exit $err

2) create a perl script in exec and name it shell.pl and the content:
open (FILE, "$ARGV[1]");
while (<FILE>) {
chomp;
$parfile = "$parfile $_"
}
print "par is $parfile\n";
print "sh $ARGV[0] $parfile\n";
system("sh $ARGV[0] $parfile");
$err=$?;
if ($err != 0) {
print "err is $err";
die $err
}

3) create a new program type (you can copy the APPWORX_SHELLS) and on the host command replace SHELLS to ONELINESHELLS
4) change the job to use this new program type that you created on step 3.To do this you could make a copy of the APPWORX_SHELLS program type. You would then need to modify your UNIX Host Command portion of that program type to point to the newly created ONELINESHELLS.