Passing -12.34 as a input to COMP



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Passing -12.34 as a input to COMP

Postby irameshraja » Tue Nov 02, 2010 11:30 am

suppose i am passing -12.34 as a input to COMP an COMP-3 parameter. what was the output for both as well as storage representation of both. Can any one guide me please.
irameshraja
 
Posts: 3
Joined: Tue Jul 06, 2010 4:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Answer for this Question?

Postby Robert Sample » Tue Nov 02, 2010 3:46 pm

The internal representation is the same, whether it is a parameter, a variable in WORKING-STORAGE, or a variable in LINKAGE SECTION. Your guidance is to follow this link to the actual COBOL manuals and then you can read them. You will find out, on your own, what the internal representation of each is -- and you will then be on your way to becoming a professional IT person. http://www-01.ibm.com/software/awdtools ... s/library/
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Answer for this Question?

Postby dick scherrer » Wed Nov 03, 2010 2:17 am

Hello and welcome to the forum,

If you find something in a manual that is not clear, post what you found and your doubt. Someone will be able to clarify.

If you run an experiment (i surely encourage this) and something unexpected happens, post what you tried and what happened.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Passing -12.34 as a input to COMP

Postby irameshraja » Thu Dec 23, 2010 1:59 pm

how to initialize db2-cics program
irameshraja
 
Posts: 3
Joined: Tue Jul 06, 2010 4:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Passing -12.34 as a input to COMP

Postby irameshraja » Thu Dec 23, 2010 1:59 pm

how to identify whether it is a cobol or db2 or cics
irameshraja
 
Posts: 3
Joined: Tue Jul 06, 2010 4:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Passing -12.34 as a input to COMP

Postby NicC » Thu Dec 23, 2010 8:19 pm

Do you really want us to help you with these 2 questions? If so READ THE FORUM RULES!! Start a new topic for each query. Someone will move these to the correct sections - if we can figure out what you mean.

How to initialise a db2-cics program
. What do you mean and in which language? Have you read the CICS and DB2 User Guides?

how to identify whether it is a cobol or db2 or cics
What is "it"????
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Passing -12.34 as a input to COMP

Postby NicC » Thu Dec 23, 2010 8:22 pm

Oh, by the way...have you discovered the answer to your original question? If so, did this forum help? If so...say "Thank you" to the people who gave up their time to assist.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Passing -12.34 as a input to COMP

Postby FUFENG » Wed Dec 29, 2010 12:47 pm

********************************
DISPLAT 001K
COMP 001K
COMP-1 -.12000000E 02
COMP-2 -.12000000000000000E 02
COMP-3 001K
it is the result
hope it can help you
FUFENG
 
Posts: 6
Joined: Wed Dec 29, 2010 12:00 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Passing -12.34 as a input to COMP

Postby FUFENG » Wed Dec 29, 2010 12:50 pm

sorry, it wrong
this is the correct result

********************************
DISPLAT 123M
COMP 123M
COMP-1 -.12340000E 02
COMP-2 -.12340000000000000E 02
COMP-3 123M
FUFENG
 
Posts: 6
Joined: Wed Dec 29, 2010 12:00 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post