View previous topic :: View next topic
|
Author |
Message |
shivani97
New User
Joined: 01 Aug 2009 Posts: 1 Location: bangalore
|
|
|
|
Hi I have some question on comp-3.plz answer me.
1) what is difference between pic 9(4)v99 and pic s9(4)v99 comp-3.
2) what are valid moves to pic s9(4)v99 comp-3 variable.
for example: 1)if A is containing 4578.99,then MOVE A TO B.Is is correct or give error where B is pic s9(4)v99 comp-3.
2)Also MOVE 4578.99 TO B will give what value(same value or incorrect)
3)What will be answers of above if B is pic 9(4)v99.
I will be thankful if you answer my question.
SHIVANI |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi Sivani,
What did the Manuals tell you... Did you have a look ?? |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
As Binop suggests, see the COBOL Language Reference Manual. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
Back to top |
|
|
rexzone1
New User
Joined: 16 Dec 2006 Posts: 14 Location: Halifax, Canada
|
|
|
|
Hi Shivani,
Please find below the answers to your questions if you are not sure after reading the manuals above.
1) The difference between PIC 9(4)v99 and PIC S9(4)v99 comp-3 is only the memory occupied by both the fields. Your first field occupies 6 bytes where as the second field occupies 4 bytes.
2) You can move a normal decimal field PIC 9(4)V99 to COMP-3 field as well as PIC 9(4)V99 COMP to the COMP-3 field. You will get same value if you move 4578.99 to 9(4)V99 field. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
rexzone1 wrote: |
1) The difference between PIC 9(4)v99 and PIC S9(4)v99 comp-3 is only the memory occupied by both the fields. Your first field occupies 6 bytes where as the second field occupies 4 bytes. |
Now obviously, that's wrong. What're two other differences? |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Hint: The COBOL Language Reference Manual has the answer. |
|
Back to top |
|
|
|