View previous topic :: View next topic
Author
Message
rakesh17684 New User Joined: 08 Oct 2006Posts: 61 Location: San Diego
Hi,
I have 2 file
file1 - RECFM = VB,length = 172
file 2 - RECFM =FB,length =80
I need to compare this two files using a particular field which is present
at different position in both files and write the unmatching records of file
1 to output file(which should be of VB format and Length should be same file1)
Code:
//SORTNIN EXEC PGM=SORT
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DSN=FILE1,DISP=SHR (VB/172)
//SORTJNF2 DD DSN=FILE2,DISP=SHR (VB/80)
//SORTOUT DD DSN=FILE.OUTPUT,
// SPACE=(CYL,(10,10),RLSE),
// DISP=(NEW,CATLG,CATLG),
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(0023,2,A)
JOINKEYS FILES=F2,FIELDS=(1,2,A)
JOIN UNPAIRED,F1,ONLY
REFORMAT FIELDS=(F1:1,172)
SORT FIELDS=COPY
/*
when i execute this i get the output file of RECFM = FB ,then i modified
the jcl as below
Code:
//SORTNIN EXEC PGM=SORT
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DSN=FILE1,DISP=SHR (VB/172)
//SORTJNF2 DD DSN=FILE2,DISP=SHR (FB/80)
//SORTOUT DD DSN=FILE.OUTPUT,
// SPACE=(CYL,(10,10),RLSE),
// DISP=(NEW,CATLG,CATLG),
// DCB=(RECFM=VB)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(0023,2,A)
JOINKEYS FILES=F2,FIELDS=(1,2,A)
JOIN UNPAIRED,F1,ONLY
REFORMAT FIELDS=(F1:1,172)
SORT FIELDS=COPY
/*
But this gives me ABENDU0016 with following message when I try to execute it
-SORTOUT RECFM INCOMPATIBLE
Back to top
Anuj Dhawan Superior Member Joined: 22 Apr 2006Posts: 6250 Location: Mumbai, India
And what does this
Quote:
SORTOUT RECFM INCOMPATIBLE
tells you, how about posting the SYSOUT messages?
Back to top
Arun Raj Moderator Joined: 17 Oct 2006Posts: 2481 Location: @my desk
Rakesh,
The error message seems to suggest that you have used a VB file as SORTOUT where a different format was expected as per the control cards used. Can you post the unedited SYSOUT messages here?
Back to top
rakesh17684 New User Joined: 08 Oct 2006Posts: 61 Location: San Diego
Hi,
PFB the sysout message
Code:
SYSIN :
SORT FIELDS=COPY
JOINKEYS FILES=F1,FIELDS=(0023,2,A)
JOINKEYS FILES=F2,FIELDS=(1,2,A)
JOIN UNPAIRED,F1,ONLY
REFORMAT FIELDS=(F1:1,0172)
WER276B SYSDIAG= 844, 2630148, 2630148, 4212617
WER164B 5,720K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 1,000K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER481I JOINKEYS REFORMAT RECORD LENGTH= 172, TYPE = F
WER202A SORTOUT RECFM INCOMPATIBLE
WER110I SORTOUT : RECFM=VB ; LRECL= ; BLKSIZE=
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER482I JNF1 STATISTICS
WER483B 2,396K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 1,000K BYTES USED
WER108I SORTJNF1 : RECFM=VB ; LRECL= 172; BLKSIZE= 27998
WER482I JNF2 STATISTICS
WER483B 2,396K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 1,000K BYTES USED
WER108I SORTJNF2 : RECFM=FB ; LRECL= 80; BLKSIZE= 800
Back to top
Arun Raj Moderator Joined: 17 Oct 2006Posts: 2481 Location: @my desk
Try adding this to your sort card (untested).
Code:
OUTFIL FTOV,VLTRIM=C' '
Back to top
Ajay Baghel Active User Joined: 25 Apr 2007Posts: 206 Location: Bangalore
Hi Rakesh,
WER messages indicate that you are using Syncsort.
Try the below sort card:
Code:
JOINKEYS FILES=F1,FIELDS=(0023,2,A)
JOINKEYS FILES=F2,FIELDS=(1,2,A)
JOIN UNPAIRED,F1,ONLY
REFORMAT FIELDS=(F1:1,4,F1:5)
SORT FIELDS=COPY
/*
This will take all the data bytes from the VB file starting from col 5 .
Thanks,
Ajay
Back to top
Arun Raj Moderator Joined: 17 Oct 2006Posts: 2481 Location: @my desk
rakesh17684,
Or even you can omit your REFORMAT statement. Since you are specifying UNPAIRED,F1,ONLY, it should assume SORTJNF1 file attributes for your SORTOUT.
Back to top
Please enable JavaScript!