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

Report records in File B that doesn?t appear in file A


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bsurent

New User


Joined: 26 Aug 2005
Posts: 2
Location: chennai

PostPosted: Wed Sep 21, 2005 10:43 am
Reply with quote

1) file A contains 10 records

2) file B contains 15 records

Most of the records in both files are common.

Report records in File B that doesn?t appear in file A
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed Sep 21, 2005 1:50 pm
Reply with quote

Hi bsurent,

I think you'll have to make a program logic for that.

You can go thru the link below, which should give you a skeleton, but not the excat logic.

Regards,

Priyesh.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed Sep 21, 2005 1:51 pm
Reply with quote

oops.....Forgot the link...

http://ibmmainframes.com/viewtopic.php?t=4340

Regards,

Priyesh.
Back to top
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Wed Sep 21, 2005 8:35 pm
Reply with quote

Bsurent,

What are you trying to do ? It's not clear for me.

Alain
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Thu Sep 22, 2005 1:10 am
Reply with quote

If you have DFSort utility you can do it!
In this moment I'm doing the same with DfSort with a samples by Mr Frank.
Code:
//STEP040S EXEC PGM=ICETOOL                                 
//TOOLMSG  DD SYSOUT=B                                     
//DFSMSG   DD SYSOUT=B                                     
//IN1      DD DISP=SHR,DSN=fileA
//IN2      DD DISP=SHR,DSN=fileB
//T1       DD DSN=&&T1Y,SPACE=(CYL,(xxx,xxx),RLSE),DISP=(MOD,PASS)
//OUT11    DD DISP=(,CATLG,DELETE),LRECL=416,RECFM=FB,         
//            SPACE=(CYL,(xxx,xxx),RLSE),                       
//            DSN=out11
//OUT22    DD DISP=(,CATLG,DELETE),LRECL=416,RECFM=FB,         
//            SPACE=(CYL,(xxx,xxx),RLSE),                       
//            DSN=out22
//OUT12    DD DISP=(,CATLG,DELETE),LRECL=416,RECFM=FB,         
//            SPACE=(CYL,(xxx,xxx),RLSE),                       
//            DSN=out12
//TOOLIN   DD *                                   
  SORT   FROM(IN1) TO(T1)   USING(CTL1)           
  SORT   FROM(IN2) TO(T1)   USING(CTL2)           
  SPLICE FROM(T1)  TO(OUT12) ON(1,416,CH) -       
    WITH(418,1) USING(CTL3) KEEPNODUPS             
/*                                                 
//CTL1CNTL DD *                                   
  SORT FIELDS=(1,416,CH,A)                         
  OUTFIL FNAMES=T1,OUTREC=(1,416,417:C'11')       
/*                                                 
//CTL2CNTL DD *                                   
  SORT FIELDS=(1,416,CH,A)                         
  OUTFIL FNAMES=T1,OUTREC=(1,416,417:C'22')       
/*                                                 
//CTL3CNTL DD *                                   
  OUTFIL FNAMES=OUT11,INCLUDE=(417,2,CH,EQ,C'11'),
    OUTREC=(1,416)                                 
  OUTFIL FNAMES=OUT22,INCLUDE=(417,2,CH,EQ,C'22'),
    OUTREC=(1,416)                                 
  OUTFIL FNAMES=OUT12,INCLUDE=(417,2,CH,EQ,C'12'),
    OUTREC=(1,416)                                 

In my case I have two file with many record that are 416 byte long.
With this DfSort that you can retriev in this forum searching for "Compare"
you will able to have as output:
out11 = the row that are only in file A
out22 = the row that are only in file B
out12 = the common row between file A and file B.

This only putting a qualifier at the end of each record of both file A and file B and using at the end the SPLICE command

See this part of this link:
Quote:
Create files with matching and non-matching records (without and with duplicates)

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst02.html
I hope in this help...
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 -> DFSORT/ICETOOL

 


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 FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top