Jump to content


Photo
- - - - -

UNIX command not working


19 replies to this topic

#1 Michael Meneses

Michael Meneses

    Member

  • Members
  • PipPip
  • 47 posts
  • Location:GREENSBORO, United States

Posted 13 January 2003 - 04:55 PM

Hi everybody,

here's a simple logic in my program.

$DLT_FILE = 'rm ' + C_XTEST + '.' + CDATE(RUN_DATE,'YYYYMMDD')

#RET = SYSTEM($DLT_FILE)

it's working before in window 98 but when we changed our client pc to XP, my PC hangs and can't able to execute this piece of logic. I have a lot of program that uses the same approach and they are all mess up.
Any Idea on how to handle a system command call in UNIX under windows XP ?

#2 Bill Loven

Bill Loven

    Expert

  • Members
  • PipPipPipPip
  • 147 posts
  • Gender:Male
  • Location:Coppell, United States

Posted 13 January 2003 - 08:56 PM

Mike, We are running XP, with Proiv 5.0 on SCO 7.

I have not had any problems running shell scripts. I do retrieve the PRODATA path and change directory before I run any other scripts.

Bill

#3 Rick Young

Rick Young

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 265 posts
  • Gender:Male
  • Location:Guelph, Canada

Posted 13 January 2003 - 09:04 PM

Unless C_XTEST is some internal var that I am unaware of - this shouldn't work, period.

So, I assume that you have omitted a $ or some quotes.

So testing with
$C_XTEST = 'rick'
#RUN_DATE = @DATE

$DLT_FILE = 'rm ' + $C_XTEST + '.' + CDATE(#RUN_DATE,'YYYYMMDD')

works fine for me so long as $DLT_FILE does not exceed 32 chars or it is DEFINEd larger

or testing with
$DLT_FILE = 'rm ' + 'C_XTEST' + '.' + CDATE(#RUN_DATE,'YYYYMMDD')

also works for me.

Tested with 4.6 bld 276 client on Solaris platform as well as HP-UX - and XP Pro workstation.

#4 Rick Young

Rick Young

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 265 posts
  • Gender:Male
  • Location:Guelph, Canada

Posted 13 January 2003 - 09:09 PM

Neglected to mention....

Solaris kernel was 5.0 and HP-UX was 4.6

#5 Michael Meneses

Michael Meneses

    Member

  • Members
  • PipPip
  • 47 posts
  • Location:GREENSBORO, United States

Posted 13 January 2003 - 09:30 PM

Rick, That is exactly on my logic. Also I cannot get into the shell. Is this has something to do with the setting ?

#6 Michael Meneses

Michael Meneses

    Member

  • Members
  • PipPip
  • 47 posts
  • Location:GREENSBORO, United States

Posted 13 January 2003 - 09:32 PM

forgot to mention I'm using version 4.0 / SunOS 5.6

#7 Rick Young

Rick Young

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 265 posts
  • Gender:Male
  • Location:Guelph, Canada

Posted 13 January 2003 - 10:02 PM

*baffled look*

I am also able to execute !bash on our Sun 5.8 box, from the GUI kernel prompt.

#8 Michael Meneses

Michael Meneses

    Member

  • Members
  • PipPip
  • 47 posts
  • Location:GREENSBORO, United States

Posted 13 January 2003 - 10:08 PM

Rick, thanks but unfortunately I wasnt able to execute that on my command line, I try the following !ksh, !bash but no luck.

Bill, did you try to shell out your pro-iv ? I think this is the reason why my unix command line was not executed (I cant get into the shell) because In the first place my XP suspends my telnet connection.

#9 Guest_Rick_*

Guest_Rick_*
  • Guests

Posted 13 January 2003 - 11:05 PM

(with thanks to Mike Schoen for his input)

Which telnet are you using? If you are using the one that comes with XP - I guess that you also have the issue of local echo - duplicating your login name characters and displaying your password.

I'm running the Win2K telnet on XP.

HTH

#10 Michael Meneses

Michael Meneses

    Member

  • Members
  • PipPip
  • 47 posts
  • Location:GREENSBORO, United States

Posted 14 January 2003 - 01:31 PM

I'm using XP's telnet... yeah I think it's the telnet. I'll let you know guys if I got a resolution to this problem.

thanks,
Mike

#11 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 696 posts
  • Location:Rural France

Posted 14 January 2003 - 02:19 PM

Mike,

As someone who doesn't really use GUI, I'm intrigued by your apparent problem.

It seems to me that execution of a SYSTEM command should occur entirely within the Unix server and have no effect whatsoever on the client (SYSTEM-CRT would be a different issue of course).

If the client is really affected by a SYSTEM command the question is why.. it suggests something is happening that should be unnecessary (and is probably undesirable).

Yours slightly baffled,
Richard
Nothing's as simple as you think

#12 Michael Meneses

Michael Meneses

    Member

  • Members
  • PipPip
  • 47 posts
  • Location:GREENSBORO, United States

Posted 14 January 2003 - 04:08 PM

Rick, where can i find WIN2K emulator ?

#13 Rick Young

Rick Young

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 265 posts
  • Gender:Male
  • Location:Guelph, Canada

Posted 14 January 2003 - 04:17 PM

Mike

I'm not using an emulator. I simply went to a Win2K machine and grabbed telnet.exe off of it, threw it in a directory (errr folder) and point my .piv to use it.

I believe, though I cannot state it with absolute certainty, that ProIV gave us this workaround for the XP issue.

I suspect it wouldn't be appropriate for me to just drop telnet.exe as an attachment on this forum.

#14 Cleve Haynes

Cleve Haynes

    Expert

  • Members
  • PipPipPipPip
  • 172 posts
  • Gender:Male

Posted 14 January 2003 - 05:03 PM

Hi

The 'SYSTEM' command is used for both client and server commands...

eg:
#RC = SYSTEM('GUI WINDOWS NOTEPAD.EXE')
#RC = SYSTEM('/usr/bin/rm -f myfile')

Check out the Developers guide to logic.

Cleve.

#15 Ralph Gadsby

Ralph Gadsby

    Expert

  • Members
  • PipPipPipPip
  • 154 posts
  • Gender:Male
  • Location:United Kingdom

Posted 14 January 2003 - 05:31 PM

Have you looked at the FAQ on the official PROIV website? I posted an alternative freeware telnet program (puttytel) that works with XP some months ago on the FAQ.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users