View previous topic :: View next topic
|
Author |
Message |
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
I am facing a problem when i try to initialize a PS variable with Zero
I have these two fields defined in my output file.
O-XXXX-RATE +654 6 P 7
O-XXXX-FEE +660 8 P 2
When i try to initialize
O-XXXX-RATE = 0
O-XXXX-FEE = 0
I am getting invalid value in the field in the output file.
How can i initialize the numerics field? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I am getting invalid value in the field in the output file.
|
What value is in the output file?
As an experiment, please try
MOVE 0 to O-XXXX-RATE
and post back with what happens. |
|
Back to top |
|
|
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
I tried MOVE 0 to O-XXXX-RATE too but
i am getting the same X'4040404040F0' in the output field |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Is your output defined as a file or a report? |
|
Back to top |
|
|
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
My output is defined as a File. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please define a new file that has a 10-byte character field and an 8 p 2 field. Initialize the character field to 10 "A"s and the packed-decimal field to zeros and write a record.
Post what is in that record.
It may be possible that the larger record is getting the zeros overlaid with spaces by some other part of the code.
If the simple 2-field test fails, we can work on that - if it works, then it will take a bit of digging into the bigger file/code. |
|
Back to top |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
do you have a redefined field that is alpha and overlaying the position/field. Are both fields invalid or just one?
Please post your complete file definition. |
|
Back to top |
|
|
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
Hi
Yes i found the mistake it was a problem with the code. I was using an old version of the copybook and the Packed decimal field was overlaid with Spaces.
Thanks for the helping hand.... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome - thanks for posting that it is now working
d |
|
Back to top |
|
|
|