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 Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts the use of 'B3'x character in a panel Pedro TSO/ISPF 1 Thu Feb 16, 2017 3:09 am


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