MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

easytrieve - Doubt regarding packed decimal

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Wed May 10, 2006 6:36 am    Post subject: easytrieve - Doubt regarding packed decimal Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Wed May 10, 2006 7:27 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Wed May 10, 2006 9:29 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Wed May 10, 2006 9:40 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Wed May 10, 2006 9:49 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Wed May 10, 2006 10:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group