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
 

 

comparing two fields of the same record for a file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sushidas
Warnings : 2

New User


Joined: 23 Aug 2006
Posts: 13

PostPosted: Thu Dec 17, 2009 9:04 pm    Post subject: comparing two fields of the same record for a file
Reply with quote

Hi,

I want to check if the two fields of a record is same or not. If it is same, I would like to write such records to an output file.
Can we do it using ICETOOL/SORT. Pls suggest.

Example..

Input file:


f1 f2 f3 f4
111 AAABBB 111 TTTTT
345 FFFHHH 546 GGGG
414 FFFSSS 414 NNNN

Output file where field f1 is equal to f3:

111 AAABBB 111 TTTTT
414 FFFSSS 414 NNNN
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Dec 17, 2009 9:12 pm    Post subject:
Reply with quote

Code:
  SORT    FIELDS=COPY             
  INCLUDE COND=(pos,len,format,EQ,pos,len,format)
Back to top
View user's profile Send private message
sushidas
Warnings : 2

New User


Joined: 23 Aug 2006
Posts: 13

PostPosted: Thu Dec 17, 2009 9:18 pm    Post subject:
Reply with quote

thank you
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


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