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

How to convert S9(3)v9(15) Comp-3 to S9(2)v9(7) Comp-3?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Mon Oct 11, 2010 3:40 pm
Reply with quote

Hi,

I need to convert the comp3 field from S9(3)v9(15) Comp-3 to S9(2)v9(7) Comp-3.

Eg: (I am not showing in Hex format)
If the input is 123.123456789012345, i need to convert to
23.1234567

How to acheive this?

Thanks
R KARTHIK
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Oct 11, 2010 3:50 pm
Reply with quote

while it might be <reasonable> to truncate less significant digits
not so for the most significant ones
what is the business reason to get rid of them ?

I would be glad if that was done for amounts debited on my current account,
not so much for the amounts being credited icon_biggrin.gif
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Mon Oct 11, 2010 4:01 pm
Reply with quote

Hi,

Before the file definition was s9(2)v9(7) and now they changed to s9(3)v9(15). So for the current existing file definitely the most significant bit would be 0.

Current file data:
012.123456789111111

I want to convert to old file format
12.1234567

Thanks
R KARTHIK
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 11, 2010 9:31 pm
Reply with quote

Hello,

What happens when you MOVE the larger field to the smaller? Or COMPUTE?
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
Search our Forums:

Back to Top