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 precession length from 3 to 2 digits and back

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: change precession length from 3 to 2 digits and back
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    Post subject: Convert 3 digit precession value into 2 digit precession.
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 Moderator


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

PostPosted: Mon Mar 03, 2008 10:22 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm


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