HP3000-L Archives

October 1995, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Leon Degeling <[log in to unmask]>
Reply To:
Leon Degeling <[log in to unmask]>
Date:
Wed, 25 Oct 1995 19:29:09 +-100
Content-Type:
text/plain
Parts/Attachments:
text/plain (65 lines)
.From:  Tom Harmon[SMTP:[log in to unmask]]
.Sent:  woensdag, oktober 25, 1995 4:35
.To:    Multiple recipients of list HP3000-L
.Subject:       COBOL Accept using ENTER
.I have a COBOL program that has to. switch from V/3000 mode to =
.character mode
.and then ask some questions. My problem is that the users (being so =
.used to
.pressing the block mode ENTER key) press the ENTER key instead of .the =
RETURN
.key which causes a keyboard lock on the users Reflection session.
.Is there any way that my COBOL program can "sense" that the user =
.pressed the
.wrong ENTER key and accept the response and continue?
.Tom Harmon                 [log in to unmask]
.Systems Analyst            voice: (715) 839-4793
.Eau Claire Area Schools    fax:   (715) 833-3481
.500 Main Street
 
When you press enter in line-mode the entire line is send to the =
computer.
What I do is this
On the first column I display the escapecode to put security on
On column 2 I put a character really hard to type (alt 168 =BF is my =
favourite)
  this character is not visible!
On column 3 I set security off again.
On the remaining columns I put the prompt, and accept the data.
When the string contains my special character I warn the user they =
pressed
the enter key.
 
this looks like this
 
display security-on with no advancing
display %168 with no advancing
display security off with no advancing
display "Enter value you morron " with no advancing
accept instring free
perform varying i1 from 1 by 1
  until i1 > 10
  or instring(i1:1) =3D %168
     continue
end-perform
if i1 < 11
  display "Dear user, I do NOT like you at all"
end-if =20
 
I'm at home right now, so I don't know the exact escape-codes, but you =
can always email me for details.
 
Leon Degeling
Amsterdam, the Netherlands
[log in to unmask] (now)
[log in to unmask] (soon)
http://www.pi.net/~leon
 
ps I'm looking for a developer job somewhere else on this planet for =
about 2 years. Starting summer next year.
Experience:
HP3000 Mpe-iX/Cobol/C/Image/Powerhouse/ORACLE
HP9000 hpUx/C/c++/Oracle
Windows gupta/C
=20

ATOM RSS1 RSS2