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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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