View previous topic :: View next topic
|
Author |
Message |
Rajkumar_n
New User
Joined: 07 Dec 2006 Posts: 51 Location: Bloomington
|
|
|
|
Hi,
I have a very basic question? sorry to post this. Need some ones advise
I have a variable defined two variables
Code: |
WS-TEST-1 PIC ---,---,---.99.
WS-TEST-2 PIC ZZZ,ZZZ,ZZZ.99. |
Is there any difference between two variables. Does any negotiation occur
for variable WS-TEST-1
Thanks and Regards,
Rajkumar Nerella |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Is there any difference between two variables. |
Yes. How might they be the same (other than overall length)?
Quote: |
Does any negotiation occur for variable WS-TEST-1 |
What kind of negotiation do you have in mind?
What are you trying to learn? When the question is better understood, better answers should follow. . . |
|
Back to top |
|
|
Rajkumar_n
New User
Joined: 07 Dec 2006 Posts: 51 Location: Bloomington
|
|
|
|
I test this test case. Here are my findings
When we pass positive value to both fields
WS-TEST-1 PIC ---,---,---.99. and
WS-TEST-2 PIC ZZZ,ZZZ,ZZZ.99.
No difference is found byt when you pass negative value to above fields
WS-TEST-1 variable is good enought to hold the negative value but the second variable will not be able to hold the negative value.
Thanks and Regards,
Rajkumar Nerella |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
The COBOL Language Reference Manual does an excellent job of answering your question (and includes examples). |
|
Back to top |
|
|
|