View previous topic :: View next topic |
Author |
Message |
vivek1983 Intermediate
Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Wed May 10, 2006 6:36 am Post subject: easytrieve - Doubt regarding packed decimal |
|
|
Hi,
Here is my query:
-> I got an error when moving an alpha numeric field to
a packed decimal field.
-> scenario :
FILE FILEB
PRICE * 12 A
FILE FILEC
C-PRICE * 10 P 5
( Where * stands for the starting position)
Please help me out in moving the values from PRICE to C-PRICE.
( I got a length error when i tried moving the above alpha-numeric field)
Thanks in advance,
Vivek.G |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Wed May 10, 2006 7:27 am Post subject: |
|
|
vivek1983,
You canNOT move an alpha-numeric value to packed decimal field. you can define your PRICE as PRICE * 12 N or PRICE 12 N 0. If you have signs (-, +) in your price then you will not get the correct results. In that case there is an alternative. Check this link for an example.
http://mvsforums.com/helpboards/viewtopic.php?t=5097&highlight=ezt%2A
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
vivek1983 Intermediate
Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Wed May 10, 2006 9:29 am Post subject: |
|
|
Hi,
If not in easytrieve, is there any possiblity to convert alphanumeric to packed decimal using SORT JCL, or thru Cobol?
Regards,
Vivek.G _________________ Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay) |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Wed May 10, 2006 9:40 am Post subject: |
|
|
vivek1983,
Why do you think easytrieve cannot be used to convert that? you can do that provided you change your field definition.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
vivek1983 Intermediate
Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Wed May 10, 2006 9:49 am Post subject: |
|
|
Kolusu,
I am not supposed to change the field definition since the PRICE i am referring to comes as an input file. So my concern is that the output file definitions (C-PRICE) can be changed as per our requirement.
That's the reason why i concluded that easytrieve will not help me out to resolve this !
Any concerns?
Regards,
Vivek.G _________________ Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay) |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Wed May 10, 2006 10:04 am Post subject: |
|
|
Quote: |
I am not supposed to change the field definition since the PRICE i am referring to comes as an input file. So my concern is that the output file definitions (C-PRICE) can be changed as per our requirement.
|
vivek1983,
You are only changing the field definition in your pgm not the input file.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|