IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to round a easytrieve numeric field


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Marcos_Rodrigues

New User


Joined: 18 Aug 2006
Posts: 5

PostPosted: Tue Nov 28, 2006 2:17 am
Reply with quote

Hi everyone !
Can i round a easytrieve field?
For example.. i have a 6 bytes numeric field like 10,098 and i wanna to round these for 10,1
anyone know how to do this ?
Thx!
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Tue Nov 28, 2006 2:32 am
Reply with quote

Rounding Examples is EZTRIEVE

Assuming that a program contains the following field definitions:

SNDFLD W 5 N 2 VALUE (10.75)
RCVFLD W 5 N 1

Then:
Assignment Statement RCVFLD Result

RCVFLD INTEGER ROUNDED = SENDFLD 11.0
RCVFLD INTEGER TRUNCATED = SENDFLD 10.0
RCVFLD INTEGER = SENDFLD 10.0
RCVFLD ROUNDED = SENDFLD 10.8
RCVFLD TRUNCATED = SENDFLD 10.7
RCVFLD = SENDFLD 10.7

INTEGER, ROUNDED, and TRUNCATED are valid only with numeric fields.

Change RCVFLD definition to get required ROUNDING.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts IBM IMU Utility for Easytrieve Code t... IBM Tools 0
No new posts To Unstring spaces in a field COBOL Programming 3
No new posts Help required to reset decimal points... DFSORT/ICETOOL 10
No new posts Overwriting SSN Digits in Easytrieve ... CA Products 0
No new posts Sorting Date Field DFSORT/ICETOOL 4
Search our Forums:


Back to Top