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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm


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