Re: Newbie Question
- From: Donald Tees <donald_tees@xxxxxxxxxxxx>
- Date: Wed, 31 May 2006 12:00:48 -0400
theHip wrote:
No. Var1 is a ten (decimal)digit number. Var9 redefines the first 9What is stored is 2, but it is stored in binary. This seems like a
weird thing to do, truncated a value but stored as binary. How is
VAR1 used?
What version of CoBOL are you using? Compiler and OS.
I thought that that was what was stored there, but I couldn't make
sense of it. This routine is a check to make sure an account number is
valid. It goes through a whole bunch of multipys and divides and such,
and then the outcome of all this must match var2.
Unfortunately, all I was handed was a piece of paper with the code, no
clue what version of CoBOL was being used or compiler. I do have an
exe of the routine that I can run on XP.
Let me see if I have this part correct.
01 JB-WORK
03 VAR1 PIC 9(10)
03 VAR1-R REDEFINES VAR1
05 VAR9 PIC9(9).
05 VARLST PIC 9.
I am assuming that if 138755482 is moved to var1 then var9 would be
138755482 ... is that correct?
Thanks so much for the quick reply.
Peace.
digits as a 9 digit number, and Varlst redfines the low order digit as a
single digit number. So moving 138775842 to var1 moves 1387784 to var9,
and 2 to varlst. I would suspect that the routine uses the low order
digit in some sort of checksum routine.
Donald
.
- References:
- Newbie Question
- From: the_tragic_hip
- Re: Newbie Question
- From: Howard Brazee
- Re: Newbie Question
- From: theHip
- Newbie Question
- Prev by Date: Re: Newbie Question
- Next by Date: Re: Newbie Question
- Previous by thread: Re: Newbie Question
- Next by thread: Re: Newbie Question
- Index(es):
Relevant Pages
|