- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- HPE 9000 and HPE e3000 Servers
- >
- Re: Escape sequences in Server Express 4.0 MF COBO...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО07-19-2006 01:05 AM
тАО07-19-2006 01:05 AM
Escape sequences in Server Express 4.0 MF COBOL on HP-UX
I have a burning issue. We had an application running on MF COBOL 1.5 on HP-UX box.
We have recompiled the same using Server Express 4.0.
Now, certain cobol programs use shell scripts to perform tasks using CALL "SYSTEM"
THese scripts in turn use Escape sequences to execute some commands.
But in Server express 4.0, those escape sequences are directly displayed onto the screen instead of executing them.
Is there some way to overcome this issue ?? THe $TERM varaibles are the same.
Just that even a sample SE 4.0 program also doesn't understand escape sequence.
Is there some way in MFC SE 4.0 to get esc. sequence working ????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2006 02:16 AM
тАО07-19-2006 02:16 AM
Re: Escape sequences in Server Express 4.0 MF COBOL on HP-UX
Have you tried pling (!) ?
Prefix string to be escaped, so "\tmp" becomes "!\tmp"
Please let us know the result.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2006 05:16 PM
тАО07-19-2006 05:16 PM
Re: Escape sequences in Server Express 4.0 MF COBOL on HP-UX
Thanks for the reply.
I have a COBOL program which in turn calls a UNIX shell script.
Inside the shell script there is an executable which throws escape sequences onto the screen.
There is no way I can alter the escape sequence that is being thrown. Just that I need some way to get it functioning.
Is it a known fact that escape sequences are not supported by Server Express 4.0 ?? If that is so, how do we port older programs which use escape sequences extensively ??
Please reply.
Thanks,
Rajesh R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2006 03:55 PM
тАО07-20-2006 03:55 PM
Re: Escape sequences in Server Express 4.0 MF COBOL on HP-UX
./myscript
$TERM does NOT enable any functions at all. It is an implementation flag for your current terminal and the curses library of system calls. Inside your script, properly written code would use tput rather than hardcoded escape sequences. In that case, $TERM must match your terminal -- you can't force $TERM to a desired value as it may have nothing in common with your actual terminal. Use this command:
ttytype -s
to identify your terminal and if $TERM does not match what ttytype reports, then $TERM must be set to match your current terminal. You can do this:
eval $(ttytype -s)
and now you terminal is correctly documented. And if the script uses tput, then the correct escape sequences will be generated for your current terminal.
However, if the script is hardcoded (no tput usage), then $TERM has no effecty at all and you must research what kind of terminal the original programmer expected you to use. When you see portions of escape sequences on your screen, you can be sure that the terminal you are using is not supported by the script. This si the very reason that tput (and see man terminfo) exists.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2006 07:41 PM
тАО07-20-2006 07:41 PM
Re: Escape sequences in Server Express 4.0 MF COBOL on HP-UX
WE've fixed the problem. It was rather silly.
The TERM type gets changed to 'mfdebug' inside any Server Express 4.0 executable whatever the exported type.. However the TERM that we exported was 70092.
To notify COBOL SE 4.0 compiler not to do it, we need to remove +A option from COBSW flag before compiling it. (non-animate mode).
In that case 70092 is retained and everthing works fine.
But, the problem would still be there in Animate mode. We're trying to fudge the 70092 func. into mfdebug term src file.
I would like to have ur comments about this.
Thanks,
Rajesh R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2006 11:35 PM
тАО07-20-2006 11:35 PM
Re: Escape sequences in Server Express 4.0 MF COBOL on HP-UX
> Make sure that your COBTERMINFO environment variable is set
properly and then use mftic to build the $COBDIR/terminfo/mfdebug.src
file. If your function keys operate properly in a normal run unit
(cobrun or cobrun_t) then this should fix your problem.
Now this implies that the COBOL code generator is trying to replace the classic Unix terminal handling (ie, curses) in some fashion. I did not see any other useful references to TERM=mfdebug so you may need to research this. Now since the MFC code (and perhaps the script) seem to pay attention to TERM variable, a simple workaround would be something like this:
if [ $TERM = mfbedug ]
then
export TERM=70092
fi
Insert this to the top of the shell script (I'm assuming it's a POSIX or ksh script). I never advocate forcing a TERM variable like this since it bypasses all the automatic matching of terminal codes, but as long as you are using an HP terminal (or terminal emulator such as Reflection for HP, QCterm or the Minisoft HP emulator) this should work.
Bill Hassell, sysadmin