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 

File comparison using the values of the 2nd file as the key

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


Joined: 02 Jan 2008
Posts: 10
Topics: 4

PostPosted: Wed Feb 04, 2009 8:44 pm    Post subject: File comparison using the values of the 2nd file as the key Reply with quote

I have a file which has rows some thing like this below
x
x
x
y
y
y
a
a
a
i
i
i
I have sort card to remove i,y from the above file some thing like this.
SORT FIELDS=(1,1,CH,A)
OMIT COND=(1,1,EQ,C'i,y')
END
Here is my questions if this omit list is big( i,y) , i would not like to put this whole list in the sort card.Rather i would like to put the list it in another file.
Could this be done like this. Please let me know your suggestions.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Feb 04, 2009 9:12 pm    Post subject: Reply with quote

harikiran2001,

Yes you can put unwanted record list in another file and use that file to eliminate the records from the master file.

Inorder to help you we need the LRECL,RECFM of the master file and your lookup file. Also the position and format of the field which needs to be eliminated
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
harikiran2001
Beginner


Joined: 02 Jan 2008
Posts: 10
Topics: 4

PostPosted: Wed Feb 04, 2009 9:25 pm    Post subject: Reply with quote

Thanks Kosulu,
The master file record length is 600 and is fixed . The key in the master file start at location 46 and its length is 9.

The look up file record length is 80 and is fixed. The key in the look up file starts at location 1 and its length is 9.

The format of the key is character.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Feb 04, 2009 9:59 pm    Post subject: Reply with quote

harikiran2001,

The following DFSORT/ICETOOL JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN1      DD DSN=YOUR 80 byte lookup file,
//            DISP=SHR
//IN2      DD DSN=YOUR 600 byte master file,
//            DISP=SHR
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(X,Y),RLSE)
//OUT      DD SYSOUT=*
//TOOLIN   DD *
  COPY FROM(IN1) USING(CTL1)
  COPY FROM(IN2) USING(CTL2)
  SPLICE FROM(T1) TO(OUT) ON(46,9,CH) WITHALL -
  KEEPNODUPS KEEPBASE WITH(01,600) USING(CTL3)
//CTL1CNTL DD *
  OUTFIL FNAMES=T1,BUILD=(46:1,9,601:C'Y')
//CTL2CNTL DD *
  OUTFIL FNAMES=T1,OVERLAY=(601:X)
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,BUILD=(01,600),OMIT=(601,1,CH,EQ,C'Y')
/*

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


Joined: 02 Jan 2008
Posts: 10
Topics: 4

PostPosted: Wed Feb 04, 2009 10:24 pm    Post subject: Reply with quote

Its working.....Thanks a lot 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