View previous topic :: View next topic |
Author |
Message |
victor Beginner
Joined: 21 Sep 2005 Posts: 14 Topics: 9
|
Posted: Thu Oct 20, 2005 1:58 am Post subject: moving numeric to alphanumeric |
|
|
Hi All,
Got some doubt in basics, I would appreciate if someone helps in this.
1. If I used COPY instead of INCLUDE in Cobol DB2 Program, What type of Error Code did we get?
2. WORKING-STORAGE SECTION.
05 AA PIC X(05) VALUE 'PQRST'.
05 BB PIC 9(3).
PROCEDURE DIVISION.
MOVE AA TO BB.
DISPLAY BB.
STOP-RUN.
Question 1. what is the output? or will it throw error.
2. Suppose if the picture clause of BB is 9(3)v99, then waht is
the output or it will trow error? _________________ VICTOR |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Oct 20, 2005 3:22 am Post subject: |
|
|
You can get the answers on your own if you wrote sample programs for these....
_________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Oct 20, 2005 4:39 am Post subject: |
|
|
victor,
1. No error
2. RS3
3. RS300
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
victor Beginner
Joined: 21 Sep 2005 Posts: 14 Topics: 9
|
Posted: Thu Oct 20, 2005 6:32 am Post subject: |
|
|
Thank u Kolusu,
One doubt yea, Since you said NO ERROR for my first question, Why we are coding DCLGEN member_names in INCLUDE instead we can code it in copybook isn't it? _________________ VICTOR |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Oct 20, 2005 7:04 am Post subject: |
|
|
victor,
A COPY is a Compiler directive statement. copybook will NOT be expanded until you get to compile step. So the pre-compile step will fail as it does not find the table definitions. However the latest version of the compilers can expand the copybooks also now.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
victor Beginner
Joined: 21 Sep 2005 Posts: 14 Topics: 9
|
Posted: Thu Oct 20, 2005 7:35 am Post subject: |
|
|
thanks kolusu _________________ VICTOR |
|
Back to top |
|
|
|
|