Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us