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

SYNCSORT - Packed decimal comaprison between 2 files


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Aravind_mf

New User


Joined: 06 Mar 2009
Posts: 13
Location: chennai

PostPosted: Wed Jun 16, 2010 3:59 pm
Reply with quote

Hi all,

I have 2 files that needs to be compared.

File1
RECFM = F and record length 403. Field to be compared is PD and starts in Pos 8 and of 6 bytes length

File2
RECFM = FB and record length 76. Field to be compared is PD and starts in Pos 1 and of 6 bytes length

My shop has only syncsort and I coded the following JCl,


Code:
//SORTCMP1 EXEC PGM=SORT
//SORTLIB  DD  DSN=SYS1.SORTLIB,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//SORTJNF1 DD  DSN=MOP.IV100.V.INV.CONTROL.C,DISP=SHR
//SORTJNF2 DD  DSN=ISAAT.TEST.ACCOUNT.NO,DISP=SHR
//SORTOUT  DD  DSN=ISAAT.IV100.V.INV.CONTROL.C.MATCH,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,
//             SPACE=(CYL,(100,100),RLSE),
//             DCB=(RECFM=FB,LRECL=403)
//SYSIN    DD  *
  JOINKEYS FILE=F1,FIELDS=(8,6,A)
  JOINKEYS FILE=F2,FIELDS=(1,6,A)
  REFORMAT FIELDS=(F1:1,403,F2:1,76)
  INCLUDE COND=(8,6,PD,EQ,404,6,PD)
  SORT FIELDS=COPY
/*

The output contains no matching records. Actually there should be some matching records. Do I need to convert both PD field in both the files to ZD and do the comparision. Is PD comparision supported in SYNCSORT or else I code a Ezytrieve program for this?

Awaiting your help.

Thanks
Aravind
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Jun 16, 2010 4:04 pm
Reply with quote

What is the RECFM of your files, fixed or variable?
Back to top
View user's profile Send private message
Aravind_mf

New User


Joined: 06 Mar 2009
Posts: 13
Location: chennai

PostPosted: Wed Jun 16, 2010 4:06 pm
Reply with quote

File 1 is FIXED and File2 is FB.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top