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
 

 

[Solved]ICETOOL utility to selectively select some records

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

New User


Joined: 12 Aug 2005
Posts: 53
Location: USA

PostPosted: Wed Apr 19, 2006 11:52 am    Post subject: ICETOOL utility to selectively select some records
Reply with quote

I am using the ICETOOL utility to selectively select some records from the input file. Before writing these records to the output file, I need to change the record contents based on some condition, say for eg a record has been selected and if the value in the 23 coloumn is '123', I need to make the value in the column 23 as '456' and then write this record to the output file

Regards,
Kishore.Y
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Wed Apr 19, 2006 11:55 am    Post subject: Re: DFSORT/ICETTOL
Reply with quote

Quote:
I am using the ICETOOL utility to selectively select some records from the input file.

Based on what condition you choose an I/p Record, which is to be updated at column 23.

Regards,
Priyesh.
Back to top
View user's profile Send private message
ykishore

New User


Joined: 12 Aug 2005
Posts: 53
Location: USA

PostPosted: Wed Apr 19, 2006 12:02 pm    Post subject: Re: DFSORT/ICETTOL
Reply with quote

Hi

Forget about the selection of records...but before writing to the o/p i need to write as per above requirement.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Wed Apr 19, 2006 12:23 pm    Post subject: Re: DFSORT/ICETTOL
Reply with quote

Code:
//S0P0    EXEC PGM=ICETOOL                                     
//TOOLMSG   DD SYSOUT=*                                       
//DFSMSG    DD SYSOUT=*                                       
//IN     DD DSN=HLQ.RECORDS.INPUT,DISP=SHR                 
//OUT    DD DSN=HLQ.RECORDS.OUTPUT,                       
//          DISP=(,CATLG,DELETE)                               
//TOOLIN DD *                                                 
 COPY FROM(IN) TO(OUT) USING(CTL1)                             
/*                                                             
//CTL1CNTL DD *                                               
   OUTREC IFTHEN=(WHEN=(23,3,CH,EQ,C'123'),OVERLAY=(23:C'456'))
/*                                                             
//                                                             


Regards,
Priyesh.
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 Apr 19, 2006 8:42 pm    Post subject:
Reply with quote

If you're selecting the records with a SORT or COPY operator, then Priyesh's solution using DFSORT's OUTREC statement will work fine. However, if you're using a SELECT operator, you'll need to use OUTFIL rather than OUTREC, e.g.

Code:

//S0P1    EXEC PGM=ICETOOL                                     
//TOOLMSG   DD SYSOUT=*                                       
//DFSMSG    DD SYSOUT=*                                       
//IN     DD DSN=HLQ.RECORDS.INPUT,DISP=SHR                 
//OUT    DD DSN=HLQ.RECORDS.OUTPUT,                       
//          DISP=(,CATLG,DELETE)                               
//TOOLIN DD *                                                 
SELECT FROM(IN) TO(OUT) ON(5,4,CH) FIRST -
  USING(CTL1)                             
/*                                                             
//CTL1CNTL DD *                                               
   OUTFIL FNAMES=OUT,
      IFTHEN=(WHEN=(23,3,CH,EQ,C'123'),OVERLAY=(23:C'456'))
/*                                                             
//                 
Back to top
View user's profile Send private message
ykishore

New User


Joined: 12 Aug 2005
Posts: 53
Location: USA

PostPosted: Thu Apr 20, 2006 10:14 am    Post subject: Re: ICETOOL utility to selectively select some records
Reply with quote

Hi

Thanks alot !!
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 Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


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