Re: Newbie Question
- From: Binyamin Dissen <postingid@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 31 May 2006 18:55:35 +0300
On 31 May 2006 08:27:26 -0700 the_tragic_hip@xxxxxxxxx wrote:
:>I had this small cobol routine dropped on my desk and need to convert
:>it into a vb app, but I am not all that familiar with most of cobol. I
:>can read most of it and decipher what is going on, but having trouble
:>with this move.
:>var1 pic 9 comp.
:>var2 pic 9(10)
:>If var2 had the value of 138755482 and
:>MOVE VAR2 TO VAR1 is executed, what is actually stored in var1.
Probably depends on your COBOL and various compiler options.
A PIC 9 comp will probably be stored in a halfword (I don't know how much the
COBOL standard allows the size of a COMP to be implementer defined).
It may take the last digit and store it as binary.
It may take the whole number, convert it to binary, truncate to halfword and
store that (IBM TRUNC option).
The best thing is too look at the generated code or try it out with the same
compiler options and see what happens.
:>I apologize if this is a no brainer.
Not at all.
--
Binyamin Dissen <bdissen@xxxxxxxxxxxxxxxxxx>
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel
Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.
I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
.
- References:
- Newbie Question
- From: the_tragic_hip
- Newbie Question
- Prev by Date: Re: Rewrite Twice?
- Next by Date: Re: Newbie Question
- Previous by thread: Re: Newbie Question
- Next by thread: Re: Newbie Question
- Index(es):
Relevant Pages
|
|