IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can I compare the value of two fields of a file?


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
poonam_madaan

New User


Joined: 01 Dec 2006
Posts: 3
Location: Bangalore

PostPosted: Fri Dec 01, 2006 2:03 pm
Reply with quote

Can I compare the value of two fields of a file using file-aid?
For ex:
COL1=COL2 or 10:5 = 20: 5 (this is just an example where col1 is on position 10 and col2 in on position 20)
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Fri Dec 01, 2006 11:26 pm
Reply with quote

Yes you can, on compare screen specify column offset , length and type:

Code:

File-AID ----------- Compare - Unformatted Criteria ---------------------
COMMAND ===>                                                 SCROLL ===>
      OLD                   NEW                                         
 Cmd  Pos.    Length Type   Pos.    Length Type   Status Display         
                                                                         
  _   1       133     C     1       133     C     COMPARISON FIELD       
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
Cmd: S = Sync/Key, T = Tolerance, C = Compare, R = Reset       
         
Back to top
View user's profile Send private message
poonam_madaan

New User


Joined: 01 Dec 2006
Posts: 3
Location: Bangalore

PostPosted: Mon Dec 04, 2006 10:12 am
Reply with quote

Thanks MFRASHEED for the reply..
But How do I reach this screen. I'm giving option v;f;10..
but when I give the same name for Old and New file, it gives me error.
I'm using Compare Mode as U and selection usage criteria as T. It doesnt give me this screen. On the next screen I chose option 3 and it gives me the following screen:
AND
Cmd /OR Position Length RO Data Value
--- --- -------- ------ -- ----------------------------------------------------
___ _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Tue Dec 05, 2006 4:23 am
Reply with quote

If fields are in same file, just make copy of the file and use one as OLD and other as NEW.

You would use Selection criteria only if you want filter out records before compare, otherwise use 'N'.

Next screen will be 'Compare - Execution Options', choose online if file is small.

Next screen will be
Code:

 File-AID ----------------- Compare - Criteria Options -------------------------
 COMMAND ===>                                                                   
                                                                               
 Specify Initial Compare Options:                                               
                                                                               
  Compare type            ===> S   (S = Sorted/Keyed; R = ReadAhead; 1 = 1-to-1)
                                                                               
  Read-ahead record count ===>     (If type = R, specify read-ahead count)     
  Read-ahead sequence     ===> I   (E= Enforce; I = Ignore)                     
                                                                               
  Records to compare      ===> ALL (All or maximum number of records)           
  Differences to compare  ===> ALL (All or maximum number of differences)       
                                                                               
  Modify print defaults   ===> N   (Y = Yes; N = No)                           
  Specify output criteria ===> N   (Y = Yes; N = No)                           


and final screen will be 'Compare - Unformatted Criteria' as given earlier.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top