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
 
Reformat clause in joinkeys sortcard changes output counts.

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

New User


Joined: 25 May 2018
Posts: 4
Location: India

PostPosted: Thu May 31, 2018 5:35 pm    Post subject: Reformat clause in joinkeys sortcard changes output counts.
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: 2361
Location: @my desk

PostPosted: Thu May 31, 2018 9:23 pm    Post subject: Reply to: Reformat clause in joinkeys sortcard changes output counts.
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

Active User


Joined: 29 Apr 2008
Posts: 309
Location: Maryland

PostPosted: Thu May 31, 2018 9:47 pm    Post subject:
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    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 Formating output file Niki DFSORT/ICETOOL 3 Fri Jun 15, 2018 3:27 pm
No new posts Optimising sortcard Niki SYNCSORT 2 Thu May 24, 2018 6:25 pm
No new posts TRAILER3 is creating blank record in ... kodeesm DFSORT/ICETOOL 3 Fri May 18, 2018 5:45 pm
No new posts Incorrect output after build alternat... sandeep kumar302 JCL & VSAM 10 Wed May 02, 2018 2:35 pm
No new posts Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am

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