Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Report records in File B that doesn?t appear in file A

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Report records in File B that doesn?t appear in file A
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: 1452
Location: Chicago, IL

PostPosted: Wed Sep 21, 2005 1:50 pm    Post subject: Re: Report records in File B that doesn?t appear in file A
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: 1452
Location: Chicago, IL

PostPosted: Wed Sep 21, 2005 1:51 pm    Post subject: Re: Report records in File B that doesn?t appear in file A
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    Post subject: Re: Report records in File B that doesn?t appear in file A
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 0 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us