I need to edit the price in the input dataset based on product code and payment type
Product code - starting position 30 and length is 5 (Ex: 00003)
Payment type - starting position 49 and length is 3 (Ex: ADD)
Price - Starting position 43 - S9(9)V99 COMP-3
001000000000000000123456789AB0000320131107 & NEW
1. If product code is not '00003' then copy the all the fields to output dataset with payment as blank
2. If product code is '00003'
- If Payment type is NEW then copy all the fields to output dataset with payment as blank
- If Payment type is ADD then copy all the fields to output dataset with price as ZERO and payment type as blank
Joined: 09 Mar 2011 Posts: 7310 Location: Inside the Matrix
You are getting zero in packed-decimal. the curly brace is telling you that it is a positive zero at that digit. The other curly brace would tell you it is a negative zero at the same position. A-I will be positive 1-9 and J-R negative 1-9.
When 30,5 is equal to C'00003' you set 30: to C'00003', which is the value you know it already has.
What you seem to by trying to do is to set a field to zero if C'00003' and ADD. You can do that in on IFTHEN=(WHEN=(logical-expression. Put the zero and blat the ADD in the OVERLAY. Then have an IFTHEN=(WHEN=NONE to blat the field which sometimes contains ADD to space for all the other records.