Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

SYNCSORT :: getting three output files out of JOINKEYs

$
0
0
Author: migusd
Subject: getting three output files out of JOINKEYs
Posted: Mon Jun 05, 2017 11:30 pm (GMT 5.5)

Hello guys,
I have a couple of files that I am using as input for this small process.
Not sure it is important but the files have different record length and the key is positioned at different record location.
I would like to get three output files out of this sort.
however, I have not understood basically the JOIN statement.
I would like to get three output files
1) Unpaired records from infile 1.
2) Unpaired records from infile 2.
3) Paired records

So, the question is what should I change in Join Statement to create this three files?
here is what I got thus far. It is working fine creating the first two files.

Code:

  JOINKEYS FILE=F1,FIELDS=(10,07,A)           
  JOINKEYS FILE=F2,FIELDS=(07,07,A)           
  JOIN UNPAIRED,ONLY                         
  REFORMAT FIELDS=(F1:1,80,F2:1,25),FILL=X'FF'
  SORT FIELDS=COPY                           
  OUTFIL FILES=1,                             
   INCLUDE(81,1,BI,EQ,X'FF'),                 
   OUTREC=(1:1,80)                           
  OUTFIL FILES=2,                             
   INCLUDE(1,1,BI,EQ,X'FF'),                 
   OUTREC=(1:81,25)                           

_________________
shikoulitz


Viewing all articles
Browse latest Browse all 8500

Trending Articles