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

sort card to overide a field if conditions satisfy


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shrutika

New User


Joined: 10 May 2008
Posts: 5
Location: India

PostPosted: Mon Nov 10, 2008 1:36 pm
Reply with quote

Hi all,
I have an input file as follows

1 354689 99887
2 467648 99767
3 756596 99475
2 677687 99445
3 846577 99746

I want a sort card to copy these to an output file, with the value in column 10 to 11 changed to 88 instead of 99, whenever value in column 1 is 2.

i.e. my output file would look like:
1 354689 99887
2 467648 88767
3 756596 99475
2 677687 88445
3 846577 99746

Thanks...
Shrutika
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Mon Nov 10, 2008 1:54 pm
Reply with quote

Use the following DFSORT statements.

Code:

  OPTION COPY                                       
  INREC IFTHEN=(WHEN=(1,1,CH,EQ,C'2'),   
      OVERLAY=(10:C'88'))       
Back to top
View user's profile Send private message
shrutika

New User


Joined: 10 May 2008
Posts: 5
Location: India

PostPosted: Mon Nov 10, 2008 6:46 pm
Reply with quote

I tried the above card, and got exactly what i wanted

Thanks everybody..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts How to load to DB2 with column level ... DB2 6
Search our Forums:

Back to Top