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

Adding Packed decimal values using ICETOOL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Wed Nov 01, 2006 3:08 pm
Reply with quote

Hi,

I Have a flat file.

I Have to add a packed decimal value to a particlular field present in the flat file.

eg:-

Input file(LRECL:80 bytes)
Name Salary
-----------------------------
Xavier 100
Peter 200
Albert 10000

I Have to add 200 to all the Salary values present in the Input file.

Note:-

The Salary field and the Value to be added(200) both are packed decimals.

Is it possible to achieve this in a single stel using a ICETOOL.

Expecting eagerly for your help..

Regards
Muthu
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed Nov 01, 2006 9:32 pm
Reply with quote

You don't really need ICETOOL to do this, as you can do it with a simple DFSORT COPY step, but you can use a DFSORT/ICETOOL COPY instead if you want to. Let's assume your PD field is in positions 11-15. Then you could use this DFSORT INREC statement to add +200 to that field:

Code:

   INREC OVERLAY=(11:11,5,PD,ADD,+200,TO=PD,LENGTH=5)


Just change the control statement appropriately for the actual starting position and length of the PD field.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top