i need compare to file..



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

i need compare to file..

Postby NARASIMHA PRASAD RAO » Tue Mar 09, 2010 10:11 am

Hi all,

i have 2 i/pfiles file A and file B .. for exp those record lenth is 4 ...\
file A:
1111
2222
5555
7777
file B:
3333
5555
8888 BY USEING THESE 2 INPUTFILES.I NEED THE O/P FILES HAS BELOW
FILE C:( THE COMMON RECORDS IN BOTH FILES A and B "5555" NEED TO BE REMOVED for the file A)
1111
2222
7777
File D :( ITS CONTAINS the common records on both files A and B)
5555


Can please need one give the solution to get this O/P FILES... USEING DFSORT...
NARASIMHA PRASAD RAO
 
Posts: 12
Joined: Mon Mar 08, 2010 8:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: i need compare to file..

Postby dick scherrer » Tue Mar 09, 2010 10:41 am

Hello and welcome to the forum,

Your topic has been moved to the DFSORT part of the forum (from "Other Mainframe").

What should happen with the 8888 record, etc?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: i need compare to file..

Postby Frank Yaeger » Tue Mar 09, 2010 11:38 pm

NARASIMHA,

Your example and description are confusing. For example, 7777 is NOT common to File A and File B, yet you show it in File C. Why?
5555 and 7777 only appear in File A, yet you show one in File C and one in File D. Why? What about 8888 which only appears in File B?

You need to show a better example of your input and expected output and explain the "rules" for getting from input to output. If File A can have duplicates within it, show that in your example. If File B can have duplicates within it, show that in your example.

Also give the RECFM and LRECL of each file and the starting position, length and format of each relevant field.

Once you're described your requirement adequately, we can show you how to do what you want to do with DFSORT.
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
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

: i need compare to file..

Postby NARASIMHA PRASAD RAO » Wed Mar 10, 2010 11:39 am

i want delete the records in file A those same records avilable in File B...
NARASIMHA PRASAD RAO
 
Posts: 12
Joined: Mon Mar 08, 2010 8:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: i need compare to file..

Postby dick scherrer » Wed Mar 10, 2010 11:47 am

Hello,

Now, go back, reread what Frank posted, and provide all of the requested information.
You need to show a better example of your input and expected output and explain the "rules" for getting from input to output. If File A can have duplicates within it, show that in your example. If File B can have duplicates within it, show that in your example.

Also give the RECFM and LRECL of each file and the starting position, length and format of each relevant field.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: i need compare to file..

Postby NARASIMHA PRASAD RAO » Wed Mar 10, 2010 11:50 am

i want delete the records in file A those mtachrecords avilable in File B... so the common record'5555
' need to be deleted...no need TO takecare off fileB records those records are not match with file A.
NARASIMHA PRASAD RAO
 
Posts: 12
Joined: Mon Mar 08, 2010 8:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: i need compare to file..

Postby NARASIMHA PRASAD RAO » Wed Mar 10, 2010 12:35 pm

file A and file B both are soted files and they donot have any dulicates,bOTH file RECFM is FB and LRECLIS 4
NARASIMHA PRASAD RAO
 
Posts: 12
Joined: Mon Mar 08, 2010 8:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: i need compare to file..

Postby NARASIMHA PRASAD RAO » Wed Mar 10, 2010 1:16 pm

file A and file B both are sroted files and they donot have any dulicates,bOTH file RECFM is FB and LRECL is 4
NARASIMHA PRASAD RAO
 
Posts: 12
Joined: Mon Mar 08, 2010 8:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: i need compare to file..

Postby skolusu » Wed Mar 10, 2010 10:40 pm

Narasimha Prasad Rao,

The following DFSORT JCL will give you the desired results

//STEP0100 EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DUMMY,LRECL=4,RECFM=FB,BLKSIZE=27996                     
//SORTOUT  DD DSN=&&HDR,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)           
//SYSIN    DD *                                                       
  SORT FIELDS=COPY                                                     
  OUTFIL REMOVECC,NODETAIL,HEADER1=(4C'$')                             
//*                                                                     
//STEP0200 EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DSN=&&HDR,DISP=SHR,VOL=REF=*.STEP0100.SORTOUT           
//         DD DSN=your input file A,DISP=SHR
//         DD DSN=&&HDR,DISP=SHR,VOL=REF=*.STEP0100.SORTOUT           
//         DD DSN=your input file B,DISP=SHR
//UNQ      DD SYSOUT=*                                                 
//MATCH    DD SYSOUT=*                                                 
//SYSIN    DD *                                                       
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,4,CH,EQ,C'$$$$'),PUSH=(5:ID=1))   
  SORT FIELDS=(1,4,CH,A),EQUALS                                       
  SUM FIELDS=(5,1,ZD)                                                 
  OUTFIL FNAMES=UNQ,INCLUDE=(5,1,ZD,EQ,1),BUILD=(1,4)                 
  OUTFIL FNAMES=MATCH,BUILD=(1,4),                                     
  INCLUDE=(5,1,ZD,EQ,3,AND,1,4,CH,NE,C'$$$$')                         
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: i need compare to file..

Postby NARASIMHA PRASAD RAO » Thu Mar 11, 2010 1:29 pm

Thanks you sir
NARASIMHA PRASAD RAO
 
Posts: 12
Joined: Mon Mar 08, 2010 8:03 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post