Progress 10.2 Shell to Unix

jozef

New Member
Hi again.

Can anyone enlighten me as to the differences between 9.1 (Sco-Unix) and 10.2 (Redhat) when you shell out to the unix command-line using "unix"? Using ksh.

The reason I ask is that in 9.1, when I shell out, my environment functions the same was as it does before going into progress. E.g. PS1 is still the same, command history escape sequences work, alias commands are still set (e.g. alias ll="ls -al") and work.

In 10.2 none of the above still work. Does progress do something different or is it something to do with the O/S?
 
I've not noticed any such differences. I suspect that it is a difference in your setup between SCO and RH rather than a Progress difference. You could test that it isn't Progress' fault by shelling out from some other program (like vi) on both platforms.
 
I've not noticed any such differences. I suspect that it is a difference in your setup between SCO and RH rather than a Progress difference. You could test that it isn't Progress' fault by shelling out from some other program (like vi) on both platforms.

On RH, I shelled to the command prompt from both Progress and vi. vi retained all settings, Progress didn't. Is there another way of getting to the prompt from Progress apart from using the "unix" command?
 
You really ought to be using OS-COMMAND. UNIX is quaint but less portable (OS-COMMAND works for Unix & Windows although the actual command being used may need to be tweaked). OTOH they both make the same system call ;) And it should be the same system call that vi is making.

Check the SHELL variable after shelling out from both vi and Progress. Maybe check PATH too. It could be that the script that starts up your Progress session is messing with things that it shouldn't be messing with.
 
Hmmm. Both show /bin/ksh and the PATH's are almost the same. vi doesn't have the dlc directory in it (but does have the dlc/bin).

How would I use OS-COMMAND to get to the unix prompt?
 
You don't use OS-COMMAND to get a unix prompt, but you can pass unix commands to it. This is the basic example from the help files (which you should read)...

Code:
DEFINE VARIABLE comm-line AS CHARACTER FORMAT "x(70)".
REPEAT:
  UPDATE comm-line.
  OS-COMMAND VALUE(comm-line).
END.
 
Thanks Tom. Yeah I know about the OS-COMMAND to run unix commands but in the app we use, we need to get to the unix prompt to do other stuff.

The OS-COMMAND("sh") on SCO and RH doesn't work either. On SCO, instead of echoing the value of "$PWD" (e.g. /usr/bin), it echoes the string "$PWD". On RH I get "sh-3.2".

There must be something else going on on RH.
 
I don't, offhand, know the gory details but there are some rules about how shells get started and which of the various .profile .*rc etc, etc files get processed when a new shell is started. It may just be that you have your variables and aliases defined in different startup files for the 2 environments. I vaguely recall, for instance, that there is a difference between os-command( "sh" ) and os-command( "sh -" ).
 
Back
Top