IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

[Solved]ICETOOL utility to selectively select some records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 1448
Location: Chicago, IL

PostPosted: Wed Apr 19, 2006 11:55 am
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
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: 1448
Location: Chicago, IL

PostPosted: Wed Apr 19, 2006 12:23 pm
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 Developer


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

PostPosted: Wed Apr 19, 2006 8:42 pm
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
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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts Sort SMF records? SYNCSORT 6
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts IBM IMU Utility for Easytrieve Code t... IBM Tools 0
No new posts Identify and write records containing... SYNCSORT 11
Search our Forums:


Back to Top