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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to convert S9(3)v9(15) Comp-3 to S9(2)v9(7) Comp-3?
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10276
Location: italy

PostPosted: Mon Oct 11, 2010 3:50 pm    Post subject: Reply to: How to convert S9(3)v9(15) Comp-3 to S9(2)v9(7) Co
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    Post subject: Reply to: How to convert S9(3)v9(15) Comp-3 to S9(2)v9(7) Co
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

Site Director


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

PostPosted: Mon Oct 11, 2010 9:31 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


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