For Programmers: Free Programming Magazines  


Home > Archive > Cobol > September 2005 > Re: Moving display to computational items









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Moving display to computational items
Robert Jones

2005-09-20, 7:55 am


anguel@web.de wrote:
> Hi,
>
> I've got a file description with computational components, e.g.
> 05 REC-DATE PIC 9(08) COMP.
>
> In the Working-Storage section, the date must be a display item for
> several reasons, e.g. 77 W-DATE PIC 9(08).
>
> How to move the content of the display to the comp field? A straight
> move seems to work, but the result recorded in the file is erroneous.
>
> Any hint?
>
> TIA
> Anguel


Hello Anguel

It is usually good practice when posting such questions to specify the
COBOL compiler being used, including the version, together with the
version of the operating system being used. A code fragment, or more,
is often helpful too.
On IBM mainframes USAGE COMP is a binary field, but that may not be
true for all other suppliers. Specifying the compiler options in use
is also often helpful.

In this case, I can't see from your explanation why there should be a
problem. Have you tried using the DISPLAY statement before and after
the MOVE statement? If you are looking at the file after it has been
written and the program ended, are you sure you are using exactly the
same file layout to write and then read the file? Have you tried using
an interactive debugger to see what is going on?

With regards

Robert

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com