Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us