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
 

 

ICETOOL - Build and Remove DUPS

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

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Wed May 19, 2010 10:58 pm    Post subject: ICETOOL - Build and Remove DUPS
Reply with quote

Hi,

I'm new to use ICETOOL. Please help me regrding the below query.

I have two data sets with the following attributes.

DS1 - RECFM=FB, LRECL=78, Pass_no(CHAR type)=8 bytes in length, starts in Column 1, May be DUPS in Pass_no.
DS2 - RECFM=FB, LRECL=15, Pass_no(CHAR type)=8 bytes in length, starts in Column 1, May be DUPS in Pass_no.

I need to get Pass_no alone from both data sets without DUPS.

Output - RECFM=FB, LRECL=8, Pass_no=8 bytes in length, starts in Column 1,

I tried below ICETOOL job.

Code:
//DS1 DD DSN=... 
//DS2 DD DSN=... 
//T   DD DSN=&&T,DISP=(MOD,PASS)....
//OUTPUT DD DSN=... 
//TOOLIN *
   COPY FROM(DS1) TO (T) USING(CTL1)
   COPY FROM(DS1) TO (T) USING(CTL1)
   SELECT FROM(T) TO(OUTPUT) ON(1,8,CH) FIRST
/*
//CTL1CNTL DD
  OPTION COPY
  INREC BUILD=(1,8)
/*


BTW, ICETOOL is in my installation with ICE201I F RECORD TYPE ...

I hope this will work as I expect. Please let me know if I am wrong. Also, is there any better way for the same?

Your help is appreciated!
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: Wed May 19, 2010 11:39 pm    Post subject:
Reply with quote

Quote:
I hope this will work as I expect. Please let me know if I am wrong.


Why not just try it and find out?

If you need more help, post an example of your input and expected output.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Wed May 19, 2010 11:46 pm    Post subject:
Reply with quote

Hi Frank,

I tried and got the output. Just checking if I'm doing correctly.

Example(as explained in my first post),

DS1:
Code:
A2389012......
A2398032......
A4454444......
A2389012......
A2398032......

DS2:
Code:
A2389012......
A2398032......
A6666666......

OUTPUT:
Code:
A2389012
A2398032
A4454444
A6666666


Thank you very much. Have a good day!
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: Wed May 19, 2010 11:51 pm    Post subject:
Reply with quote

Yes, that looks right based on what you've posted. One nit: you don't need

Code:

  OPTION COPY


in CTL1CNTL. The COPY operator supplies it automatically.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Wed May 19, 2010 11:53 pm    Post subject:
Reply with quote

OKay, Frank. Thanks for the help! icon_smile.gif
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Wed Jul 28, 2010 7:56 pm    Post subject:
Reply with quote

Hi all,

Release Management here is not allowing that job to PROD since DISP=MOD can't be used in the step above.

So, I splitted that step into 3 steps as below.

Step1:
Code:
//SORTIN DD DSN=DS1....
//SORTOUT DD DSN=OUT1
//SYSIN DD *
 OPTION COPY
 INREC BUILD=(1,8)
/*

Step2:
Code:
//SORTIN DD DSN=DS2....
//SORTOUT DD DSN=OUT2
//SYSIN DD *
 OPTION COPY
 INREC BUILD=(1,8)
/*

Step3:
Code:
//SORTIN DD DSN=OUT1....
//       DD DSN=OUT2....
//SORTOUT DD DSN=FINAL...
//SYSIN DD *
 SORT EQUALS,FORMAT=CH,FIELDS=(1,8,A)     
 SUM FIELDS=NONE                         
/*


I tested the above and it seemed that my approach is correct. Please me know if I'm wrong with the above steps.

And, kindly tell me if there is any other better to do the same.( I mean, without DISP=MOD)

Thank you!
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed Jul 28, 2010 9:42 pm    Post subject:
Reply with quote

Gnana Sekaran Nallathambi,

You really don't have to reformat both files to lrecl of 8 , you can just reformat the larger LRECL file (78) to 15 bytes and then concatenate them to sortin and then remove dups


Code:

//STEP0100 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD DSN=Your input 78 byte file,DISP=SHR
//SORTOUT  DD DSN=&&TM15,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)   
//SYSIN    DD *                                               
  SORT FIELDS=COPY                                             
  INREC BUILD=(1,8,7X)                                         
//*                                                           
//STEP0200 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD DSN=Your input 15 byte file,DISP=SHR
//         DD DSN=&&TM15,DISP=SHR                             
//SORTOUT  DD SYSOUT=*                                         
//SYSIN    DD *
  INREC BUILD=(1,8)
  SORT FIELDS=(1,8,CH,A),EQUALS
  SUM FIELDS=NONE
//*
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Fri Jul 30, 2010 6:28 pm    Post subject:
Reply with quote

Thanks, Kolusu.
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 How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am
No new posts Remove Special Characters from Mainfr... Rodger Zhang All Other Mainframe Topics 6 Wed Jul 06, 2016 1:12 am
No new posts ICETOOL higher option Anshul Das DFSORT/ICETOOL 14 Thu Apr 14, 2016 8:00 am


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