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
 

 

How to do this SORT without using SPLICE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to do this SORT without using SPLICE
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 Moderator


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

PostPosted: Fri Sep 15, 2006 9:32 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Sat Sep 16, 2006 8:19 pm    Post subject:
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    Post subject: Re: How to do this SORT without using SPLICE
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 Moderator


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

PostPosted: Mon Sep 18, 2006 8:41 pm    Post subject:
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    Post subject:
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    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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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