If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > informix user: Unable to set the terminal to vt100

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-05-10, 07:41
sysad3 sysad3 is offline
Registered User
 
Join Date: Oct 2010
Posts: 3
informix user: Unable to set the terminal to vt100

Hi Informix Gurus,

I am trying to operationalize the "ontape" backup by putting this inside a script wherein there is a menu with options and once the option for ontape was selected the backup will run wittout giving our operators access to command prompt.

I have this user created for operators (which is opsuser) that will switch user to the informix account in my script and run the ontape backup command.

from the menu script:
$SUDO su - informix -c "$BIN/informix.sh"
~~~~~~~~~~~~~~

informix.sh contains:
#

setenv TERM vt100
/informix/DEV/bin/ontape -s -L 0
~~~~~~~~~~~~~~~~~~~~~~


When i am running the script as the operator user, the script somehow bypasses the setenv command.

~~~~~~~~~~~~~~~~~~~~~~
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the U.S. Government is subject to
restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
Technical Data and Computer Software clause in DFARS 252.227-7013.

Hewlett-Packard Company
3000 Hanover Street
Palo Alto, CA 94304 U.S.A.

Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).
TERM = (hp)
0A/home/isodops/admin/backup/informix.sh[3]: setenv: not found

~~~~~~~~~~~~~~~~~~~~~~~~

At this point in the program i am already the user informix but unable to set the TERM variable which is denying me to execute the ontape command.

With access to the command prompt I am able to set the TERM variable successfully. What seems to be wrong in here then?

Is there a limitation with the usage of the ontape command that its not possible to incorporate it in a script and is really done manually?
Reply With Quote
  #2 (permalink)  
Old 10-05-10, 11:30
bigcalm bigcalm is offline
Registered User
 
Join Date: Jul 2009
Posts: 37
Maybe it's korn shell based?

In which case,

export TERM=vt100

rather than

setenv TERM vt100
Reply With Quote
  #3 (permalink)  
Old 10-05-10, 20:29
sysad3 sysad3 is offline
Registered User
 
Join Date: Oct 2010
Posts: 3
default shell of informix is csh
Reply With Quote
  #4 (permalink)  
Old 10-05-10, 20:36
sysad3 sysad3 is offline
Registered User
 
Join Date: Oct 2010
Posts: 3
By the way may OS is HP-UX 11.11.

Here are some of things I've done to set the terminal to vt100

1. added a "set TERM=vt100" to /etc/profile
2. added a "setenv TERM vt100" to .cshrc file of the informix user
3. added a "set TERM=vt100" to .profile of the informix user.

Still to no avail.
Reply With Quote
  #5 (permalink)  
Old 10-09-10, 12:33
bigcalm bigcalm is offline
Registered User
 
Join Date: Jul 2009
Posts: 37
You might also need to set the TERMINFO environment variable - I think the TERMINFO file is somewhere under the informix directory, not sure where, maybe /etc/
Reply With Quote
  #6 (permalink)  
Old 10-25-10, 01:40
Johanna2010 Johanna2010 is offline
Registered User
 
Join Date: Oct 2010
Posts: 2
Thank you for your nice post.I really enjoy to visit your post.I have visited lot of post yours is the best one.Thanks for sharing keep posting .


outlook add ins
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On