MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compare complete records in a file with multi format data

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Ram22
Beginner


Joined: 09 Jun 2004
Posts: 33
Topics: 6

PostPosted: Thu Nov 17, 2005 3:07 pm    Post subject: Compare complete records in a file with multi format data Reply with quote



I have 2 files, LREC 16383, which are the output from an unload job of IMS database. Some part of the data is in HEX format. My task is to compare these two files and sort out only the matching records (complete record should match).
The problem I am facing is the key is nothing but the complete record. And the record has all flavors of data like CH,PD etc...
I tried to do the task with the following jcl, but its failing.


Code:
//STEP0100 EXEC PGM=SYNCSORT                                   
//*                                                             
//SYSOUT   DD  SYSOUT=*                                         
//SORTIN   DD  DISP=SHR,DSN=Input-FILE1       
//         DD  DISP=SHR,DSN=Input-file2   
//SORTOUT  DD  DSN=Output-File1,         
//            DISP=(NEW,CATLG,DELETE),                         
//            UNIT=SYSDA,                                       
//            SPACE=(CYL,(1,1),RLSE)                           
//SORTXSUM DD DSN=Output-File2,           
//            DISP=(NEW,CATLG,DELETE),                         
//            UNIT=SYSDA,                                       
//            SPACE=(CYL,(1,1),RLSE)                           
//SYSIN    DD *                                                 
  INREC FIELDS=(1,16383,C'0001')                               
  SORT FIELDS=(1,16383,PD,A)                                   
  SUM FIELDS=(16384,4,ZD),XSUM                                 
  OUTFIL INCLUDE=(16384,4,ZD,GE,1),                             
  OUTREC=(1,16383)     
/* 

If I am not wrong there shall be a limit on the key size which I am violating and at the same time I think I am coding the wrong format too, but I am not sure what exact format do I need to use as the key is complete record.

Please let me know if we can do this task with Syncsort.


Note: I used Syncsort as my shop allows me to use only this.

Regards & Thanks,
Ram
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Nov 17, 2005 3:29 pm    Post subject: Reply with quote

Ram,

First all do not post topics referring to specific people. There are many people who help in here.

Secondly Frank is DFSORT developer and he is happy to answer questions on DFSORT. Syncsort is a competitive product for DFSORT. It is not a good idea to ask Frank for Syncsort solutions.

Now to answer your specific question. Yes there is a limit on sort fields and it depends on the format of the field. The max you can have is 4092 bytes (CH). For packed decimal field you can have to 256 bytes.

If you have syncsort for z/os v 1.2 then you can use JOIN feature to compare the datasets. Run the following Job and post your sysout

Code:

//STEP0100 EXEC PGM=SORT                 
//SYSOUT   DD SYSOUT=*                   
//SORTIN   DD *
TEST
//SORTOUT DD  SYSOUT=*
//SYSIN    DD  *                         
  SORT FIELDS=COPY                       
/*


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ram22
Beginner


Joined: 09 Jun 2004
Posts: 33
Topics: 6

PostPosted: Thu Nov 17, 2005 3:56 pm    Post subject: Reply with quote

Kolusu,

First, I am sorry to fix my referrence to you and frank.

This is the sysout of the test job
If I am not wrong the version with my shop is Z/OS 1.5.0


Code:

SYNCSORT FOR Z/OS  1.1CR   TPF3A  U.S. PATENTS: 4210961, 5117495  (C) 2002 SYNCS
                                                      z/OS   1.5.0             
PRODUCT LICENSED FOR CPU SERIAL NUMBER 8638D, MODEL 2084 307              LICENS
SYSIN :                                                                         
  SORT FIELDS=COPY                                                             
WER164B  6,896K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER164B     0 BYTES RESERVE REQUESTED, 173K BYTES USED                         
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                                 
WER108I  SORTIN   :  RECFM=F    ; LRECL=    80; BLKSIZE=    80                 
WER110I  SORTOUT  :  RECFM=F    ; LRECL=    80; BLKSIZE=    80                 
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                   
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                   
WER416B  BSAM WAS USED FOR SORTIN                                               
WER416B  BSAM WAS USED FOR SORTOUT                                             
WER054I  RCD IN          1, OUT          1                                     
WER169I  RELEASE 1.1C BATCH 0397 TPF LEVEL 3A                                   
WER052I  END SYNCSORT - $TESTJOB,STEP0100,,DIAG=A200,6042,8AAE,ACC6,EA52,4CCA,8A
ARPAGE 5                                                                       
EST                                                                             


Please let me know if I had posted the complete information you asked for.

Regards & Thanks,
Ram
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Nov 17, 2005 4:03 pm    Post subject: Reply with quote

Quote:

SYNCSORT FOR Z/OS 1.1CR


Ram22,

The JOIN feature is only supported with SYNCSORT FOR Z/OS 1.2CR and higher.

your shop has a prior version and I guess you have to code a program to compare the files.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ram22
Beginner


Joined: 09 Jun 2004
Posts: 33
Topics: 6

PostPosted: Thu Nov 17, 2005 4:09 pm    Post subject: Reply with quote

Thanks Kolusu. To feed my anxiousness, can you please tell me more about the join feature.

Ram
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Nov 17, 2005 5:38 pm    Post subject: Reply with quote

Quote:

Thanks Kolusu. To feed my anxiousness, can you please tell me more about the join feature.


Ram22,

Check this topic for an example.

http://mvsforums.com/helpboards/viewtopic.php?t=4690&highlight=joinkeys

In your case I was thinking of appending the records side by side using JOIN feature and then use an include/omit condition to get the mismatches.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ram22
Beginner


Joined: 09 Jun 2004
Posts: 33
Topics: 6

PostPosted: Fri Nov 18, 2005 10:51 am    Post subject: Reply with quote

Thanks Kolusu
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group