Thread: Cobol-problem

  1. #1
    Unregistered
    Guest

    Cobol-problem

    I am studying cobol on my own but have a serious problem,hope somebody can help me:
    data division.
    working-storage section.
    01 tval pic 999.
    01 redefines tval.
    03 pic x.
    03 sign pic x.
    01 ascii pic 999.

    procedure division.
    main.
    move 0 to tval
    display "enter sign"
    accept sign no beep
    move tval to ascii
    display "sign is:" ascii
    stop run.

    The problem is in the working-storage section. Why not just write:
    01 sign redefines tval; pic xxx.
    I 've tried this but it doesn't work pretty good,got the wrong result. But why???

  2. #2
    Unregistered
    Guest
    forgot something very important:
    01 tval pic 999 usage binary !!!!!!!!!!!

  3. #3
    Registered User CumQuaT's Avatar
    Join Date
    Sep 2001
    Posts
    73

    The answer is simple...

    DONT USE COBOL!!!!!!!!!

    Delphi! C++! VB! DB! EVEN QB! JUST DONT USE IT! FOR YOUR OWN SAFETY!!!
    Why? The often unanswerable question. If it is unanswerable, why answer it?

    Join the Cult of Sheograth, it's the place to be!

    http://cultosheogorath.proboards16.com

    Lord, we know what we are, yet we know not what we may be... Who wrote that anyway? If you know, E-Mail me. [email protected]

    Joy to all the fishes...

    **infected by frenchfry164**

  4. #4
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    VB and QB? I think not...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM