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
 
Query on ICETOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
thunderstorm

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Wed Jun 02, 2010 10:51 pm    Post subject: Query on ICETOOL
Reply with quote

Hello All,

I have a requirement where there are 2 input files of LRECL=10 and key is 4 bytes long. I need an output file which will have
1. records from File 1 where the complete record is not present in File 2
2. records from File 2 where the key matches with File 1 but the non key is different
3. records which are common to both File 1 and File 2

For the input files,
We will not have duplicate records in the entire record length in any one input file


1ST FILE.

ABCD909090
DEFG126567
HIJKL000000
OPQR111111
UYTR567678
GTHY787878
JUTH565656
JGDR454545

2ND FILE:

UYTR888888
DEFG786543
JGDR345678

OUTPUT FILE:

ABCD909090
DEFG786543
HIJKL000000
OPQR111111
UYTR888888
GTHY787878
JUTH565656
JGDR345678

I was wondering if this is possible thru SORT/ICETOOL

Thanks,
TS
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Jun 02, 2010 11:08 pm    Post subject:
Reply with quote

thunderstorm,

Do you want 3 different output files? or a single out put file?
Back to top
View user's profile Send private message
thunderstorm

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Wed Jun 02, 2010 11:11 pm    Post subject: Reply to: Query on ICETOOL
Reply with quote

Kolusu,

Its a single output file containing all the 3 types

Thanks,
TS
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Jun 02, 2010 11:23 pm    Post subject: Reply to: Query on ICETOOL
Reply with quote

thunderstorm,

Use the following DFSORT/ICETOOL JCL

Code:

//STEP0100 EXEC PGM=ICETOOL               
//TOOLMSG  DD SYSOUT=*                     
//DFSMSG   DD SYSOUT=*                     
//IN       DD DSN=Your input file1,DISP=SHR           
//         DD DSN=Your input file2,DISP=SHR           
//OUT      DD SYSOUT=*                     
//TOOLIN   DD *                           
  SELECT FROM(IN) TO(OUT) FIRST ON(1,4,CH)
//*
Back to top
View user's profile Send private message
thunderstorm

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Wed Jun 02, 2010 11:30 pm    Post subject: Reply to: Query on ICETOOL
Reply with quote

using your icetool card , the below requirement is not getting met

2. records from File 2 where the key matches with File 1 but the non key is different
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Jun 02, 2010 11:35 pm    Post subject: Re: Reply to: Query on ICETOOL
Reply with quote

thunderstorm wrote:
using your icetool card , the below requirement is not getting met

2. records from File 2 where the key matches with File 1 but the non key is different


thunderstorm,

simply reverse the order of concatenation. Use file 2 first and file 1 next
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 query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Native SQL Query kishpra DB2 1 Wed Nov 22, 2017 8:38 pm
No new posts ICETOOL - RESIZE DYNAMICALLY kranthikumarb DFSORT/ICETOOL 0 Tue Nov 21, 2017 5:30 pm
No new posts Query on IEFBR14 with GDG Ashishpanpaliya JCL & VSAM 4 Tue Nov 07, 2017 8:34 pm

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