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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm


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