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
 
Adding Packed decimal values using ICETOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Wed Nov 01, 2006 3:08 pm    Post subject: Adding Packed decimal values using ICETOOL
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 Moderator


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

PostPosted: Wed Nov 01, 2006 9:32 pm    Post subject:
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    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 can I convert charactor to fixed ... liying DFSORT/ICETOOL 7 Tue May 22, 2018 3:35 pm
No new posts LOW VALUES as a KEY juares castro DB2 10 Sat Apr 07, 2018 1:06 am
No new posts Reformatting and adding additional fi... Badbeef SYNCSORT 6 Thu Apr 05, 2018 4:45 pm
No new posts Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am
No new posts How to group and sum the decimal value sakrat DFSORT/ICETOOL 2 Tue Mar 06, 2018 9:13 pm

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