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
 

 

How to compare two cloumn using FILEAID

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
sadashiv.a.bhosure

New User


Joined: 01 Feb 2007
Posts: 15
Location: india

PostPosted: Fri Mar 23, 2007 6:15 pm    Post subject: How to compare two cloumn using FILEAID
Reply with quote

Hi,

I have a file like
-----------------------------------------------------------
name cnt1 val1 cnt2 val2 indicator
-----------------------------------------------------------
aaaa 01 91 01 91
bbbb 02 85 02 90
cccc 01 20 02 40

if (cnt1 not equal to cnt2) and (val1 not equal to val2) then i want to update indicator field to '***'

i.e.
I want output as follows

-----------------------------------------------------------
name cnt1 val1 cnt2 val2 indicator
-----------------------------------------------------------
aaaa 01 91 01 91
bbbb 02 85 02 90 ***
cccc 01 20 02 40 ***


HOW will we do it using FILEAID..........

waiting for reply. is there any other solution without fileaid?
Can we do it using sort utility.......


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

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 23, 2007 7:37 pm    Post subject:
Reply with quote

Hello,

This is most likely a better job for the sort than for file-aid.

Which sort product does your location use (most likely DFSORT or Syncsort)?
Back to top
View user's profile Send private message
sadashiv.a.bhosure

New User


Joined: 01 Feb 2007
Posts: 15
Location: india

PostPosted: Mon Mar 26, 2007 5:25 pm    Post subject: Re: How to compare two cloumn using FILEAID
Reply with quote

we are using syncsort......
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Mar 27, 2007 1:20 am    Post subject:
Reply with quote

Hello,

I'm not positive, but i believe you can do what you want with Syncsort. Someone strong with Syncsort might contribute suggestions.

It may take a bit of digging in the Fine Manual. If you do not have the documentation, it may be gotten for free from Syncsort (if your organization is a licensed user).
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Mar 27, 2007 11:43 am    Post subject:
Reply with quote

Hi There,

I have done these in three step
First step : To Insert Seq number at the end
Code:
Sort card
//SYSIN    DD  *                 
   OPTION COPY                   
   INREC FIELDS=(1,80,SEQNUM,8,ZD)
/*                               


Second step:To insert *** starting at 13 th byte if cnt1 not equal to cnt2 or val1 not equal to val2 .Its taking the input from prev sortout file
Sort Card
Code:
//SYSIN    DD  *                                             
   OPTION COPY                                               
   OUTFIL FILES=A,OUTREC=(1,12,C'***',16,73),               
             INCLUDE=(5,2,ZD,NE,9,2,ZD,OR,7,2,ZD,NE,11,2,ZD)
   OUTFIL FILES=B,OUTREC=(1,88),                             
             INCLUDE=(5,2,ZD,EQ,9,2,ZD,AND,7,2,ZD,EQ,11,2,ZD)
/* 

Third Step:To Concatenate both the file by using seq number
Code:
Sort card:
//SYSIN    DD  *           
   SORT FIELDS=(81,8,ZD,A) 
   OUTREC FIELDS=(1,80)     
/*     


Its not optimized solution but its giving desired result
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm


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