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

Reformat clause in joinkeys sortcard changes output counts.


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

New User


Joined: 25 May 2018
Posts: 5
Location: India

PostPosted: Thu May 31, 2018 5:35 pm
Reply with quote

Hi,

I am trying to compare two files using a key and write paired records into the output file.
I am getting difference in the output file count everytime I change the reformat clause.

I have a month and year in file 1 (ex: 201805) and some transactions done everyday with the timestamp in file 2. I am matching both the files to get all the transactions done on this month of the year. but I am getting different output counts with change in reformat clause.

case1:
Input:
file 1: 1 record
file 2: 500000 records
sortcard:
Code:
SORT FIELDS=COPY         
JOINKEYS FILES=F1,       
FIELDS=(1,6,A)           
JOINKEYS FILES=F2,       
FIELDS=(15,6,A)           
REFORMAT FIELDS=(F2:1,125)
output: 408579 records.

case2:
input:
file 1: 1 record
file 2: 500000 records
sortcard:
Code:
SORT FIELDS=COPY                                                   
JOINKEYS FILES=F1,                                                 
FIELDS=(1,6,A)                                                     
JOINKEYS FILES=F2,                                                 
FIELDS=(15,6,A)                                                   
REFORMAT FIELDS=(F2:1,125,F2:1,14,F2:15,12,F2:40,3,F2:32,5,F2:49,3)

output: 898946 records

It would be of great help if someone can explain why there is huge difference in the counts and how the reformat clause exactly works.


Thanks in Advance
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu May 31, 2018 9:23 pm
Reply with quote

Are you sure, you are running with the same inputs on both cases?
AFAIK REFORMAT should not change the output record counts. It would just select which fields to pass to the output from the JOINed record. Can you post the SYSOUTs from both the runs?
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

PostPosted: Thu May 31, 2018 9:47 pm
Reply with quote

Before asking for help from the forum (and not giving detailed essential information!!!), try to do carefully the following steps.

Re-run your test with minimal size of the second file. Not 50,000 but 5-10 records. Print or view carefully ALL input files, and ALL output files, for BOTH of your cases.

If there is still difference in output count, then find out yourself: which records exactly are different, and what may cause that behavior?

* * *

The information you presented GIVES NO CHANCE FOR ANYONE TO BE ABLE TO HELP YOU doing YOUR OWN job instead of YOURSELF. In short terms your question looks like this:
Quote:
I do everything right, but my result is wrong. Where is my error?


Good luck.
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 Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts Build a record in output file and rep... DFSORT/ICETOOL 11
Search our Forums:

Back to Top