The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Found text 'KSC_EXIT_STATUS' without a '$?' Whats the fix?

Highlighted
bzdafro
Collector

Found text 'KSC_EXIT_STATUS' without a '$?' Whats the fix?

Hi,

 

We bump into this every once in awhile and its driving me crazy.   Its usually on AIX servers.   When we connect and run a command longer than xx characters, it will return the error above.   If I shorten the prompt to $, it will help.  However, if our unix command exceeds the character length it will appear again.   Does anyone know a permanent fix for this?  Do I have to set something in our profile?

 

Thanks

 

6 REPLIES
Utkarsh_Mishra
Honored Contributor

Re: Found text 'KSC_EXIT_STATUS' without a '$?' Whats the fix?

This is an HP bug, which restict the command length... I'll shorly share the bug details..

 

The resolution for it is to change the .profile file and include below commands

 

 

PS1='$ '
export PS1

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
bzdafro
Collector

Re: Found text 'KSC_EXIT_STATUS' without a '$?' Whats the fix?

I tried setting the .profile but it didn't correct the issue.  I have heard that was the fix in the past.  I set the PS1="$ " and it sort of fixes the issues (but only for so many characters).   I'm not running a command that is very long.   I pasted the command I am trying to run below.   Its running on an AIX server.  I've tried adding additional echo $? at the end, and that didnt work either.  Any ideas?   This is so frustrating because its not a very long command and I run into this every once in awhile.  

 

if [ -e "formatMESSAGE_TEXT.class" ]; then chmod 774 "formatMESSAGE_TEXT.class"; fi

AlexSavencu
Honored Contributor

Re: Found text 'KSC_EXIT_STATUS' without a '$?' Whats the fix?

Hi,

 

try creating a UNIX script to run the same commands - from the script you can control the exit status to be passed to KSC_EXIT_STATUS. I think (I am not sure) that the if statement does not have exit codes.

 

cheers

alex


--remember to kudos people who helped solve your problem
Dennis Handly
Honored Contributor

Re: Found text 'KSC_EXIT_STATUS' without a '$?' What's the fix?

>I think that the if statement does not have exit codes.

 

The exit status of an "if" is the exit status of the last executed simple command, for this case chmod.

Utkarsh_Mishra
Honored Contributor

Re: Found text 'KSC_EXIT_STATUS' without a '$?' Whats the fix?

Or try to do it this way.... 

 

if the file is always same then... create a new (hidden) field (name it P_TEMP_FILE_NAME) in Object type and then put a constant value "formatMESSAGE_TEXT.class"... then can use this command

 

Here for debugging including the else section... later you can remove it...

 

 

if [ -e [P.P_TEMP_FILE_NAME]]; then chmod 774 [P.P_TEMP_FILE_NAME] ;

else echo "File Does Not Exist in Unix";

fi
ksc_exit

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
MaxH
Member

Re: Found text 'KSC_EXIT_STATUS' without a '$?' Whats the fix?

I too am experiencing this same issue in v9.30.  Unfortunately, the fix "to change the .profile file" does not work.  What if this occurs on all of the different files that are being transferred and imported?  Has anyone been able to come up with a valid permanent fix for this issue?

 

Thanks.

 

Max 

//Add this to "OnDomLoad" event