Posted: Sat Oct 02, 2021 10:46 pm Post subject: Summarize numeric data with leading spaces using DFSORT
Hi All,
I want to summarize the below Input Data based on first 11 positions. Basically, need to sum up the Amount fields. I have shown the Input and Output data below.
The complication is the Amount fields are with leading spaces. While summarizing, the Date field can be from any of the row and it doesnt matter.
I tried using DFSORT SUM FIELDS, got S0C7 due to leading spaces. Please let me know if there is any way i can achieve the desired output using ICETOOL or any other options. Thanks in advance.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Sun Oct 03, 2021 2:16 am Post subject:
erasani,
You have 2 options
1. You can use TRAILER 3 to summarize the free format data.
2. You can convert the UFF (Unsigned free format) or SFF(Signed free format) to Packed (PD), Zoned decimal(ZD) or Signed Binrary (FI) and then use SUM.
Option 1 will give you the data from the last record (in regards to the date field) and option 2 will give you the data from the first record provided you have equals coded.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum