HPE 9000 and HPE e3000 Servers
Showing results for 
Search instead for 
Did you mean: 

migration HP3000/HP9000 cursor positioning

Rob Daniels

migration HP3000/HP9000 cursor positioning

Hi all,
I'm working on a migration of Cobol programs from HP3000 to HP9000. Up till now the interactive programs work fine except for one â littleâ (I hope) problem.
In my cobol programs I use escapes for locking and unlocking the display at a certain point. This works fine with MF cobol on the HP9000. However when I try to position the cursor at a specific column and row, it wonâ t work. On the HP3000 the escape is â esc&a00c17Yâ . Now I thought when I change the octal value of the escape in decimal (which works fine using locking and unlocking escapes) it would work. It doesnâ t work!
Could someone help me out with this please?
Kind Re
Stan Sieler
Respected Contributor

Re: migration HP3000/HP9000 cursor positioning


&a00c17Y works fine on my HP 3000.

Things to check...turn on "display functions" in your terminal (or
terminal emulator) while running on the
HP 3000 and verify that you are indeed
getting that sequence. (BTW, that sequence
puts the cursor in the left margin of
the 18th line of the display (not of terminal memory, of course, since you used
Y instead of R).)

I'm a little puzzled of your mention of
octal ... the address escape sequence
is not using octal (never has, AFAIK).

To get faster responses, try the newsgroup
comp.sys.hp.mpe (reflected as the
mailing list HP3000-L (see
for info)
Bill Hassell
Honored Contributor

Re: migration HP3000/HP9000 cursor positioning

It may be too late but the 'better' way to code terminal applications for the 9000 is to use the Curses library. The world of HP-UX is almost unaware of what an HP terminal might be (every glass terminal or PC emulator program is a vt100...). The Curses library contains hundreds of terminal actions (cursor positioning, load softkeys, clear screen, etc) but they are never hardcoded in the program (portability issues). Instead, if you ask the Curses library to clear the screen, the library queries $TERM and then matches the clear function to the right sequence in the terminfo database. To see how this works, you can use the tput command as a commandline interface to Curses:

tput clear

Or to demonstrate video enhancements:

echo "$(tput bold)testing bold $(tput smul)underlined"

Now if you simply change $TERM to another model as in: TERM=vt100 or TERM=wyse60, and repeat the above commands, they produce different escape codes--no programming or hardcoded changes necessary. (on an HP terminal or Reflection for HP, turn DISPLAY FUNCTIONS on to see the codes).

Bill Hassell, sysadmin