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

How to do this SORT without using SPLICE


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

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Fri Sep 15, 2006 3:27 pm
Reply with quote

i have a problem with sorting my 2 input files.

i have my input files A and B both of Lrecl 100 and FB.
what i need to do is to perform a one-to-one comparison on the 74th column of the records in the files A and B.
i.e the 74th column of the 1st record of fileA is to be matched against the 74th column of 1st record of fileB. and i have to write in to the output only if that field is not matching...

IF 74th column of fileA and fileB is common for 1st records, then that record should not come in output file.
IF 74th column of fileA and fileB is different for 2nd records, then that record should come in output file.

this is my preferred output.

is there any way i can do this without using SPLICE.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Sep 15, 2006 9:32 pm
Reply with quote

Quote:
is there any way i can do this without using SPLICE.


You can do it with the SELECT operator of DFSORT's ICETOOL. Why can't you use SPLICE? Can you not use SELECT for the same reason?
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Sat Sep 16, 2006 10:45 am
Reply with quote

hi frank

can u give me the jcl for that... How can we use SELECT for this. can u just show me the jcl for the SELECT option...
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Sep 16, 2006 8:19 pm
Reply with quote

Quote:
IF 74th column of fileA and fileB is different for 2nd records, then that record should come in output file.


What exactly do you want for output when the records don't match? Just the record from fileA? Just the record from fileB? The records from fileA and fileB?

For example:

FileA record1 has 'A' in position 74.
FileB record1 has 'B' in position 74.

Should the output file have:

1) FileA record1
2) FileB record1
3) FileA record1 and FileB record 1
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Mon Sep 18, 2006 10:56 am
Reply with quote

hi frank

i just need the record from file A to come in the output file when the 74 th column is non-matching..
can u show me the jcl for doing that...

thanks
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Sep 18, 2006 8:41 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/100)
//IN2 DD DSN=...  input file2 (FB/100)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...  output file (FB/100)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SELECT FROM(T1) TO(OUT) ON(109,8,ZD) ON(74,1,CH) NODUPS -
  USING(CTL3)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(101:C'1',109:SEQNUM,8,ZD)
/*
//CTL2CNTL DD *
  INREC OVERLAY=(101:C'2',109:SEQNUM,8,ZD)
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(101,1,CH,EQ,C'1'),
    BUILD=(1,100)
/*
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Tue Sep 19, 2006 12:20 pm
Reply with quote

this one is working fine...


thanks frank....
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top