MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

moving numeric to alphanumeric

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
victor
Beginner


Joined: 21 Sep 2005
Posts: 14
Topics: 9

PostPosted: Thu Oct 20, 2005 1:58 am    Post subject: moving numeric to alphanumeric Reply with quote

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
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Thu Oct 20, 2005 3:22 am    Post subject: Reply with quote

You can get the answers on your own if you wrote sample programs for these....
Rolling Eyes
_________________
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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Oct 20, 2005 4:39 am    Post subject: Reply with quote

victor,

1. No error

2. RS3

3. RS300


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
victor
Beginner


Joined: 21 Sep 2005
Posts: 14
Topics: 9

PostPosted: Thu Oct 20, 2005 6:32 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Oct 20, 2005 7:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
victor
Beginner


Joined: 21 Sep 2005
Posts: 14
Topics: 9

PostPosted: Thu Oct 20, 2005 7:35 am    Post subject: Reply with quote

thanks kolusu
_________________
VICTOR
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group