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
 

 

sort card to overide a field if conditions satisfy

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: sort card to overide a field if conditions satisfy
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: 356
Location: New York

PostPosted: Mon Nov 10, 2008 1:54 pm    Post subject:
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    Post subject: Reply to: sort card to overide a field if conditions satisfy
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    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 SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


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