GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Setting TERM variable in Script to run from CR...
Operating System - HP-UX
1843977
Members
1631
Online
110226
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2000 07:31 AM
08-31-2000 07:31 AM
We have the need to setup some environment variables in a script that ultimately executes a cobol program and is scheduled by CRON. When it gets to where it runs the cobol progran, I get the error "Terminal type not defined". We copied the following from the root .profile and put it at the top of the script, but now we're getting the error "not a terminal":
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
export TERM
How can we do this? Cobol apparently needs TERM set, but we need to run this from CRON.
Help!?!?!
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
export TERM
How can we do this? Cobol apparently needs TERM set, but we need to run this from CRON.
Help!?!?!
2 Years old on HP-UX 10.20 R9000 server
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2000 07:35 AM
08-31-2000 07:35 AM
Solution
The 'not a terminal' message is from 'stty'.
You don't want to run 'stty' or 'tset' from cron because they require a real terminal to be connected.
If your application requires TERM then simply export the require value e.g.
export TERM=vt220
You don't want to run 'stty' or 'tset' from cron because they require a real terminal to be connected.
If your application requires TERM then simply export the require value e.g.
export TERM=vt220
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2000 07:36 AM
08-31-2000 07:36 AM
Re: Setting TERM variable in Script to run from CRON
Surely it can't that easy?!? :-)
I'm glad I have this forum...Thank you all!
I'm glad I have this forum...Thank you all!
2 Years old on HP-UX 10.20 R9000 server
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP