If that character is NULL then no. On HP terminals you could turn on
'Display Functions' I think and on some of them it will display a little nu
character. But all of them do not do this.
James
-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]]On
Behalf Of Richard Barker
Sent: Wednesday, March 06, 2002 4:24 AM
To: [log in to unmask]
Subject: Re: [HP3000-L] Cobol help - EVEN STRANGER
Not knowing Cobol that well, wouldn't the display show the other character
if it is in the variable, so when I'm displaying "'"card-type"'" and the
program displays '@', shouldn't it show something else.
-----Original Message-----
From: Steve Miller [mailto:[log in to unmask]]
Sent: Tuesday 05 March 2002 17:54
To: Richard Barker; [log in to unmask]
Subject: Re: Re: Cobol help - EVEN STRANGER
Richard,
If you are not initializing 'card-type' before doing an ACCEPT, it is
possible your second character will have garbage in it when only entering
one character. I have found that ACCEPT will only populate the number of
characters entered in the field. For example, you have a two byte field,
but only enter one byte - @. The second byte of card-type remains
unchanged. Now, you make a comparison of the constant "@" (or technically
"@ " padded with a space) with "@?" (? being some bit pattern but most
likely not space). That will fail, of course.
Try adding a VALUE SPACES to your field definition (or MOVE SPACES TO
card-type before your ACCEPT). Why this worked before with no changes I
can't say, but I always make it a habit to initialize any ACCEPT fields,
having been burned before.
Steve Miller
Beechglen Development, Inc.
Cincinnati, Ohio
----- Original Message -----
From: "Richard Barker" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Tuesday, March 05, 2002 11:27 AM
Subject: Re: Cobol help - EVEN STRANGER
> I think a new emergency patch we applied must be causing lots of Cobol
> problems, or I am going mad:
>
> card-type pic XX.
>
> if pay-payment-batch = "PENDING"
> DISPLAY "pay-payment-code" pay-payment-code
> DISPLAY "Card type" "'"card-type"'"
> if pay-payment-code = card-type or card-type = "@"
> display "true"
> display "Post " pay-rec-loc-line " " pay-payment-code " "
> pay-payment-text " " pay-payment-batch " "
> pay-payment-time
> move payments to ccardin-rec
> write ccardin-rec
> end-if
> end-if
>
> When I run this:
>
> Enter card type: @
>
>
> pay-payment-codeVI
> Card type'@'
> pay-payment-codeVI
> Card type'@'
> pay-payment-codeDI
> Card type'@'
>
> etc....
>
> The program hasn't been changed for over a year and always worked, if I
> change the logic to:
>
> if pay-payment-code = card-type or card-type = "XX"
>
> Enter card type: XX
>
> It works.
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|