Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to change the logon screen info o... sakthikumarT TSO/ISPF 4 Fri Dec 29, 2017 6:44 pm
No new posts Change NULL indicator in UNLOAD utility Khadhar Basha DB2 2 Fri Dec 15, 2017 3:01 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
This topic is locked: you cannot edit posts or make replies. ISREDIT Macro is not returning back t... nico_neoz CLIST & REXX 21 Sat Nov 18, 2017 7:40 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us