joinkey with different formats of key

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
juares castro
Member
Posts: 11
Joined: Fri Nov 11, 2011 7:21 pm

joinkey with different formats of key

Post by juares castro » Thu Apr 26, 2012 11:39 pm

Hi!

I'm trying match 2 files, both VB.

File 1 - key pos 17, packed, 7 bytes, 133 bytes total length
File 2 - key pos 30, unpacked, 13 bytes, 4223 bytes total length

Both have header and trailer.

output 1 - matched records
output 2 - unmatched records of input file1
output 3 - unmatched records of input file2

I'm using the code below:

JOINKEYS FILE=F1,FIELDS=(21,7,A)
JOINKEYS FILE=F2,FIELDS=(34,13,A)
JOIN UNPAIRED
REFORMAT FIELDS=(F2:1,4223,F1:1,133)
SORT FIELDS=COPY
OUTFIL FILES=03,INCLUDE=(5,1,CH,EQ,C' '),BUILD=4224,133)
OUTFIL FILES=02,INCLUDE=(4228,1,CH,EQ,C' '),BUILD=(1,4223)
OUTFIL FILES=01,SAVE,BUILD=(1,4223)


The good result is not reached.

Could someone help me?
Thanks in advance.
juares castro

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Fri Apr 27, 2012 1:32 am

Which sort product are you using - DFSORT (ICE messages) or Syncsort (WER messages)?
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

juares castro
Member
Posts: 11
Joined: Fri Nov 11, 2011 7:21 pm

Post by juares castro » Fri Apr 27, 2012 6:56 pm

Hi!
I'm using SYNCSORT.
Thanks.
juares castro

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Fri Apr 27, 2012 8:50 pm

You cannot compare packed-decimal against zoned-decimal using the Alpha data type.

You need to compare these as numerics.
Have a good one

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others