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

change precession length from 3 to 2 digits and back


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramsfm

New User


Joined: 05 May 2006
Posts: 12
Location: Pune

PostPosted: Mon Mar 03, 2008 4:38 pm
Reply with quote

Hi,

Can any one help me on the below requirement.

I would like to convert 3 digit precession to 2 digit precesion.

ex:
I/P: the amount value from input file like: 000155.340 or 000155.345
The output should be 000155.34

I don't want to disturb the rest of the record, simply i want to convert 3 digiti precession into 2 digit precession value.

Thanks,
Ramesh.
Back to top
View user's profile Send private message
ramsfm

New User


Joined: 05 May 2006
Posts: 12
Location: Pune

PostPosted: Mon Mar 03, 2008 5:04 pm
Reply with quote

Hi,

Can any one help me on this.

I want to convert my input 2 digit precession amount value into 3 digit precession value.

ex: The amount value from input file is : 000155.34
The output value should be: 000155.340
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Mar 03, 2008 10:22 pm
Reply with quote

For question 1, it sounds like you just want to replace whatever is in the third digit after the decimal point with a blank. You can use these DFSORT control statements to do that where c is the starting position of your 10 byte field + 9 (e.g. if your field starts in position 11, c is 20):

Code:

    OPTION COPY
    INREC OVERLAY=(c:X)


This overlays the third digit with a blank.

For question 2, it sounds like you just want to replace the blank in the third digit with a '0'. That would be:

Code:

    OPTION COPY
    INREC OVERLAY=(c:C'0')
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top