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
 

 

File change/insertion extraction using ICETOOL

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

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Mon Apr 28, 2008 5:45 pm    Post subject: File change/insertion extraction using ICETOOL
Reply with quote

Hi Team,

Request
---------
Two Input files of 80 character is available.Fil1,File2.

File2 may be updated with new records. or it may be modified for an existing record.Modified means only the date is changed in second file.Date starts at 25 th position and runs for 8 character.

The first 10 character is key. Both the files are sorted in ascending.

Expected Result
------------------

File 3 must be generate with all the newly inserted or changed records from File2.


File Strucutre example
-------------------------

File1 (sample 70 character i have given)

0010100002 200804100080430050000C 00 000000
0010100004 200804100080428050000C 00 000000
0010100009 200805020080501050000C 00 000000


File2 (sample 70 character i have given)

0010100002000000000000002008041720080417235900C 00200804
0010100004000000000000002008041720080417235900C 00200804
0010100009000000000000002008050220080417235900C 00200804
0010100012000000000000002008041720080417235900C 00200804

Expected result file3


0010100002000000000000002008041720080417235900C 00200804
(for date changed)

0010100004000000000000002008041720080417235900C 00200804
(for date changed)

0010100012000000000000002008041720080417235900C 00200804
(as new record)

Third row of file2 is skipped,because it did not have any change.

Can anyone give me a ICETOOL code to generate the same.
Back to top
View user's profile Send private message

Skolusu

Senior Member


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

PostPosted: Mon Apr 28, 2008 11:17 pm    Post subject:
Reply with quote

The following DFSORT/ICETOOL JCl will give you desired results

Code:

//STEP0100 EXEC PGM=ICETOOL                                   
//TOOLMSG  DD SYSOUT=*                                       
//DFSMSG   DD SYSOUT=*                                       
//IN1      DD *                                               
0010100002              200804100080430050000C 00 000000     
0010100004              200804100080428050000C 00 000000     
0010100009              200805020080501050000C 00 000000     
//IN2      DD *                                               
0010100002000000000000002008041720080417235900C 00200804     
0010100004000000000000002008041720080417235900C 00200804     
0010100009000000000000002008050220080417235900C 00200804     
0010100012000000000000002008041720080417235900C 00200804     
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(1,1),RLSE)
//OUT      DD SYSOUT=*                                       
//TOOLIN   DD *                                               
  COPY FROM(IN1) USING(CTL1)                                 
  COPY FROM(IN2) USING(CTL2)                                 
  SPLICE FROM(T1) TO(OUT) ON(1,10,CH) WITHALL -               
  KEEPNODUPS USING(CTL3) WITH(01,80)                         
//CTL1CNTL DD *                                               
  OUTFIL FNAMES=T1,OVERLAY=(81:1,10,25,8)                     
//CTL2CNTL DD *                                               
  OUTFIL FNAMES=T1,OVERLAY=(81:18X)                           
//CTL3CNTL DD *                                               
  OUTFIL FNAMES=OUT,BUILD=(01,80),                           
  INCLUDE=(25,8,CH,NE,91,8,CH)                               
/*


Hope this helps...

Cheers
Back to top
View user's profile Send private message
nirmal.poikaikumaran

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Tue Apr 29, 2008 2:37 pm    Post subject:
Reply with quote

Absolutely Brilliant.....

thanks a lot

it worked icon_smile.gif
Back to top
View user's profile Send private message
nirmal.poikaikumaran

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Mon May 05, 2008 11:02 am    Post subject:
Reply with quote

Hi Skolusu,

I have an enhanced requirement on this.

//IN1 DD *
0010100002 200804100080430050000C 00 000000
0010100004 200804100080428050000C 00 000000
0010100009 200805020080501050000C 00 000000
//IN2 DD *
0010100002000000000000002008041720080417235900C 00200804
0010100004000000000000002008041720080417235900C 00200804
0010100009000000000000002008050220080417235900C 00200804
0010100012000000000000002008041720080417235900C 00200804
0010100012000000000000002008051720080417235900C 00200804


If i find a duplicate in the second file , both of them should be captured inthe o/p file. how can that be done?

plz help
Back to top
View user's profile Send private message
vyasricha

New User


Joined: 17 Mar 2008
Posts: 27
Location: banaglore

PostPosted: Mon May 05, 2008 2:13 pm    Post subject: Reply to: File change/insertion extraction using ICETOOL
Reply with quote

Code:
//STEP0100 EXEC PGM=ICETOOL                                               
//TOOLMSG  DD SYSOUT=*                                                     
//DFSMSG   DD SYSOUT=*                                                     
//IN1      DD *                                                           
0010100002              200804100080430050000C 00 000000                   
0010100004              200804100080428050000C 00 000000                   
0010100009              200805020080501050000C 00 000000                   
//IN2      DD *                                                           
0010100002000000000000002008041720080417235900C 00200804                   
0010100004000000000000002008041720080417235900C 00200804                   
0010100009000000000000002008050220080417235900C 00200804                   
0010100012000000000000002008041720080417235900C 00200804                   
0010100012000000000000002008051720080417235900C 00200804                   
//OUT      DD  *                                                           
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(1,1),RLSE),
//  UNIT=SYSDA             
//TOOLIN   DD *                                                           
  COPY FROM(IN1) USING(CTL1)                                               
  COPY FROM(IN2) USING(CTL2)                                               
  SPLICE FROM(T1) TO(OUT) ON(1,10,CH) WITHALL -                           
  KEEPNODUPS KEEPBASE USING(CTL3) WITH(01,80) WITH(99,1)                   
//CTL1CNTL DD *                                                           
  OUTFIL FNAMES=T1,OVERLAY=(81:1,10,25,8,99:C'AA')                         
//CTL2CNTL DD *                                                   
  OUTFIL FNAMES=T1,OVERLAY=(81:18X,99:C'BB')                       
//CTL3CNTL DD *                                                   
  OUTFIL FNAMES=OUT,BUILD=(01,80),                                 
  INCLUDE=(25,8,CH,NE,91,8,CH,AND,99,2,CH,NE,C'AA')   


If the duplicates exist for the key which is present in the file1, the same jcl works. But if duplicates exist for the new records added in the file2 then use this jcl.
Hope this might help you...
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Business Rule extraction frozenblood CLIST & REXX 9 Tue Dec 27, 2016 10:06 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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