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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
No new posts Convert HEX to Numeric DB2 3
Search our Forums:

Back to Top