Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Change from character fields to numeric values

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
saipv

New User


Joined: 15 Apr 2005
Posts: 8

PostPosted: Thu May 18, 2006 1:03 am    Post subject: Change from character fields to numeric values
Reply with quote

I am analyzing an existing program.

The fields are declared as follows:
PVPR74-WGT PIC 9(05).
MAP-WGT PIC X(05).
FILLER REDEFINES MAP-WGT.
15 MAP-WGT-EDT PIC ZZZZZ.

MOVE PVPR74-WGT(X32DETA1) TO MAP-WGT-EDT(XDETLNS)
INSPECT MAP-WGT-EDT(XDETLNS) REPLACING LEADING ZEROS BY SPACES

These are the problems that I found:
1) Just for testing I entered Character values for PVPR74-WGT
If the value of PVPR74-WGT is TT then after execution of the above step , the field MAP-WGT is converted to 33,
If it is PVPR74-WGT = V then MAP-WGT = 5 and if it is PVPR74-WGT = U then MAP-WGT = 4

2) If the value of PVPR74-WGT is 544.8 then its adjusted to 5448 but if 54.48 then abend (decimal exception) why?

Please help me out.
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu May 18, 2006 5:42 pm    Post subject: Re: Change from character fields to numeric values
Reply with quote

saipv,

How did you move non numeric data to PVPR74-WGT. Please give the code you used.

We'll answer you're questions,

Dave
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us