Page 1 of 1

Passing -12.34 as a input to COMP

PostPosted: Tue Nov 02, 2010 11:30 am
by irameshraja
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.

Re: Answer for this Question?

PostPosted: Tue Nov 02, 2010 3:46 pm
by Robert Sample
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/

Re: Answer for this Question?

PostPosted: Wed Nov 03, 2010 2:17 am
by dick scherrer
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.

Re: Passing -12.34 as a input to COMP

PostPosted: Thu Dec 23, 2010 1:59 pm
by irameshraja
how to initialize db2-cics program

Re: Passing -12.34 as a input to COMP

PostPosted: Thu Dec 23, 2010 1:59 pm
by irameshraja
how to identify whether it is a cobol or db2 or cics

Re: Passing -12.34 as a input to COMP

PostPosted: Thu Dec 23, 2010 8:19 pm
by NicC
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"????

Re: Passing -12.34 as a input to COMP

PostPosted: Thu Dec 23, 2010 8:22 pm
by NicC
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.

Re: Passing -12.34 as a input to COMP

PostPosted: Wed Dec 29, 2010 12:47 pm
by FUFENG
********************************
DISPLAT 001K
COMP 001K
COMP-1 -.12000000E 02
COMP-2 -.12000000000000000E 02
COMP-3 001K
it is the result
hope it can help you

Re: Passing -12.34 as a input to COMP

PostPosted: Wed Dec 29, 2010 12:50 pm
by FUFENG
sorry, it wrong
this is the correct result

********************************
DISPLAT 123M
COMP 123M
COMP-1 -.12340000E 02
COMP-2 -.12340000000000000E 02
COMP-3 123M