Hi Experts,
I have an requirement to run UNIX scripts thru SAP CPS.
The scripts are already exist in Cronacle 6.0.2 to perform file related activities like moving files from location X to location Y, rename file names, check file size, etc..,
The requirement is, run these scripts from SAP CPS by installing Platform Agents.
We have successfully connected to UNIX server (Where these scripts suppose to run) but not able to submit the scripts and getting errors as below:
/interfaces/QPF/FLLC/CPS/agent/var/SAP_DCD_00/QA_zpadt242_ProcessServer/jobs/20000-29999/29455/run_OSNATIVE: ^J# Determine the date-extension (e.g. 20030611092447)^JDATE=`/usr/bin/date +%Y%m%d%H%M%S`^J^J# Supply the filename (e.g. RFTST.IPICS.PRICECHG.T)^JNAME_OF_FILE="NAFTA.SHIPMTS"^JPATH_TO_FILE="/interfaces/QPF/FLLC/sapout/RFTS"^JSEND_SCRIPT="sendNAFTA.SHIPMTS"^JSOURCE_FILE="$PATH_TO_FILE/$NAME_OF_FILE"^JDESTINATION_FILE="$PATH_TO_FILE/archive/${NAME_OF_FILE}.$DATE"^JSEND_SCRIPT_FULLNAME="$PATH_TO_FILE/scripts/$SEND_SCRIPT"^J^J# If the Source file is not a regular file -> exit with error^Jif [ ! -f "$SOURCE_FILE" ]^Jthen^J echo "$SOURCE_FILE is not a regular file -> EXIT!"^J exit 101^Jelif [ -r "$DESTINATION_FILE" ]^Jthen^J echo "$DESTINATION_FILE is already existing -> EXIT!"^J exit 102^Jfi^J^J# Now move the file ...^J/usr/bin/mv $SOURCE_FILE $DESTINATION_FILE^JMV_RETCODE=$?^J# If there are problems moving the file -> exit, if not proceed ...^Jif [ "$MV_RETCODE" -eq 0 ]^Jthen^J echo "Moved file $SOURCE_FILE to $DESTINATION_FILE successfully ..."^Jelse^J echo "Moving file $SOURCE_FILE to $DESTINATION_FILE failed with errorcode $MV_RETCODE!"^J exit $MV_RETCODE^Jfi^J^J$SEND_SCRIPT_FULLNAME $DESTINATION_FILE^JSS_RETCODE=$?^J# If there are problems initiating send request -> exit, if not -> proceed ...^Jif [ "$SS_RETCODE" -eq 0 ]^Jthen^J echo "Initiating send request for $DESTINATION_FILE via RFTS was successful ..."^Jelse^J echo "Initiating send request for $DESTINATION_FILE via RFTS failed with errorcode $SS_RETCODE ..."^J exit $SS_RETCODE^Jfi^J^J# Everything worked, so we can exit in peace^Jexit 0^J: cannot execute
I am not sure what else to be configured to run these scripts. I really need your help.
Thanks,
Shiva