Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Question on Cobol Move statement - mixed move x to zzz9.
Michael Schey wrote:
> 18 year cobol veteran here.  Stumped trying to come up with a
> technical explanation on this one. I know why this is happening but I
> can't explain it to the higher ups because I can't explain it to
> myself.
>
> 05  WS-PROP-PREMISE                PIC X(04).
>
>
> 05  WS-FORMAT-4                 PIC ZZZ9.
>
>
> WS-PROP-PREMISE has a value of  3.   That is 3 followed by 3 spaces.
>
> The code MOVE WS-PROP-PREMISE to WS-FORMAT-4 results in
>
> 3000
>
> Why?
>
> When the sending field has 0003 we get 3 in the result.  This is what
> we are expecting from the sending system.  Now they are 'sometimes'
> sending us a 3 followed by 3 spaces, which gives us the 3000 in the
> result field.

One way to explain it:

In the original (asume ASCII), you have 33303030. The move routine
(evidently) moves only the right-most nibbles, x3x0x0x0 ==> 3000 and is
indifferent to the left-most nibbles



Report this thread to moderator Post Follow-up to this message
Old Post
HeyBub
05-22-07 02:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:43 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.